You are on page 1of 35

19.

0 Release

Lecture 04: Near Wall Modeling

Turbulence Modeling Using ANSYS CFD

1 © 2018 ANSYS, Inc.


Contents

In this lecture, we will cover the following topics:


• Motivation
• Flow Physics Near the Wall
• Near Wall Modelling options
− Wall Functions
− Alternate Scaling of Variables
− Low Ret method
− Automatic Near-Wall Treatment
• Rough Wall Treatment
• Extension to Heat Transfer

2 © 2018 ANSYS, Inc.


Motivation for Near-Wall Modeling

• Walls are main source of vorticity and turbulence


• The presence of walls usually gives rise to turbulent momentum boundary layers:
the steepest variations are in the very near-wall regions
− Successful prediction of frictional drag for external flows, or pressure drop for internal flows,
depends on fidelity of local wall shear predictions
− Pressure drag for bluff bodies is dependent upon extent of separation zones
• Use of very fine mesh to resolve the steep gradients in the inner part of the
boundary layer is still too expensive for many industrial CFD simulations
• Hence accurate near-wall modeling on coarser grids is important for most
industrial CFD applications

3 © 2018 ANSYS, Inc.


Flow Behavior Near the Wall

• Velocity profile exhibits layer structure


identified from dimensional analysis
− Sublayer
• viscous forces rule, U = f ( r, tw , m , y )
− Logarithmic layer
• log-law applies
− Outer layer
• dependent upon mean flow
• Turbulent kinetic energy production and Dissipation

dissipation are nearly equal in the log layer


− ‘turbulent equilibrium’
Production
• Dissipation >> Production in the viscous
sublayer region

4 © 2018 ANSYS, Inc.


Scaling of Variables Near Wall

• Scaling of variables based on wall shear stress, 𝜏𝑤


• Additional variables:
− Distance from wall 𝑦
− Kinetic viscosity ν
• Non-dimensional variables based on wall shear stress:
𝑈 Δ𝑦𝑢τ 𝜏𝑤
𝑈+ = 𝑦+ = 𝑢𝜏 =
𝑢τ ν 𝜌

− 𝑈 is the known velocity tangent to the wall at a distance of Δ𝑦 from the wall, 𝑢τ is called
friction velocity, 𝑈 + is the non-dimensional near wall velocity, 𝑦 + is the non-dimensional
distance from the wall, 𝜏𝑤 is the wall shear stress
• The goal is to find universial wall behavior for the non-dimensional variables

5 © 2018 ANSYS, Inc.


Velocity Near the Wall

• Viscous sublayer
− Very close to the wall, the molecular viscosity plays a dominant role in momentum and heat transfer
− Turbulent fluctuations are damped out and the wall shear stress is almost entirely viscous. The u-
momentum equation reduces to:
𝜕𝑈
𝜇 = 𝜏𝑤 , constant
𝜕𝑦
𝜏𝑤
which yields a linear velocity profile 𝑈= 𝑦 i.e. 𝑈 + = 𝑦 +
𝜇
• Logarithmic layer
1
− The logarithmic relation for the near wall velocity is: 𝑈+ = ln( 𝑦 + ) + 𝐶
𝜅

− It is assumed that in this region the non-dimensional velocity distribution is independent of the flow
type (𝜅 and 𝐶 are constants)

6 © 2018 ANSYS, Inc.


Alternate Scaling of Variables

• Scaling of variables based on ut gives singular solution at separation points (log-layer)

𝜏𝑤𝑎𝑙𝑙 = 0 ⇒ 𝑢𝜏 = 0

• An alternative velocity scale 𝑢∗ can be used instead of 𝑢𝜏 in the logarithmic region (note that
𝑢𝜏 = 𝑢∗ for equilibrium flows)
1/4
𝑢∗ = 𝐶𝜇 𝑘1/2

• This avoids the singularity in the log-profile and other quantities:


1 𝜏𝑤𝑎𝑙𝑙 = 𝜌𝑢𝜏 𝑢 ∗
𝑈+ = ln( 𝑦 ∗ ) + 𝐶
𝜅

7 © 2018 ANSYS, Inc.


