The aim of this test case is to validate the calculation of following flow quantities:
using incompressible steadystate turbulent models applied to water flow through a straight pipe.
Two turbulence models were used: the k−ϵ
$k\u03f5$and the k−ω SST
$k\omega \text{}SST$. Simulation results from SimScale were compared to the analytical results [1]. The mesh was generated on the SimScale platform using the Hexdominant parametric type of meshing operation.
Link to the Turbulent Pipe Flow public project on SimScale
A straight cylindrical pipe was chosen as the flow domain (see Fig.1.). Faces A, B and C represent the inlet, wall and outlet patches, respectively.
Length [m]  Diameter [m] 

1  0.01 
In this study the focus was on two turbulence models: the k−ϵ
$k\u03f5$model and the k−ω SST
$k\omega \text{}SST$. These models fall under the category of Reynolds Averaged NavierStokes (RANS) method of turbulence modeling.
A typical property to assess the mesh quality in regards to the nearwall modeling in turbulent simulations is the y+
${y}^{+}$(“yplus”) value, which is defined as the nondimensional distance to the wall; it is given by y+=u∗yν
${y}^{+}=\frac{{u}^{\ast}y}{\nu}$. A y+
${y}^{+}$value of 1 would correspond to the upper limit of the laminar sublayer.
There are two ways of modeling the physics of nearwall flow in RANS models:
 “Full resolution” of the nearwall region: This approach explicitly models the boundary layer all the way down to the laminar sublayer. It requires the first cell center to be placed at most at the top of the laminar sublayer, where y+≈1
${y}^{+}\approx 1$
. This procedure demands computational grid resolution in to be very fine. Boundary conditions for this approach are given in Table 2.
 Use of wallfunctions to resolve the nearwall region: This approach allows for the center of the first cell next to the wall boundary to be placed in the range: 30⩽y+⩽300
$30\u2a7d{y}^{+}\u2a7d300$
. Boundary conditions for this approach are given in Table 1.
In this validation project both approaches are investigated – wall functions for both k−ω SST
$k\omega \text{}SST$and k−ϵ
$k\u03f5$turbulence models; and full boundary layer resolution for k−ω SST
$k\omega \text{}SST$model.
Uniformlyspaced hexahedral meshes were generated on the SimScale platform, using the hexdominant parametric meshing operation (see Fig.2.). For the “wall function” approach, the aimed first cell layer thickness was around 1 mm
$1\text{}mm$, with the intention of y+
${y}^{+}$being ≈30
$\approx 30$. For the “Full resolution” case, the aimed first cell layer thickness was 0.041 mm
$0.041\text{}mm$, with the intention of achieving y+≈1
${y}^{+}\approx 1$.
Tool Type : OPENFOAM®
Analysis Type : Incompressible Steadystate (Turbulent)
Turbulence Models : k−ϵ
$k\u03f5$/ k−ω SST
$k\omega \text{}SST$
Mesh and Element types :
Mesh type  Cells in x  Cells in y  Cells in z  Total number of cells  Refinements 

hexdominant parametric  19  500  19  179092  Inflate boundary layer 
hexdominant parametric  20  1000  20  451360  Inflate boundary layer 
Fig.2. Meshes used for the Turbulent Pipe Flow validation: left is used for wall function (y+≈30
${y}^{+}\approx 30$) approach, right for full resolution(y+≈1
${y}^{+}\approx 1$) approach.
; density ρ=1000 [kg/m3]
$\rho =1000\text{}[kg/{m}^{3}]$
Boundary conditions are given in the Tables 1. and 2. below:
Table 1. Boundary Conditions for the “Wall function approach”:
Type  u[m/s]
$u[m/s]$

p[m2s−2]
$p[{m}^{2}{s}^{2}]$

k[m2s−2]
$k[{m}^{2}{s}^{2}]$

epsilon[m2s−3]
$epsilon[{m}^{2}{s}^{3}]$

omega[s−1]
$omega[{s}^{1}]$


Inlet  1
$1$

Zero Gradient  3.84×10−3
$3.84\times {10}^{3}$

0.03059×10−3
$0.03059\times {10}^{3}$

88.525
$88.525$

Wall  0
$0$

Zero Gradient  Wall Function  Wall Function  Wall Function 
Outlet  Zero Gradient  0
$0$

Zero Gradient  Zero Gradient  Zero Gradient 
Table 2. Boundary Conditions for the “Full resolution approach”:
Type  u[m/s]
$u[m/s]$

p[m2s−2]
$p[{m}^{2}{s}^{2}]$

k[m2s−2]
$k[{m}^{2}{s}^{2}]$

omega[s−1]
$omega[{s}^{1}]$


Inlet  1
$1$

Zero Gradient  3.84×10−3
$3.84\times {10}^{3}$

88.525
$88.525$

Wall  0
$0$

Zero Gradient  0  Wall Function 
Outlet  Zero Gradient  0
$0$

