Numerical Fluid Mechanics: Chungen Yin, PH.D

Download as pdf or txt
Download as pdf or txt
You are on page 1of 28

Numerical Fluid Mechanics Numerical Fluid Mechanics

Chungen Yin, Ph.D.

Pontoppidanstræde 101, room 8

Lecture 1 Introduction to CFD

Lecture 2 Finite volume method

Lecture 3 Finite volume method (cont)


Numerical Fluid Mechanics

Lecture 4 Solvers and algorithm

Lecture 5 Error/uncertainty; Discretization vs. CFD accuracy

Lecture 6 Advanced meshing: Tips & tricks

Lecture 7 Transient problems

Lecture 8 Turbulence

Lecture 9 Heat transfer

Lecture 10 Project-related topic


2

2
Numerical Fluid Mechanics Lecture
8
Turbulence modeling

• Turbulence (energy cascade, scales...)

• RANS modeling & Near-wall modeling

Turbulence

· What is turbulence?
Numerical Fluid Mechanics

· Effect of turbulence on N-S eq.

· Reynolds averaging.

· Reynolds stresses.

Laminar flow vs. Turbulent flow: Animation1


Animation2

4
Turbulence: (1) High Re numbers

Turbulent flows always occur at high Reynolds numbers. They are caused by
Numerical Fluid Mechanics

the complex interaction between the viscous terms and the inertia terms in the
momentum equations.

Turbulent, high Reynolds


number jet

Laminar, low Reynolds


number free stream flow
5

5
Numerical Fluid Mechanics

Transition in a jet flow

6
Numerical Fluid Mechanics

Small Structure Large Structure

Large-scale vs. small-scale structures

External flows: ρUL


where Re L ≡
μ
Rex ≥ 5×10 5 along a surface
Numerical Fluid Mechanics

L = x, D, Dh, etc.
ReD ≥ 20,000 around an obstacle
Other factors such as free-
stream turbulence, surface
Internal flows: conditions, and disturbances
may cause earlier transition to
Re Dh ≥ 2,200
turbulent flow.

Natural convection:
gβΔTL3ρ
Ra ≥ 10 − 10
8 10
where Ra ≡
μα
Boundary layers:
Re ≥ 105

The Re number thresholds for different flows


8

8
Turbulence: (2) turbulent flows are chaotic
Numerical Fluid Mechanics

· One characteristic of turbulent flows is their irregularity or randomness. A full


deterministic approach is very difficult. Turbulent flows are usually described
statistically. Turbulent flows are always chaotic. But not all chaotic flows are
9
turbulent.

Turbulence: (3) diffusivity

·
Numerical Fluid Mechanics

· The diffusivity of turbulence causes rapid mixing and increased rates of


momentum, heat, and mass transfer. A flow that looks random but does not
exhibit the spreading of velocity fluctuations through the surrounding fluid is not
turbulent. If a flow is chaotic, but not diffusive, it is not turbulent.
10

10
Turbulence: (4) dissipation

·
Numerical Fluid Mechanics

· Turbulent flows are dissipative. Kinetic energy gets converted into heat due to
viscous shear stresses. Turbulent flows die out quickly when no energy is
supplied. Random motions that have insignificant viscous losses, such as
random sound waves, are not turbulent.
11

11

Turbulence: (5) rotation and vorticity

Turbulent flows are rotational; that is, they have non-zero vorticity.
Numerical Fluid Mechanics

Mechanisms such as the stretching of three-dimensional vortices play a key


role in turbulence.

Vortices

12

12
What’s turbulence — Summary
Numerical Fluid Mechanics · Main characteristics:
▫ One characteristic of turbulent flows is their irregularity or
randomness. A full deterministic approach is very difficult.
Turbulent flows are usually described statistically. Turbulent flows
are always chaotic. But not all chaotic flows are turbulent. For
example, waves in the ocean can be chaotic but are not
necessarily turbulent.
▫ The diffusivity of turbulence causes rapid mixing and increased
rates of momentum, heat, and mass transfer. A flow that looks
random but does not exhibit the spreading of velocity fluctuations
through the surrounding fluid is not turbulent. If a flow is chaotic,
but not diffusive, it is not turbulent. The trail left behind a jet
plane that seems chaotic, but does not diffuse for miles is then
not turbulent.
▫ Turbulent flows always occur at high Reynolds numbers. They
are caused by the complex interaction between the viscous terms
and the inertia terms in the momentum equations.
13