Velocity Profile Near the Wall

Outer region
• Velocity profile in logarithmic scale
• Near wall – universal profiles:
− Linear near wall
Log. region
− Logarithmic further out
− Buffer layer in-between
• Outer flow depends on problem Sub-layer 1
𝑈+ = log( 𝑦 + ) + 𝐶
(boundary layer, channel flow, …) 𝜅

• The non-dimensional velocity profile 𝑈+ = 𝑦 +


provides relationsship between 𝑈
and 𝑢𝜏 (or 𝜏𝑤𝑎𝑙𝑙 )

8 © 2018 ANSYS, Inc.


Near-Wall Modeling Options

Two approaches are commonly used to model the flow in


the near-wall region:
• Use wall-function method
− Use empirical formulas that impose suitable conditions near to the
wall without resolving the inner portion of the boundary layer
− The rest of the boundary layer still needs to be resolved
• Use the low-Reynolds-number method outer layer
− Transport models can be integrated across the viscous sub-layer
(down to 𝑦 + ~1) inner layer

− Involves no assumptions about the near-wall variation of velocity


− Requires very fine near-wall resolution
𝑘2𝜈
− “low-Re“ refers to the turbulence Re number Re𝑡 : Re𝑡 = 𝜀

9 © 2018 ANSYS, Inc.


Wall Boundary Condition

• For closing the discretisation of the wall cell, the wall


shear stress is required in the momentum equations
• The goal of any wall treatment is to compute the wall
shear stress from the known quantities at i=1:
− 𝑈, 𝑦, 𝜇, 𝜌
𝜕𝑈 𝑈
• Viscous sublayer: 𝜏𝑤 = 𝜇
𝜕𝑦
≈𝜇
𝑦
• Log Layer:
− Contains only one unknown quantity 𝑢𝜏 (𝑈, 𝑦, 𝜇, 𝜌 are known)
1 Flux Flux
𝑈+ = ln( 𝑦 + ) + 𝐶
𝜅
𝜏𝑤 = 𝜌𝑢𝜏 𝑢𝜏

10 © 2018 ANSYS, Inc.


Wall Function Boundary Condition

• Rational:
− Why resolve the “universal” part of velocity profile if it is
flow-independent?
− Place first grid point in the log. region to avoid very fine
grid in the viscous sublayer
− Only true for equilibrium flows (𝑑𝑝Τ𝑑𝑥 = 0)
otherwise the log-law is not correct
− Note that the boundary layer still needs to be resolved – log.
only the sub-layer is “bridged”
− The grid needs to ensure that the first wall cell-center is
inside the log-layer (difficult) Flux Flux

11 © 2018 ANSYS, Inc.


Standard Wall Functions

• Set of empirical formulas based on assumption that near-


wall cell center lies within the logarithmic region of the y
boundary layer. u
1 𝑈
• Mean Velocity profile 𝑢+ + +
= ln( 𝑦 ) + 𝐶 , 𝑢 =
𝜅 𝑢𝜏
• k and ε are calculated at wall-adjacent cells using local
equilibrium assumption (turbulent kinetic energy
production equals dissipation in the log layer)
− k = ut2/Cm1/2 Saving grid cell near the wall (red)
− ε = ut3/ky
• Incorrect when cell center is down to the viscous sublayer,
or when it is above the log-region – very hard to achieve
during grid generation

12 © 2018 ANSYS, Inc.


Thickness of Logarithmic Layer

• The figure to the right is essential


− The thickness of the logarithmic layer depends on the Re U+ High Re
number of the flow!
− For high Re number (e.g. ships, airplane etc. 𝑅𝑒~107−108), Low Re
the log-layer extends to many thousands of y+ value Y+=5000

• Εasy to place first cell center into log-layer


Y+=300
− For moderate and low Re numbers (most technical flows,
e.g. turbine blades etc. 𝑅𝑒~104−106) the log-layer is very
thin. The upper limit can be lower than 𝑦+~150.
• Not easy to place first cell center into log-layer ln(y+)
− Even if first cell is placed properly for low-Re flow, the
overall boundary layer resolution will be too low
− Use of wall functions is therefore dangerous and not
recommended

