Posts

Showing posts from May, 2017

wallShearStress in OpenFOAM

Image
The wall shear stress,  , is given by: Where   is the dynamic viscosity,   is the flow velocity parallel to the wall and   is the distance to the wall. The SI unit of wall shear stress is pascal ( ), which is identical to  . The skin friction coefficient,  , is defined by: Where   is the local  wall shear stress ,   is the fluid density and   is the free-stream velocity (usually taken ouside of the boundary layer or at the inlet). Incompressible Flow Laminar In OpenFOAM, wallShearStress usually is in "kinematic pressure", namely in "m2/s2". It doesn't take into account the density of the fluid. So, you should multiply by rho to reach tau. tau = (wallShearStress) * rho or with wallGradU utility   tau = (wallGradU) * mu You can use the Calculator filter in ParaView to multiply the "wallShearStress" field by the density value. Turbulence Compressible Flow You must run "wallShearSress -compressible&qu

Turbulence properties and boundary conditions in OpenFOAM

Image
To know turbulence models in OpenFOAM, please look at OpenFOAM User Guide 7.2 Reynolds-averaged Navier–Stokes (RANS) NASA's Turbulence Modeling Resource  Boundary Conditions: INLET 1.     turbulentIntensityKineticEnergyInlet for k in the inlet (under that you make the description of the intensity and the value) 2.     turbulentMixingLengthFrequencyInlet for omega in the inlet (then description mixing length, k and value) 3.     turbulentMixingLengthDissipationRateInlet for epsilon in the inlet (then description mixing length and value) 4.     fixedValue EXAMPLE: inlet { type turbulentIntensityKineticEnergyInlet; intensity 0.02; value uniform 0.0006; } To calculate the initial values of k, epsilon and w, read   Turbulence free-stream boundary conditions WALL With Wall Function (y+ > 1) 1.       kqRWallFunction for k 2.       epsilonWallFunction for epsilon 3.       omegaWallFunction for omega 4.       nutWallFunction or

yPlus utility in OpenFOAM

Image
This post is about how to calculate yPlus in OpenFOAM. For RANS Note that yPlusRAS calculates y* and not y+ 1.      With wall function;   ·         type ‘yPlusRAS’ for incompressible flow ·         type ‘yPlusRAS’ –compressible for compressible flow 2.      Without wall function; ·         type wallShearStress if it is incompressible. If not, add " -compressible " flag ·         calculate manually: sqrt(wallShearStress/rho) * y/nu y = the distance to first cell from the wall nu = kinematic viscosity Be careful: You should use the cell center (height of the cell devided by two) for y For LES type ‘ yPlusLES’ Note: Y-star = rho*Cmu^0.25*sqrt(k)*y/mu y-plus = rho*sqrt(tau_w/rho_w)*y/mu Y-star is related to the turbulent kinetic energy and y-plus to the wall shear stress. Where   is the friction velocity at the nearest wall,   is the distance to the nearest wall and   is the local kinematic viscosity of the fluid.  is often refered to