13

What’s turbulence — Summary (cont)

▫ Turbulent flows are rotational; that is, they have non-zero


vorticity. Mechanisms such as the stretching of three-dimensional
Numerical Fluid Mechanics

vortices play a key role in turbulence.


▫ Turbulent flows are dissipative. Kinetic energy is converted into
heat due to viscous shear stresses. Turbulent flows die out quickly
when no energy is supplied. Random motions that have
insignificant viscous losses, e.g., random sound waves, are not
turbulent.
▫ Turbulence is a continuum phenomenon. Even the smallest
eddies are significantly larger than the molecular scales.
Turbulence is therefore governed by the equations of fluid
mechanics.
▫ Turbulent flows are flows. Turbulence is a feature of fluid flow,
flow
not of the fluid. When the Reynolds number is high enough, most
of the dynamics of turbulence are the same whether the fluid is an
actual fluid or a gas. Most of the dynamics are then independent
of the properties of the fluid.
14

14
Turbulent boundary layer

Top view
Numerical Fluid Mechanics

Side view

Merging of turbulent spots and transition to turbulence


in a natural flat plate boundary layer.
15

15

Turbulent boundary layer (cont)


Numerical Fluid Mechanics

Transition in boundary layer flow

16

16
Turbulent boundary layer (cont)
Numerical Fluid Mechanics

T-S waves Turbulent spots Fully turbulent flow

17

17

Energy Cascade
Numerical Fluid Mechanics

• Larger, higher-energy eddies, transfer energy to smaller eddies via


vortex stretching
- Larger eddies derive energy from mean flow
- Large eddy size and velocity on order of mean flow

• Smallest eddies convert kinetic energy into thermal energy via viscous
dissipation
- Rate at which energy is dissipated is set by rate at which they receive energy
from the larger eddies at start of cascade
18

18
Numerical Fluid Mechanics

19

19

Vortex Stretching
· The largest turbulent eddies interact with and extract energy from the
mean flow by a process called vortex stretching
Numerical Fluid Mechanics

· Existence of eddies implies rotation or vorticity, which is concentrated


along contorted vortex lines or bundles.
· Vortex lines/bundles become distorted from the induced velocities of
the larger eddies. As as end points of a vortex line move randomly
further apart, (1) the vortex line increases in length but decreases in
diameter; (2) vorticity increases because angular momentum is
nearly conserved, and most of the vorticity is contained within the
smallest eddies. Kinetic energy increases at rate equivalent to the
work done by large-scale motion that stretches the bundle.
· Viscous dissipation in the smallest eddies converts kinetic energy into
thermal energy.
· Vortex-stretching cascade process maintains the turbulence and
dissipation is approximately equal to the rate of production of
turbulent kinetic energy.
20

20
Vortex Stretching (cont)
Numerical Fluid Mechanics

t1 t2 t3

t4 t5 t6
21
(Baldyga and Bourne, 1984)

21

Smallest Scales of Turbulence


• Smallest eddy (Kolmogorov) scales:
Numerical Fluid Mechanics

- large eddy energy supply rate ~ small eddy energy dissipation rate
→ ε = − dk / dt

k ≡ 1 (u ′2 + v′2 + w′2 ) is specific turbulent kinetic energy [m2/s2];


2
ε is dissipation rate of k , [m2/s3]

• Motion at smallest scales depends on dissipation rate, ε , and kinematic


viscosity, ν [m2/s]

• From dimensional analysis,


η
η = (ν 3 / ε )1 / 4 [m] τ = (ν / ε )1 / 2 [s] Vˆ = = (νε )1 / 4 [m/s]
τ

22

22
Small scales vs. Large scales
• Largest eddy scales

- Assume l is characteristic of larger eddy size;


Numerical Fluid Mechanics

- Dimensional analysis to estimate order of large eddy supply rate of k as


,k / τ
turnover

- τ turnover is a time scale associated with larger eddies; the order of τ turnover
can be estimated by τ turnover = l / k
1/ 2

• Since ε ~ k / τ turnover : ε ~ k3/ 2 / l or l ~ k3/ 2 / ε