13 © 2018 ANSYS, Inc.


Fine Grid Errors – Standard Wall Function

• A major problem with standard wall functions


is that the solution deteriorates under mesh
refinement
Finer Grids
• With finer meshes, the first grid point moves
into the viscous sublayer, while the wall
function still assumes a logarithmic profile –

Cf
this is inconsistent
• This behavior is not acceptable for any
numerical method as grid refinement should
always lead to an asymptotic solution
• With standard wall functions, the user gets
“punished” for mesh refinement Rex
Mesh Grid 1 Grid 2 Grid 3 Grid 4
Y+ 100 50 10 5

14 © 2018 ANSYS, Inc.


Grid sensitivity for simulation of heat
Scalable Wall Functions transfer in a sudden pipe expansion

• An attempt to avoid the ”Fine Grid Error“ of standard wall


functions
• Introduces a limiter in the y+ calculations such that y+ = min
( y+, 11.067 )
Standard WF’s
− Virtual shift is applied to the wall such that the distance between
the wall and the cell centroid becomes equivalent to y+ = 11.067
• Value where log profile and viscous sublayer profile intersect
• Reduces y+ dependency
• However, even of fine meshes (y+ ~1) it ignores the viscous
sublayer thickness
• Better than standard wall functions but still not optimal
Scalable WF’s

15 © 2018 ANSYS, Inc.


Coarse Grid Errors – Standard Wall Functions

• Coarse grid errors appear for moderate to low


Reynolds number flows Wall Function
Wall Function
• In these flows the edge of the boundary layer
can be as low as 𝒚+ ~𝟏𝟓𝟎
• When placing the first cell centre at say
𝒚+ ~𝟓𝟎, one has only very few cells inside the
TVR

boundary layer (in the current case only 3-4) Resolved solution Resolved solution
• This leads to large errors in the TVR of ~50%
relative to resolved solution
• The use of wall functions limits grid resolution
of boundary layer for moderate and low Re TVR

number flows! 𝝁𝒕
𝑻𝑽𝑹 =
𝝁

16 © 2018 ANSYS, Inc.


Y+- Insensitive Wall Treatment

• The goal is to make the solution insensitive to the y+ values of the first grid cell
• This is typically achieved by a blending of sublayer and log-layer formulations
• There are many “historical” names for this concept:
− Automatic wall treatment (used for k-ω based models in Fluent and CFX)
− Enhanced Wall Treatment (EWT) used for k-ε based formulation in Fluent (using 2-Layer formulation)
• The solution is only reasonably y+-insensitive for larger y+ values when:
− There are still enough cells inside the boundary layer
− The solution is close to equilibrium (no strong pressure gradients and separation etc.)
− The number of cells for resolving the boundary layer depends on the accuracy requirements
• For airplane simulation up to 30-40 cells are used to get an accurate representation of the
boundary layer
• For most industrial simulation ~10-15 cells are sufficient
• For complex configurations lower numbers might be used for practical reasons

17 © 2018 ANSYS, Inc.


Blended Near Wall Treatment k-w Models

• To achieve a formulation which is less sensitive


+
to wall resolution, a blending is performed 𝑈𝑆𝑢𝑏 = 𝑦+
+
1
− Blending of Sublayer and Log-layer 𝑈+ velocity profiles 𝑈𝐿𝑜𝑔 = ln 𝑦 + + 𝐶
𝜅
+ + +
− For 𝑘 − 𝜔 models there are analytical functions for 𝜔, 𝑈𝐵𝑙𝑒𝑛𝑑 = 𝑓𝑈 𝑈𝑆𝑢𝑏 , 𝑈𝐿𝑜𝑔 = 𝑓𝑈 𝑦 +
both in the viscous sublayer and the logarithmic layer –
can also be blended
− For the 𝑘-equation typically a zero gradient boundary is
applied 6𝜈 6
+
𝜔𝑆𝑢𝑏 = → 𝜔𝑆𝑢𝑏 =
• Blending is code dependent and optimized to 𝐶𝜔2 𝑦 2 𝐶𝜔2 𝑦 +2
𝑢𝜏 1
achieve 𝑦 + -insensitive wall shear stress 𝜔𝐿𝑜𝑔 = +
→ 𝜔𝐿𝑜𝑔 =
𝐶𝜇 𝜅𝑦 𝐶𝜇 𝑦 +
• This formulation is used as default in all 𝜔- +
𝜔𝐵𝑙𝑒𝑛𝑑 +
= 𝑓𝜔 𝜔𝑆𝑢𝑏 +
, 𝜔𝐿𝑜𝑔 = 𝑓𝜔 𝑦 +
equation based turbulence models in Fluent
and CFX
18 © 2018 ANSYS, Inc.
Y+-Insensitive Extension to Heat Transfer