Zero Gradient  Zero Gradient 
where k
$k$represents the turbulence kinetic energy. It is calculated as:
k=32(uavgI)2
$$k=\frac{3}{2}({u}_{avg}I{)}^{2}$$
where uavg
${u}_{avg}$is the average velocity in the pipe crosssection and I
$I$is the turbulence intensity, which can be calculated for fully developed pipe flow as:
I=0.16Re−18
$$I=0.16R{e}^{\frac{1}{8}}$$
Having calculated k
$k$, the turbulent dissipation rate ϵ
$\u03f5$is calculated as:
ϵ=Cμk32l
$$\u03f5={C}_{\mu}\frac{{k}^{\frac{3}{2}}}{l}$$
where Cμ=0.09
${C}_{\mu}=0.09$is an empirical constant specified in the turbulence model.
Specific turbulent dissipation rate ω
$\omega $is calculated as:
ω=k−−√l
$$\omega =\frac{\sqrt{k}}{l}$$
In both expressions above l=0.07dh
$l=0.07{d}_{h}$is the turbulent length scale, where dh
${d}_{h}$is the hydraulic diameter, which for circular pipes is equal to the diameter d
$d$.
Table 2. lists boundary conditions prescribed for full boundary layer resolution case with y+
${y}^{+}$being around 1 and using k−ω SST
$k\omega \text{}SST$turbulence model. It shows that at the pipe surface, k
$k$was set to be 0
$0$, while for ω
$\omega $a wall function is prescribed. This it the recommended setting for meshes with y+≈1
${y}^{+}\approx 1$for the version of OPENFOAM® turbulence models currently running on SimScale platform. The validity of such choice will be demonstrated in the result section below.
The velocity profile for turbulent pipe flow is approximated by an empirically derived relation [1]:
u¯z(r)=u¯zmax(R−rR)1/n
$${\overline{u}}_{z}(r)={\overline{u}}_{{z}_{max}}{\left(\frac{Rr}{R}\right)}^{1/n}$$
For turbulent flow, the ratio of u¯zmax
${\overline{u}}_{{z}_{max}}$to the mean flow velocity is a function of Re
$Re$. In this case, this ratio is calculated to be 1.254
$1.254$[1].The parameter n
$n$is a measure of the curvature of the profile. For this case, it is calculated to be 6.189
$6.189$.
The pressure drop for turbulent flow in pipes is obtained by the Darcy friction factor f
$f$calculated by the solution of the Colebrook equation. The solution of the Colebrook equation is plotted in the form of the Moody diagram (See Fig.3.) and for this case, the value of f
$f$is 0.0309
$0.0309$. This value is then used to calculate the pressure drop using the DarcyWeisbach equation:
ΔP=fρu2l2d
$$\mathrm{\Delta}P=f\frac{\rho {u}^{2}l}{2d}$$
The comparison of simulation results using wall function approach with the result of analytical calculation is given in Fig.3A and 3B. Pressure drop along the pipe length can be observed in Fig.3A, while Fig.3B shows the developed radial velocity profile, located 60 cm
$60\text{}cm$from the inlet.
The first cell center for “wall function approach” is on average at y+=32.7
${y}^{+}=32.7$for k−ω SST
$k\omega \text{}SST$and y+=33.45
${y}^{+}=33.45$for k−ϵ
$k\u03f5$. For “full resolution”, average wall distance of first cell center is at y+=1.24
${y}^{+}=1.24$. These values were calculated from simulation results.
Besides good agreement with the analytical model, results show that k−ω SST
$k\omega \text{}SST$and k−ϵ
$k\u03f5$are equally successful in predicting the pressure drop along pipe length using “wall function” approach, for the given mesh.
Fig.3. Pressure drop along the pipe length (A) and radial velocity profile (B) – for simulations with wall function approach
The k−ω SST
$k\omega \text{}SST$is chosen for full boundary layer resolution case since it takes advantage of accuracy of k−ω
$k\omega $model in proximity of noslip boundaries, while in the freestream flow it uses k−ϵ
$k\u03f5$formulation, thus avoiding the tendency of k−ω
$k\omega $of being too sensitive to inlet turbulence quantities. Switching between the two formulations is done seamlessly by blending functions. Moreover, use of k−ω
$k\omega $formulation close to the wall makes the k−ω SST
$k\omega \text{}SST$directly applicable for full resolution case, since it does not need extra damping functions to ensure correct behavior close to walls.
The comparison of simulation results using full resolution approach with the analytical calculations is given in Fig.4C and 4D. Pressure drop along the pipe length can be observed in Fig.4C, while Fig.4D shows the developed radial velocity profile, located 60 cm
$60\text{}cm$from the inlet.
Fig.4. Pressure drop along the pipe length (C) and radial velocity profile (D) – for simulations with full boundary layer resolution.
Average pressure difference between inlet and outlet is better predicted by k−ω SST
$k\omega \text{}SST$and full resolution modeling, while pressure distribution along wide range of L
$L$values is equally well predicted with wall function as well as the full resolutionmodeling.
Velocity profiles from simulations using full resolution approach show better prediction of maximum velocity at the pipe centerline, as well as better agreement with analytical model in areas of high velocity gradient, i.e. close to the wall. The reason for the latter lies in the mesh used for “wall function” modeling. Precisely in its coarseness in the nearwall region, which was deliberately introduced in order to place the first cell center in the y+>30
${y}^{+}>30$region. Flow velocity is relatively low in the present case, which reflects in boundary layer thickness, and ultimately in the height of first cell next to the boundary. This kind of situations is sometimes faced in modeling, meaning that a certain modeling approach can be more or less favorable for a specific application.
Taking all results in consideration, it can be observed that a generally good correspondence exists between analytical results and SimScale simulations.
[1]  (1, 2, 3) A Course in Fluid Mechanics with Vector Field Theory – Dennis C. Prieve 
This offering is not approved or endorsed by OpenCFD Limited, producer and distributor of the OpenFOAM software and owner of the OPENFOAM® and OpenCFD® trade marks. OPENFOAM® is a registered trade mark of OpenCFD Limited, producer and distributor of the OpenFOAM software.