• Compare l with η
3/ 4
l l l × ( k 3 / 2 / l)1 / 4 ⎛ k1 / 2l ⎞ l
= ≈ =⎜ ⎟ = (ReT )3 / 4 >> 1
η (ν 3 / ε )1 / 4 ν 3/ 4 ⎜ ν ⎟ η
⎝ ⎠
k1 / 2l
ReT = Turbulence Reynolds number
23 ν

23

Energy spectrum vs. Wave number (log-log scales)



1 u ′u ′ = ∫ E (κ ) dκ
2 i i 0
(turbulent kinetic energy)
Numerical Fluid Mechanics

3 1
l ~ k 2 /ε η = (ν 3 / ε ) 4

k wave number ( κ ) l integral scale η Kolmogorov scale


24

24
Implication of scales
Numerical Fluid Mechanics • Consider a mesh fine enough to resolve smallest eddies. An example:

(2D channel flow)

Cells in 3D needed:

N cells ~ (4l / η )3

u H
N cells = (3 Reτ )9 / 4 where Reτ = τ [Moser & Moin 1984;
2ν Kim, Moin & Moser, 1987]

For turbulent flows:


Re H = 30800 Reτ = 800 N cells = 4 × 107
uτ ~ 5%U

25

25

DNS (Direct Numerical Simulation)

• “DNS” is the solution of the time-dependent Navier-Stokes equations


Numerical Fluid Mechanics

without modeling

⎛ ∂ui ∂u ⎞ ∂p ∂ ⎛⎜ ∂ui ⎞
ρ⎜ +uj i ⎟ = − + μ ⎟
⎜ ∂t ∂x ⎟ ∂x ∂x ⎜ ∂x j ⎟
⎝ j ⎠ i j ⎝ ⎠

- Numerical time step size required Δt ~ τ


0.003 H
- For the 2D channel example Δt 2d Channel ≈ ; number of time steps
~48000 Reτ uτ

- DNS is not suitable for practical industrial CFD

- DNS only for simple geometry and low turbulence Reynolds number;
however, a useful research tool.

26

26
Removing the small scales

• Two methods can be used to eliminate need to resolve small scales:


Numerical Fluid Mechanics

- Reynolds Averaging: Transport equations for mean flow quantities are


solved; All scales of turbulence are modeled; Transient solution Δt is set by
global unsteadiness;

- Filtering (LES): Transport equations for ‘resolvable scales’; Resolves larger


eddies, models smaller ones; Inherently unsteady, Δt set by small eddies

• Both methods introduce additional terms that must be modeled for


closure.

27

27
Numerical Fluid Mechanics

28

28
RANS (Reynolds Averaged Navier-Stokes eqns)

Numerical Fluid Mechanics

29

29

RANS modeling – Ensemble (time) Averaging

• Consider a point in a given flow field,


Numerical Fluid Mechanics

r r r
ui ( x , t ) = U i ( x , t ) + ui′ ( x , t )

30

30
r 1 N ( n) r
• Ensemble (phase) average: U i ( x , t ) = lim
N →∞ N n =1
ui ( x , t ) ∑
Numerical Fluid Mechanics

31

31

Deriving RANS equations

• Substitute mean plus fluctuations in the instantaneous NS equations


Numerical Fluid Mechanics

and average,

⎛ ∂ (U i + ui′ ) ∂ (U i + ui′ ) ⎞⎟ ∂ ( p + p′) ∂ ⎛ ∂ (U i + ui′ ) ⎞


ρ⎜ + (U j + u ′j ) =− + ⎜μ ⎟
⎜ ∂t ∂x j ⎟ ∂xi ∂x j ⎜ ∂ x ⎟
⎝ ⎠ ⎝ j ⎠

• Use some averaging rules, such as

If x = X + x' and y = Y + y'

Then X = X ; x' = 0 ; x Y = XY ; x' Y = 0 ; x y = XY + x' y '; x ' y ' ≠ 0 ;...

End of L9. DIY: derive RANS equations from NS equations.


32

32
RANS equations
Numerical Fluid Mechanics • Reynolds Averaged Navier-Stokes (RANS) equations:

ρ⎜
⎛ ∂U i
+U j
∂U i ⎞⎟
=−
∂p
+
∂ ⎜μ ⎟+
(
⎛ ∂U i ⎞ ∂ − ρ ui ' u j ' )
⎜ ∂t ∂x j ⎟⎠ ∂xi ∂x j ⎜ ∂x j ⎟ ∂x j
⎝ ⎝ ⎠

• Same in form with NS equations

- The variables U i , p are now mean flow quantities

- One new term appears − ρ ui ' u j ' : called Reynolds stresses, to be modeled.

33

33

Turbulence modeling approaches


Numerical Fluid Mechanics

• Boussinesq approach
- isotropic
- based on dimensional analysis

• Reynolds stress transport models


- no assumption of isotropy
- contains more “physics”
- most complex and computationally expensive

34

34
Boussinesq approach (1)

• Relates the Reynolds stresses to the mean flow by a turbulent (eddy)


Numerical Fluid Mechanics

viscosity μt

Viscous stresses Turbulent / Reynolds stresses

⎛ ∂ui ∂u j ⎞ Analogy method ⎛ ∂u ∂u j ⎞


τ ij = τ ji = μ ⎜ + ⎟ − ρ ui ' u j ' = μ t ⎜ i + ⎟
⎜ ∂x j ∂xi ⎟ Boussinesq (1877) ⎜ ∂ x j ∂ xi ⎟
⎝ ⎠ ⎝ ⎠

- Assumptions valid at molecular level, not necessarily valid at macroscopic


level

- μt is a scalar

35

35

Boussinesq approach (2): Modeling μt

• All the models under Boussinesq approach focus on modeling μt


Numerical Fluid Mechanics

- Basic approach: Dimensional analysis / Analogy method

ν t = μt / ρ [m2/s] need (1) a velocity scale Vˆ ; (2) a length scale, l .

Molecular viscosity, ν Turbulent viscosity, ν t


(based on kinetic gas theory)
Analogy method ν t ∝ Vˆ × l
ν ≈ 12 C λ
Vˆ , l: velocity & length
C : mean molecular speed (=1.35Usound) scales, characterizing the
λ : mean free path of molecules large-scale turbulent motions

• Models classified in terms of number of transport equations solved, e.g.

- Zero-equation / One-equation / Two-equation model / ...

36

36
Boussinesq approach (3): Zero equation models

• Prandtl mixing length model


Numerical Fluid Mechanics

- assume a velocity scale, Vˆ = Vmix ∝ l mix 2Sij Sij

- require that the length scale l mix be prescribed


ν t = 12 Vmix l mix

- economical but too crude; need to estimate “right” l mix for different problems

37

37

Boussinesq approach (4): One equation models

• Traditionally, one-equation models are based on a transport equation


Numerical Fluid Mechanics

for k ≡ 1 (u ′ + v′ + w′ )
2 2 2
2

- then the velocity scale, Vˆ = k

- Use of transport equations allows ‘history effects’ to be accounted for.

• A very problem-dependent length scale must be specified algebraically


based on the mean flow.

38

38
Boussinesq approach (5): Two equation models

• Two transport equations are solved, giving two independent scales for
νt
Numerical Fluid Mechanics

calculating

- Virtually all use the transport equation for the turbulent kinetic energy k

- Several transport variables have been proposed, based on dimensional


arguments, and used for second transport equation, e.g.,

Kolmogorov, ω : νt ∝ k /ω
ω is specific dissipation rate, defined in terms of large
eddy scales that define supply rate of k .

Chou, ε : νt ∝ k2 /ε

- Boussinesq relation still used for Reynolds Stresses.

39

39

Boussinesq approach (5): Standard k − ε model


∂k ∂k ⎛ν ⎞
+ uj = ∇ ⋅ ⎜⎜ t ∇k ⎟⎟ + ℜ
12−3 ε Cε 1 = 1.44
∂t ∂x j ⎝ σk ⎠
Numerical Fluid Mechanics

