Turbulence-Modelling-in-OpenFOAM-Additionalmaterial
Turbulence-Modelling-in-OpenFOAM-Additionalmaterial
Calculation of yp and y+
Turbulence models uses wall functions to model near wall regions in a turbulent flow. In order
to satisfy the physics near the wall, the first cell centre 𝑦𝑝 should be within the log-law region
from the wall.
The dimensionless wall distance 𝑦 + is given by
2
𝑦𝑝 √0.5𝐶𝑓 𝑈∞
𝑦+ = (1)
𝜈
Where, 𝑦 is the distance from the wall,
𝑈∞ is the free stream velocity, and
𝜈 is the kinematic viscosity.
The skin friction coefficient 𝐶𝑓 is given by the -1/4 power law,
1
𝐶𝑓 = 0.078 𝑅𝑒 −4 (2)
Expansion Ratio
The channel geometry in our tutorial is divided into two blocks as shown in fig. 1.
𝑎 = 0.0062 m (5)
Since the channel width of block 1 along the 𝑦-axis is 0.5 m,
𝑎 + 𝑎𝑟 + 𝑎𝑟 2 + ⋯ + 𝑎𝑟 29 = 0.5 m (6)
Solving (5) and (6), we get two real solutions for 𝑟. Since one of them is 𝑟 = 1 and this means
the cell width is uniform, we neglect this solution. The other real solution is
𝑟 = 1.0611
The expansion ratio is defined as the ratio of the width of the last cell to that of the first cell.
Therefore,
𝑎𝑟 29
𝑒= = 𝑟 29 = 5.57 (7)
𝑎
The expansion ratio along 𝑦-axis for block 1 is 5.57.
And the same way it is 0.18 for block 2.
CFD-OpenFOAM
FOSSEE, IIT Bombay
Spoken Tutorial
𝒌 − 𝜺 model
𝑘 − 𝜀 model solves two additional equations, for turbulent kinematic energy 𝑘 and rate of
dissipation of turbulence energy 𝜀. It performs poorly for complex flows involving severe
pressure gradient, separation, strong streamline curvature. Suitable for initial iterations, initial
screening of alternative designs, and parametric studies. Can be only used with wall functions.
To use this model following boundary conditions are required:
p U k epsilon nut
Where,
𝑘 is turbulent kinetic energy,
epsilon is turbulent dissipation rate,
nut is turbulent kinematic viscosity
𝒌 − 𝒐𝒎𝒆𝒈𝒂 model
𝑘 − 𝜔 model solves two additional equations, for turbulent kinematic energy 𝑘 and specific
dissipation rate 𝜔. It performs better for complex flows involving severe pressure gradient,
separation, strong streamline curvature. For the external flow it works better and near to the
walls its performance is not that good.
To use this model following boundary conditions are required:
p U k omega nut
Where,
omega is specific dissipation rate,
p U k omega nut
CFD-OpenFOAM
FOSSEE, IIT Bombay
Spoken Tutorial
Calculations for 𝒌
3
𝑘= (𝑈 𝐼)2
2 ∞
Where,
𝑈∞ is a characteristic velocity scale,
I is the turbulent intensity
𝑢′ √𝑢′2 + 𝑣 ′2 + 𝑤 ′2 √𝑢′2 + 𝑣 ′2 + 𝑤 ′2
𝐼= = =
𝑢 √𝑢2 + 𝑣2 + 𝑤 2 𝑈∞
In our case,
Calculations for 𝜺
Calculation of turbulent dissipation rate 𝜀 is very straight forward. Put data of 𝑘 and
characteristic length of the channel in this formula,
3
𝐶𝜇 ⁄4 ∙ 𝑘1.5
𝜀=
0.07 ∙ 𝐿
Where, 𝐶𝜇 is an empirical constant. Value of 𝐶𝜇 is 0.09.
In our case,
𝒎𝟐
𝒌 = 𝟎. 𝟒𝟎𝟖𝟕𝟓 &𝑳=𝟏𝒎
𝒔𝟐
𝟎.𝟏𝟔𝟒∙𝒌𝟏.𝟓
Turbulent dissipation rate: 𝜺 = 𝟎.𝟎𝟕∙𝑳
𝒎𝟐 𝟏.𝟓
𝟎. 𝟏𝟔𝟒 ∙ (𝟎. 𝟒𝟎𝟖𝟕𝟓 )
𝜺= 𝒔𝟐
𝟎. 𝟎𝟕 ∙ 𝟏
𝜺 = 𝟎. 𝟔𝟏
Calculation of specific dissipation rate 𝜔 is very straight forward. Put data of 𝑘 and
characteristic length of the channel in this formula,
𝜀
𝜔=
𝐶𝜇 ∙ 𝜅
1
−1⁄ 𝜅 ⁄2
𝜔 = 𝐶𝜇 4
0.07 ∙ 𝐿
Where, 𝐶𝜇 is an empirical constant. Value of 𝐶𝜇 is 0.09.
In our case,
𝒎𝟐
𝒌 = 𝟎. 𝟒𝟎𝟖𝟕𝟓 &𝑳=𝟏𝒎
𝒔𝟐
𝟏
−𝟏⁄ 𝜿 ⁄𝟐
Turbulent dissipation rate: 𝝎 = 𝑪𝝁 𝟒
𝟎.𝟎𝟕∙𝑳
𝟏⁄
−𝟏⁄ (𝟎. 𝟒𝟎𝟖𝟕𝟓) 𝟐
𝝎= 𝟎. 𝟎𝟗 𝟒
𝟎. 𝟎𝟕 ∙ 𝟏
𝝎 = 𝟏𝟔. 𝟔𝟕
CFD-OpenFOAM
FOSSEE, IIT Bombay
Spoken Tutorial
For k-Omega,
Formula, OpenFoam calculates for 𝜈𝑡 is,
𝑘
𝜈𝑡 =
𝜔
Effective viscosity, 𝜈𝑒𝑓𝑓 = 𝜈 + 𝜈𝑡
Wall functions
The k-ε equations are only valid for fully turbulent high Reynolds number flow, and are thus
not valid near the wall. Therefore, k-ε equations are not integrated all the way to the walls. We
can divide near-wall region in three different categories:
• Viscous sub-layer 0 < y+ < 5
• Buffer layer 5 < y+ < 30
• Log-law layer 30 < y+ < 300
Source: https://www.computationalfluiddynamics.com.au/turbulence-part-3-selection-
of-wall-functions-and-y-to-best-capture-the-turbulent-boundary-layer/
CFD-OpenFOAM
FOSSEE, IIT Bombay
Spoken Tutorial
If we keep first cell centre in the viscous sub-layer, all turbulence equations give us accurate
results. But that is very difficult to simulate. This approach leads to requirement of abundant
mesh number, which means a substantial computational resource is needed.
The viscous sub-layer: (y+ < 5)
In the viscous layer the fluid is dominated by the viscous affect so it can be assumed that the
shear stress of fluid is equal to the wall shear stress 𝜏𝜔 . In viscous layer viscous stress decide
the flow and the velocity profile is liner, given by
u+= y+
Another way of getting accurate simulation results is applying some additional boundary
condition at wall which calculates non-linearity of velocity near to the wall. For that we need
to add a logarithmic velocity function at walls. This log functions are only valid in log-law
region where y+ value is between 30 & 300.
The log-law layer: (30 < y+ < 300)
In the logarithmic layer turbulence stress dominate the flow and velocity profile varies very
slowly with a logarithmic function along the distance y, given by
1
u+ = 𝜅 × ln(𝐸𝑦 + )
Let 𝑈𝑝 be a velocity component at a node p closest to the wall. We then impose that the velocity
at this node should follow the logarithmic wall law according to
𝑈𝑝 1 𝑣 ∗ 𝑦𝑝
= ln ( )+𝐵
𝑣∗ 𝜅 𝜈