• Mean temperature profile in boundary layer:


𝑇𝑤 −𝑇𝑝 𝜌𝑐𝑝 𝑢𝜏 This gives the wall heat flux
𝑇+ ≡ +
= 𝑒 Γ 𝑇𝑙𝑎𝑚 +
+ 𝑒 −Γ 𝑇𝑡𝑢𝑟𝑏 Γ = 𝑓(Pr, 𝑦 + )
𝑞𝑤 for the energy equation
Near wall Log region

+ + 𝜌𝑢+ 2 + + 𝜌𝑢 + 𝑃𝑟
With: 𝑇𝑙𝑎𝑚 = Pr 𝑢𝑙𝑎𝑚 + 𝑢 and 𝑇𝑡𝑢𝑟𝑏 = 𝑃𝑟𝑡 𝑢𝑡𝑢𝑟𝑏 +𝑃+ 𝑢2 + −1 𝑢𝑐+ 2 𝑢+ 2
2𝑞𝑤 2𝑞𝑤 𝑃𝑟𝑡

− qw = wall heat flux


− P = Jayatilleke function (accounts for Prandtl number effects)
− 𝑢𝑐+ is the value of u+ at the crossover between the laminar
and turbulent regions
19 © 2018 ANSYS, Inc.
Y+-Insensitive Wall Treatment

• Velocity profiles for channel flow (upper picture)


U+
− Velocity profiles are well representing the lin-log
Correlations both on fine medium and coarse meshes
− This leads to independence of wall shear stress from 𝑦 +
• Heat Transfer coefficient (St-Stanton number) for y+
flat plate (lower picture)
− Stanton number is independent of 𝑦 + except near leading
edge
− Near leading edge, the coarse grid (𝑦 + = 80) does not have a

St
sufficient number of cells inside the boundary layer
− Discrepancy to Correlation for 𝑦 + = 80 near leading edge is
therefore not a problem of near wall formulation but of
insufficient boundary layer resolution
− For larger X/Rex all solutions are identical
X[m]
20 © 2018 ANSYS, Inc.
Check Boundary Layer Resolution
Very fine mesh for transition prediction
EVR
• Boundary layers require a minimum resolution for
accurate results
• Number of cells depends on accuracy requrements
• For aerodynamic flows, one should have more than
10 cells inside the boundary layer – for highly
accurate simulation even up to Ny~30-40.
• For industrial flows around Ny~10 should be the
target
• For complex flows, it is possible that one can only mt
EVR =
afford a few prism layers (3-5). In this case accuracy m
can be compromised
• Count prism layers inside boundary layer by plotting EVR typically clearly indicates boundary layer
EVR with mesh on top (the mesh shown here is very as it has maximum in the middle of the layer
fine)

21 © 2018 ANSYS, Inc.


Check Boundary Layer Resolution and Prism Layer Height

Good Not Good

Prism layer should cover entire


Resolution on Airfoil boundary layer
• Good at leading edge (boundary
layer covered by prism layer)
• Boundary layer too thick for
prism layer at mid-chord Bad
• Boundary layer much thicker
than prism layer at trailing edge

22 © 2018 ANSYS, Inc.


Rough Wall Treatment
U 𝑦 + = 𝑦 + + 𝑘 ൗ2
+

• Wall roughness increases the wall friction and