{ 123 14243 source


transient Cε 2 = 1.92
convection diffusion
σ k = 1.0
∂ε ∂ε ⎛ νt ⎞ ℜ×ε ε2
+ uj ⎜
= ∇⋅⎜ ⎟
∇k ⎟ + Cε 1 − Cε 2 σ ε = 1. 3
∂t
{ ∂x j ⎝ σε ⎠ 1 4 4k42444 3k
transient 123 14243 source
convection diffusion

k 3/ 2
Vˆ = k 1/ 2 l= ν t = C μ × Vˆ × l = C μ k 2 / ε C μ = 0.09
ε

• Strengths
- Robust & economical; Reasonable accuracy for a wide range of flows

• Weaknesses
- overly diffusive for many situations (flows involving strong streamline
curvature, swirl, rotation, separating flows, low-Re flows)
40

40
Boussinesq approach (5):
Numerical Fluid Mechanics RNG & Realizable k − ε models

• RNG

- Improved performance over standard version for rapidly strained flows and
flows with streamline curvature;

• Realizable

- Performance generally exceeds the standard version; Good for complex flows
with large strain rates

• Both still suffers from the inherent limitations of an isotropic eddy-


viscosity model.

41

41

Boussinesq approach (6): Faults in assumption

• Boussinesq Rij = 2 μt Sij


Numerical Fluid Mechanics

- Is this simple linear relationship sufficient?


Rij is strongly dependent on flow conditions and history

Rij changes at rates not entirely related to mean flow processes

- Rij is not strictly aligned with Sij for flows with: (1) sudden changes in mean
strain rate; (2) extra rates of strain (e.g., strong streamline curvature); (3)
rotating fluids; (4) stress-induced secondary flows.

• Modifications to two-equation models cannot be generalized for


arbitrary flows.

42

42
Reynolds Stress Models (RSM)
• Starting point is the exact transport equations for the transport of
Reynolds stresses, Rij = − ρ ui′u ′j
Numerical Fluid Mechanics

• The transport equations can be obtained in this way,

ui′ NS (u j ) + u ′j NS (ui ) = 0
- The resulting equations contain several terms that must be modeled.

• Characteristics of RSM
- Effects of curvature, swirl, and rotation are directly accounted for in the
transport equations for the Reynolds stresses Æ When anisotropy of
turbulence significantly affects the mean flow, consider RSM;
- More CPU resources is needed;
- Strong coupling between Reynolds stresses and the mean flow.

43

43

Near-Wall Modeling
Numerical Fluid Mechanics

• Walls are main source of vorticity and turbulence;


• Accurate near-wall modeling is important for most engineering applications.
44

44
Near-Wall Modeling: (2) Important variables

· Important variables:
Numerical Fluid Mechanics

▫ Distance from the wall: y.


▫ Wall shear stress: τw. The force exerted on a flat plate is the area
times the wall shear stress.
▫ Density: ρ.
▫ Dynamic viscosity: μ.
▫ Kinematic viscosity: ν.
▫ Velocity at y: U.
▫ The friction velocity: uτ = (τw/ρ)1/2.

· We can define a Reynolds number based on the distance to the


wall using the friction velocity: y+ = yuτ/ν.
· We can also make the velocity at y dimensionless using the
friction velocity: u+ = U/ uτ.

45

45

Near-Wall Modeling: (3) BL structure


Numerical Fluid Mechanics

u+=y+

y+=1

46

46
Near-Wall Modeling: (4) Standard wall function
· The experimental boundary layer profile can be used to
calculate τw. However, this requires y+ for the cell adjacent to
Numerical Fluid Mechanics

the wall to be calculated iteratively.


· In order to save calculation time, the following explicit set of
correlations is usually solved instead:

ρ C 1μ/ 4k 1P/ 2 yP y * ≥ 11.225 ⇒ U ∗ = κ1 ln(Ey∗ ) U P C 1μ/ 4k 1P/ 2


y∗ = ⇒ ⇒τw =
μ y * < 11.225 ⇒ U ∗ = y∗ U∗ / ρ

▫ Up is the velocity in the center of the cell adjacent to the wall.


▫ yp is the distance between the wall and the cell center.
▫ kp is the turbulent kinetic energy in the cell center.
▫ κ is the von Karman constant (0.42).
▫ E is an empirical constant that depends on the roughness of the
walls (9.8 for smooth surfaces).
47

47

Near-Wall Modeling: (5) Momentum eqn


· The objective is to take the effects of the boundary layer correctly
into account without having to use a mesh that is so fine that the flow
Numerical Fluid Mechanics

pattern in the layer can be calculated explicitly.


· Using the no-slip boundary condition at wall, velocities at the nodes at
the wall equal those of the wall.
· The shear stress in the cell adjacent to the wall is calculated using the
correlations shown in the previous slide.
· This allows the first grid point to be placed away from the wall,
typically at 30 < y+ < 300, and the flow in the viscous sublayer and
buffer layer does not have to be resolved.
· This approach is called the “standard wall function” approach.
· The correlations shown in the previous slide are for steady state
(“equilibrium”) flow conditions. Improvements, “non-equilibrium wall
functions,” are available that can give improved predictions for flows
with strong separation and large adverse pressure gradients.

48

48
Near-Wall Modeling: (6) Two-layer zonal model

· A disadvantage of the wall-


function approach is that it
Numerical Fluid Mechanics

relies on empirical
correlations. Rey > 200
· The two-layer zonal model
does not. It is used for low-Re
flows or flows with complex Rey < 200
near-wall phenomena.
· Zones distinguished by a
wall-distance-based turbulent
Reynolds number:
ρ ky
Re y ≡ μ
· The flow pattern in the boundary layer is calculated explicitly.
· Regular turbulence models are used in the turbulent core region.
· Only k equation is solved in the viscosity-affected region.
· ε is computed using a correlation for the turbulent length scale.
·
49 Zoning is dynamic and solution adaptive.

49

Near-Wall Modeling: (7) Turbulence

· The turbulence structure in the boundary layer is highly


Numerical Fluid Mechanics

anisotropic.

· ε and k require special treatment at the walls.

· Furthermore, special turbulence models are available for the


low Reynolds number region in the boundary layer.

· These are aptly called “low Reynolds number” models.

· This is still a very active area of research, and we will not


discuss those here in detail.

50

50
Near-Wall Modeling: (8) Comparison
Numerical Fluid Mechanics Approach Strengths Weaknesses

Standard wall- Robust, economical, Empirically based on


functions reasonably accurate simple high- Re flows;
poor for low-Re
effects, massive
transpiration, PGs,
strong body forces,
highly 3D flows
Non-equilibrium Accounts for Poor for low-Re
wall-functions pressure gradient effects, massive
(PG) effects. transpiration (blowing,
Improved predictions suction), severe PGs,
for separation, strong body forces,
reattachment, highly 3D flows
impingement
Two-layer zonal Does not rely on Requires finer mesh
model empirical law-of-the- resolution and
wall relations, good therefore larger cpu
for complex flows, and memory
applicable to low-Re resources
flows

51

51

Near-Wall Modeling: (9) Grid guidelines

Wall Function Two-Layer Zonal


Numerical Fluid Mechanics

Approach Model Approach

· First grid point in log-law · First grid point at y+ ≈ 1.


region: +
30 ≤ y ≤ 300 · At least ten grid points within
· Gradual expansion in cell size buffer and sublayers.
away from the wall. · Better to use stretched
· Better to use stretched quad/hex cells for economy.
quad/hex cells for economy.
52

52
Near-Wall Modeling: (10) for improved solution

· When very accurate (say 2%) drag, lift, or torque predictions


are required, the boundary layer and flow separation require
Numerical Fluid Mechanics

accurate modeling.
· The following practices will improve prediction accuracy:
▫ Use boundary layer meshes consisting of quads, hexes, or prisms.
Avoid using pyramid or tetrahedral cells immediately adjacent to
the wall.
▫ After converging the tetrahedral
prism layer
solution, use the surface volume mesh
efficiently
integral reporting option to is generated resolves
check if y+ is in the right automatically
boundary layer
range, and if not refine the
grid using adaption.
▫ For best predictions use the
two-layer zonal model and triangular surface
completely resolve the flow mesh on car body is
in the whole boundary quick and easy to
layer. create
53

53

Summary of Fluent-included RANS-based models


Numerical Fluid Mechanics

54

54
Summary of Fluent-included RANS-based models

Numerical Fluid Mechanics

55

55

Discussion / DIY@home:
Numerical Fluid Mechanics

• derive RANS equations from NS equations;

• try to derive the transport equations for Reynolds stresses

• (if you have time) Computing using different RANS models on a fine
enough mesh, and comparing CFD solutions with measurements
(Driver and Seegmiller, 1985). (or visit
http://cfd.me.umist.ac.uk/ercoftac/ for such kinds of measurements)

Re H = 3.74 × 10 4
α = 0°

56

56

You might also like