Documente Academic
Documente Profesional
Documente Cultură
Shengnan Liu
Offshore Technology,
Department of Mechanical and Structural Engineering and Materials Science
University of Stavanger,
Stavanger, Norway
2016-12-05
Contents
High shear rate - the highest mean shear rate < U >/y occurs at
the wall. The velocity changes from the no-slip condition at the wall
to its stream value.
Linear viscous
sub-layer (y + < 5)-
Dominated by
viscous shear
Buffer layer
(5 < y + < 30) -
Mix of viscous layer
and inertial layer
Log-law layer
(30 < y + < 100) -
Both viscous and
Wall functions for different layers turbulent effects are
y + = (u y)/; u+ = u/u , important
http://www.computationalfluiddynamics.com.au/tag/wall-functions/
The fluid very close to the wall is dominated by viscous shear in absence of
the turbulent shear stress effects. In this region u+ = y + , T = f C k 2 /
(Jones and Launder (1972) ), f = 1 exp(0.0002y + 0.00065y +2 )
(Rodi and Mansour (1993) ), the following equation set is used in the
viscous near wall region:
y = u y/
+
+
u = u/u
u+ = y +
(1)
k = u2 / C
p
= C3/4 k 3/2 /y
T = f C k 2 /
y = u y/
+
u+ = u/u
1
u+ =
( ln(Ey+ ) ) + ( 1
y+
) (2)
2
p
k = u / C
= C3/4 k 3/2 /y
T = f C k 2 /
In this region viscous and turbulent effects are both important. The
relationship between y + and u+ is logarithmic, the equation set to be used
in the log-law region is:
y = u y/
+
u+ = u/u
u+ = 1 ln(Ey + )
p (3)
2
k = u / C
= C3/4 k 3/2 /y
T = f C k 2 /
Overview on k model
The k belongs to the two-equation models(Launder and Spalding
(1972); Rodi (1993)).
k k T k ui uj ui
+ uj = ( ) + T ( + ) (4)
t xj xj k xj xj xi xj
T ui uj ui 2
+ uj = ( ) + C1 T ( + ) C2 (5)
t xj xj xj k xj xi xj k
Model transport equations are solved for two turbulence quantities.
Turbulent kinetic energy k, which determines the energy in the
turbulence.
Turbulent dissipation , which determines the rate of dissipation of
the turbulent kinetic energy.
The turbulent viscosity is specified as T = C k 2 / and C1 = 1.44,
C2 = 1.92, C = 0.09, k = 1.0, = 1.3.
Shengnan Liu New Wall Function Implementation in OpenFOAM 4.0 2016-12-05 11 / 35
Introduction on Near-wall Physics Wall Functions in OpenFOAM 4.0 New Wall Functions Implementation Case Test
(Ck /ln(y + ) + Bk ) C kc ,
p
y + > yP lusLam
kw = { (6)
2400 Cf /Ce2 ps2 C kc ,
p
y + < yP lusLam
Code Framework
There are many T wall functions in OpenFOAM 4.0 which are all based
on one virtual base class nutWallFunction.
Calculate from U k
nutUWallFunction nutkWallFunction
nutURoughWallFunction nutkRoughWallFunction
Type name
nutUSpaldingWallFunction nutLowReWallFunction
nutUTabWallFunction nutkAtmRoughFunction
Table: Available T wall functions in OpenFoam 4.0
Code Framework
The new implemented wall functions are built based on Ong et al. (2009)
(i.e. Ong wall function), code are modified based on kLowReWallFunction,
epsilonWallFunction and nutkWallFunction.
Change the .H and .C files names to the new wall function names.
Change all the key words from kLowReW allF unction to
kOngW allF unction.
Define two member functions to calculate u in buffer layer and
log-law region.
Modify updateCoeffs(), set k to three section functions according to
y+.
Save files.
Eyu u
f 2(u ) = exp( ) = 0 (y + > 30) (7)
u
f 2(un )
un+1 = un
f 20 (un )
(8)
Ey u u
f 20 (un ) = + 2 exp( )
un un
f 1(un )
un+1 = un
f 10 (un )
(2yun / 5 + ln(Eyun /))y (30 yun /)
f 10 (un ) =
25(yun /)un ln(Eyun /)
((5 yun /)yun / + (30 yun /)ln(Eyun /))(y + ln(Eyun /)y) 1
25(yun /ln(Eyun /))2 u
(10)
Test Case 1
The main improvement of Ong wall function is including the buffer layer
inside. Set first layer cell in the buffer layer.
Results of Case 1
Use simpleF oam for the simulation. Results are shown as follows.
Test Case 2
Set first layer cell in buffer layer. Set fully developed boundary layer flow
(can be calculted according to the Ong wall function equations) on the
inlet pathes, and compare the velocity profile of inlet and outlet.
Test Case 2
The nonuniform setting for U , k, and T are required in 0 folder. In
addition, boundaryData folder is required in constant folder. The inlet
velocity pofile calculated from Ong wall function is shown in Figure 4.
Test Case 2
The inlet setting for k, and T are based on Ong et al., (2010) :
Test Case 2
The results show that the Ong wall functions keep the velocity profile
stable. The new wall function is developed successfully.
Questions?