breaks up the viscous sublayer in turbulent flows 𝑘𝑠
• The logarithmic profile moves closer to the wall
+
𝑘𝑠 𝑢𝜏
1 𝑘 =
𝑢+ = ln( 𝑦 + ) − Δ𝐵 𝜐
𝜅
1
Δ𝐵 = ln( 𝑓𝑟 ); 𝑓𝑟 = 𝑓 𝑘 + Downward shift in the logarithmic profile
𝜅
smooth wal l :
B = 0
• Increase in wall shear stress and heat transfer B
with roughness
− ks is the equivalent sand-grain roughness height rough wall :
B = f (h + )
− k+ is dimensionless sand-grain roughness height

23 © 2018 ANSYS, Inc.


Rough Wall Models

• Standard “Rough Wall” model


• “High Roughness (Icing)” models
− Primarily designed and tested for simulations of icing applications
• May be useful in other applications where the boundary layer is fully resolved
and there is surface roughness that is large relative to the near-wall mesh
− Multiple roughness correlations available
− For Spalart-Allmaras and ω-based models only
− Fine mesh near wall necessary (y+ ~1)
• And good mesh resolution throughout the boundary layer
• Rough-wall option may be set seperatly on each wall
• Both models may be used on arbitrarily fine grids

24 © 2018 ANSYS, Inc.


Flat Plate Heat Transfer with Roughness + Transition

Pimenta, M. M., Moffat, R. J. & Kays, W. M. (1975):


The turbulent boundary layer: an experimental
study of the transport of momentum and heat
with the effect of roughness. Report no. HMT-21,
Thermosciences Division, Department of
Mechanical Engineering, Stanford University.

25 © 2018 ANSYS, Inc.


Estimate Y+
• Y+ value control
− For a flat plate (flow in x-direction, leading edge at x=0, length of plate L) you can use the following
equations to calculate the distance from the wall to the first node for a given y+

0.027 𝜌𝑈 2 𝜏𝑤
𝜌𝑈𝑥 𝜏𝑤 = 𝐶𝑓 𝑥 ⋅ 𝑢𝜏 =
Re𝑥 = 𝐶𝑓 𝑥 = 1ൗ 2 𝜌
𝜇 Re𝑥 7

𝑦+𝜇 𝑦+𝑥 𝑦+𝜈 + 𝜈 1Τ


Δ𝑦 = = = = 8.6 ⋅ 𝑦 Re𝑥 14
𝜌𝑢𝜏 𝐶𝑓 0.014 𝑈
Re 𝑈 1ൗ
2
Re𝑥 7

− In this equation y is a function of x. However the power of 1/14 is very low. Therefore one can
assume (except for very small Rex)
1Τ 1Τ 𝜈 1ൗ14 − 13ൗ
14
y
Re𝑥 14
≈ Re𝐿 14 Δ𝑦 = 8.6 ⋅ 𝑦+ Re𝐿 = 8.6 ⋅ 𝑦 + 𝐿 Re𝐿
𝑈

− Note that y is the mesh spacing. For Fluent the cell center is only half of y (therefore 8.6 -> 17.2)
See also an alternative Y+ calculation method in the appendix
26 © 2018 ANSYS, Inc.
Wall Treatment - Comparison

• The formulation of a turbulence model


when integrated through the viscous
sublayer is a key aspect of turbulence
modelling
− Defines robustness Wall Shear Stress Wall Heat Transfer
− Defines accuracy Backstep Simulation
− Can cause undesired pseudo-transition • 4x the same k-εmodel with different near wall
treatment
− ML – Menter-Lechner low-Re model
− EWT – Enhanced wall treatment built on 2-Layer
formulation
− GEKO-1 exact transformation of k-ε to k-ω with k-ω wall
treatment
Makes or Breaks a Turbulence Model − V2F - k-ε model with V2F ‘elliptic blending’ wall treatment
• Results are vastly different
• GEKO is closest (SST,BSL would be similar)

27 © 2018 ANSYS, Inc.


19.0 Release

Setting up Near Wall Method in ANSYS Fluent

Turbulence Modeling Using ANSYS CFD

28 © 2018 ANSYS, Inc.


Selecting Near Wall method: e-based models and RSM

• Available near wall method in Viscous


Model panel depends on which model is
selected and for k-e models the
recommended options are
− Enhanced Wall Treatment
• Y+ insensitive 2-layer model, can resolve
viscous sublayer flow and heat transfer
phenomena if the mesh is fine enough
− Scalable Wall Functions
• Y+ insensitive model, will not resolve the
viscous sublayer no matter how fine the mesh
resolution
− Other options can be considered legacy options
that are rarely, if ever, used in the present day
29 © 2018 ANSYS, Inc.
Selecting Near Wall method: w-based models

• All w-based models used the blended near


wall treatment described on slide 18
− Known as Automatic Wall Treatment
• Subsequently, no near wall treatment
selection is necessary

30 © 2018 ANSYS, Inc.


Setting up Roughness Model

• Roughness may be defined in the boundary


conditions panel for each wall (Momentum
tab)
− Standard Roughness
• Enter non-zero value for Roughness Height
– This is the equivalent sand grain roughness
– Appropriate equivalent sand-grain roughness height can be
obtained, e.g., from H. Schlichting., “Boundary Layer
Theory”,McGraw-Hill, 1979
• For smooth walls, simply leave the roughness
height as 0
− High Roughness (Icing)
• Select from available methods for sand grain
roughness
• Different roughness models and/or roughness
heights can be specified on a per-wall basis
31 © 2018 ANSYS, Inc.
Summary

• All w-equation based models (SST, BSL, GEKO, RSM-w, …) have


− Only one optimal wall treatment – y+-insenstive (or “automatic ”)
− Do not require additional non-linear damping terms
− Do not require 2-Layer formulation
− Are compatibe with all other options in the code (especially laminar turbulent transition)
• Highest accuracy for non-equilibrium flows
• Highest accuracy for heat transfer
• If possible use y+~1 meshes and more than 10 cell inside the boundary layer (more
for highest accuracy) – for coarser meshes the models switch gradually to wall
functions

32 © 2018 ANSYS, Inc.


Appendix

Turbulence Modeling Using ANSYS CFD

33 © 2018 ANSYS, Inc.


Calculating Wall Distance for a Given y+
• Begin with the definition of y+ and rearrange: • Re is known, so use the definitions to calculate the
r Ut y y+m first cell height
+
y = y= C f = 0.058 Re l-0.2 = .0034
m Ut r
• The target y+ value and fluid properties are known,
so we need Ut, which is defined as:
t w = 12 C f rU 2 = 0.83 kg/ (m  s 2 )

t tw
Ut = w Ut = = 0.82 m/s
r r
• The wall shear stress ,tw ,can be found from the skin • We know we are aiming for y + of 50, hence:

friction coefficient, Cf: y m


+

t w = 1 C f rU 2 y= = 9x10 -4 m
2 Ut r
• A literature search suggests a formula for the skin our first cell height y should be approximately 1
friction on a plate1 thus: mm. If you instead want y+ = 1, just replace 50 with
C f = 0.058 Rel-0.2 1 in the formula above, which gives y = 1.8x10-5 m
1 An equivalent formula for internal flows, with Reynolds number based on the pipe diameter is Cf = 0.079 Red-0.25

34 © 2018 ANSYS, Inc.


Example in Predicting Near-wall Cell Size
• During the pre-processing stage, you will need to know a suitable size for the first layer of grid cells
(inflation layer) so that Y+ is in the desired range
• The actual flow-field will not be known until you have computed the solution (and indeed it is
sometimes unavoidable to have to go back and remesh your model on account of the computed Y+
values)
• To reduce the risk of needing to remesh, you may want to try and predict the cell size by
performing a hand calculation at the start, for example:
The question is what height (y)
Air at 20 m/s should the first row of grid cells be.
y
r = 1.225 kg/m3 We will use SWF, and are aiming for
m = 1.8x10-5 kg/ms
Flat plate, 1m long Y+  50
rVL
• For a flat plate, Reynolds number ( Re l = ) gives Rel = 1.4x106
m
Recall from earlier slide, flow over a surface is turbulent when ReL > 5x105

35 © 2018 ANSYS, Inc.

You might also like