UNSTEADY FLOW MODELLING AND COMPUTATION
Franck Nicoud
University Montpellier II – I3M CNRS UMR 5149 and
CERFACS
MOTIVATION - 1
• CFD of steady flow is now mature
• Many industrial codes available, robust and accurate
• Complex flow physics included: moving geometries, turbulence, combustion, mixing, fluid-X coupling
• But only the averages are computed
MOTIVATION - 2
• Averages are not always enough
(instabilities, growth rate, vortex shedding)
• Averages are even not always meaningful
T1 T2>T1
T
time
Oscillating flame T2
T1
Prob(T=Tmean)=0 !!
MOTIVATION - 3
• Some phenomena are unsteady in nature.
Ex: turbulence in a channel with ablation
O. Cabrit – CERFACS & UM2
MOTIVATION - 4
• Some phenomena are unsteady in nature.
Ex: ignition of an helicopter engine
Y. Sommerer & M. Boileau CERFACS
MOTIVATION - 5
• Some phenomena are unsteady in nature.
Ex: thermoacoustic instability - Experiment
D. Durox, T. Schuller, S. Candel – EM2C
MOTIVATION - 6
• Some phenomena are unsteady in nature.
Ex: thermoacoustic instability - CFD
P. Schmitt – CERFACS
PARALLEL COMPUTING
• www.top500.org – june 2007
# Site Computer
1 DOE/NNSA/LLNL United States
BlueGene/L - eServer Blue Gene Solution IBM
2 Oak Ridge National Laboratory United States
Jaguar - Cray XT4/XT3 Cray Inc.
3 NNSA/Sandia National Laboratories United States
Red Storm - Sandia/ Cray Red Storm, Opteron 2.4 GHz dual core
Cray Inc.
4 IBM Thomas J. Watson Research Center United States
BGW - eServer Blue Gene Solution IBM
5
Stony Brook/BNL, New York Center for Computional Sciences
United States
New York Blue - eServer Blue Gene Solution IBM
6 DOE/NNSA/LLNL United States
ASC Purple - eServer pSeries p5 575 1.9 GHz
IBM
7
Rensselaer Polytechnic Institute, Computional Center for Nanotechnology Innovations
United States
eServer Blue Gene Solution IBM
8 NCSA
United States
Abe - PowerEdge 1955, 2.33 GHz, Infiniband Dell
9 Barcelona Supercomputing Center Spain
MareNostrum - BladeCenter JS21 Cluster, PPC 970, 2.3 GHz, Myrinet
IBM
10 000 processors or more
PARALLEL COMPUTING
• Large scale unsteady computations require huge computing resources, an efficient codes …
processors
Speed up
SOME KEY INGREDIENTS
• Flow physics:
– turbulence, combustion modeling, heat loss, radiative transfer, wall treatment, chemistry, two-phase flow, acoustics/flame
coupling, mode interaction, …
• Numerics:
– non-dissipative, low dispersion scheme, robustness, linear stability, non-linear stability, conservativity, high order,
unstructured environment, parallel computing, error analysis, …
• Boundary conditions:
– characteristic decomposition, turbulence injection, non-reflecting, pulsating conditions, complex impedance, …
BASIC EQUATIONS
reacting, multi-species gaseous mixture
SIMPLER BASIC EQUATIONS
• Navier-Stokes equations for a compressible fluid
• Finite speed of propagation of pressure waves
= 0
∂ + ∂
∂
∂
i i
x u t
ρ ρ
( )
j ij i
j i j
i
x x
u P x u
t u
∂
∂τ
∂ ρ ∂
∂
ρ + ∂ = − +
∂
∂( )
k k ij
i j j
i
ij x
u x
u x
u
∂ µδ ∂
∂
∂
∂ µ ∂
τ 3
− 2
+
=
P rT
ρ
=( ) ( )
j j j
ij i j
ij i
i
j x
q x
u x
P E u
x u t
E
∂
∂
∂ τ
∂
∂ δ ρ ∂
∂∂
ρ + = − + −
∂
∂( )
i
i x
q T
∂ λ ∂
−
=
SIMPLER BASIC EQUATIONS
• Navier-Stokes equations for an incompressible fluid
• Infinite speed of propagation of pressure waves
• Contain turbulence
= 0
∂
∂
i i
x u
( )
j ij i
j i j
i
x x
u P x u
t u
∂
∂τ
∂ ρ ∂
∂
∂
ρ + = − +
∂
∂( )
+
=
i j j
i
ij x
u x
u
∂
∂
∂ µ ∂ τ
ρ
0ρ
=Turbulence
Turbulence
TURBULENCE IS
EVERYWHERE
TURBULENCE
Leonardo da Vinci
TURBULENCE
The flow regime (laminar vs turbulent) depends on the Reynolds number :
Re = Ud
ν
Velocity Length scale
viscosity
Re
laminar turbulent
TURBULENCE
•Turbulence is increasing mixing
–Most often favorable (flames can stay in combustors)
–Some drawbacks (drag, relaminarization techniques…)
TURBULENCE AND CHAOS
ONERA WIND TUNNEL
CHAOS OF THE POOR
] 1 , 1 [ ,
2
1
2 01
= − ∈ −
+
v v
v
t t66667 .
0 v
6667 .
0
00
= ersus v =
v
TURBULENCE
• The flow is very sensitive to the initial/boundary conditions. This leads to the impression of chaos,
because the tiny details of the operating conditions are never known
• This sensitivity is related to the non-linear (convective) terms
• Need for an academic turbulent case
HOMOGENEOUS ISOTROPIC TURBULENCE
• No boundary
• L-periodic 3D domain
• being any physical quantity
L L
L
( ) , ˆ , 2 Z
3e L
t φ
iπ
φ x = ∑
⋅k =
k
x k k
Ω ∫∫∫ ( )
Ω
⋅
= 1
3,
− 1 2 3ˆ t e dx dx dx
L
i k
x
x
kφ φ
( ) x , t
φ
BUDGETS IN HIT
• Spatial averaging
• Momentum
• Turbulent Kinetic Energy (TKE)
= 0 dt
u d i
4 4 4 3 4
4 4 2 1
rate n dissipatio
TKE : 2 2
2 2
/
ε
ν
∂ + ∂
∂
− ∂
=
i j j
i i
x u x
u dt
u d
∫∫∫ ( )
Ω
= 1
3 1 2 3)
( dx dx dx
t L φ x
φ
FLUX OF TKE
• For any K>0 and any
• KE of scales larger than 2
π
/K:• Non linear terms are responsible for the energy transfer from the largest to the smallest scales
( )
3:
, 2
, ˆ Z
e L t
K
i
π
φ
φ = ∑ =
<
⋅
<
x k
k k
x k k
j i j i i
x u u
dt u u d
∂
− ∂
−
= < < >
<
2 ε
2 /
( ) x , t
φ
TURBULENCE: A SCENARIO
1. The largest scales of the flow are fed in energy (l0)
• Must be done at rate
2. The energy is transferred to smaller and smaller scales (l)
• Must be done at rate
3. When scales become small enough (
η
), they become sensitive to the molecular viscosity and are eventually dissipated• Must occur when:
0 3 0
l
≡ u ε
l u3 ε ≡
≡1 νηK uK
SCALES IN TURBULENCE
• Kolmogorov scales (the smallest ones)
• Large-to-small scales ratio
• Remark: in CFD, the number of grid points in each direction must follow the same scaling
4 / 1
4 / 3
ε
η
K≡ ν u
K≡ ν
1/4ε
1/44 / 3 0
0
R
l
K
η ≡
TURBULENCE SPECTRUM
( )
u ( ,t)u ( ,t)Rij r = i x j x+ r
• Two-point correlation tensor:
• Velocity spectrum tensor
• Energy spectrum: E(k)dk is the kinetic energy contained in the scales whose wave number are between k and k+dk
( )
=∫∫∫
− ⋅3
3 2
3 ( ) 1
) 2 (
1
R
i ij
ij k R r e krdr dr dr
φ π
( )
=∫∫∫
⋅3
3 2
) 1
(
R
i ij
ij e dk dk dk
R r φ k k r
( )
k k
S
k dS k
E ii
radius of
sphere :
) (
) ( ) 2 (
1
∫
= φ k
i iu u dk
k
E 2
) 1 ( :
that shows
one
0
∫
=∞
KOLMOGOROV ASSUMPTION
• After Kolmogorov (1941), there is an inertial zone
(l0<<l<<
η
) where E(k) only depends onε
and l (viz. k).It follows that:
E ( k ) = C
Kε
2/3k
−5/3( ( ) )
ln E k k
−5/3k
ln
TURBULENCE SPECTRUM
CHANNEL
ONERA WIND TUNNEL
JET
3 / 5 3
/
)
2( k ∝ k
−E ε
Well supported by the experiments
TURBULENCE IN CFD
• Turbulence is contained in the Navier-Stokes equations
• So it is deterministic
• BUT: because the flow is so sensitive to the (unknown) details of IC and BC, only averages can be predicted, or used for comparison purposes ex: numerical/experimental comparisons
• “simply” resolve the Navier-Stokes equations to obtain turbulence: Direct Numerical Simulation
TURBULENCE IN CFD
TURBULENCE IN CFD
TURBULENCE IN CFD
TURBULENCE IN CFD
DNS OF ISOTROPIC
TURBULENCE
DIRECT NUMERICAL
SIMULATION OF TURBULENCE
• Solve the Navier-Stokes equations and represent all scales in space and time
• Compute the average, variance, of the unsteady solution
• The main limitation comes from the computer resources required:
– the number of points required scales like – The CPU time scales like
• In many practical applications, the Reynolds number is large, of order 106 or more
( )
R03/4 3 = R09/43
R0
THE RANS APPROACH
• Ensemble average the (incompressible) Navier-Stokes equations
• Reynolds decomposition
• Reynolds equations:
• A model for the Reynolds stress is required
= 0
∂
∂
i i
x u
j ij i
j j i i
x x
P x
u u t
u
∂ τ
∂
∂
∂
∂ ρ ∂
ρ + = − +
∂
∂
i'
i
i u u
u = +
= 0
∂
∂
i i
x
u
( )
j
j i ij
i j
j i i
x
u u x
P x
u u t
u
∂ ρ τ
∂
∂
∂
∂ ρ ∂
ρ + = − + − ' '
∂
∂
' 'u ρu
−
DNS vs RANS in a combustor
Modern combustion chamber - TURBOMECA Multiperforated plate
Solid plate Dilution hole
DNS vs RANS in a combustor
• RANS: used routinely during the design process.
• Approx. 106 nodes for the whole geometry
•DNS: used to know more about the flow physics in the multi-perforated plate region
•Approx. 106 nodes for only one perforation
THE RANS APPROACH
• Intense scientific activity in the ’70, ’80 and ’90 to derive the ultimate turbulence model.
Ex: k-ε, RSM, k-ε-v2, …
• No general model
• No flow dynamics
• Thanks to increasing available computer resources, unsteady calculations become affordable
Jet of hot gas
DNS RANS
RANS – LES - DNS
• Reynolds-Averaged Navier-Stokes:
– Relies on a model to account for the turbulence effects – efficient but not predictive
• Direct Numerical Simulation:
– The only model is Navier-Stokes
– predictive but not tractable for practical applications
• Large Eddy Simulation:
– Relies on a model for the smallest scales, more universal – Resolves the largest scales
– Predictive and tractable
Large-Eddy Simulation
RANS – LES - DNS
time
Streamwise velocity
RANS
DNS LES
Large Eddy Simulation
Wave number
Energy spectrum
« Navier-Stokes » Model
• Formally: replace the average operator by a spatial filtering to obtain the LES equations
( )
φ( ) ( )
φφ t =
∫∫∫
t G − d = G ∗R
ξ ξ
x ξ
x 3
3
, ,
LES equations
• Assumes small commutation errors
• Filter the incompressible equations to form :
• Sub-grid scale stress tensor to be modeled
= 0
∂
∂
i i
x
u
( )
j sgs ij ij
i j
j i i
x x
P x
u u t
u
∂ τ τ
∂
∂
∂
∂ ρ ∂
ρ + = − + +
∂
∂
j i j
i sgs
ij
ρ u u ρ u u
τ = −
NS
The Smagorinsky model
• From dimensional consideration, simply assume:
• The Smagorinsky constant is fixed so that the proper dissipation rate is produced, Cs =0.18
( )
s ij ijsgs = C ∆ 2 2S S
ν
∂ + ∂
∂
= ∂
=
−
i j j
i ij
ij sgs ij
sgs kk sgs
ij x
u x
S u
S 2
with 1 ,
3 2
1τ δ ρν
τ
The Smagorinsky model
• The sgs dissipation is always positive
• Very simple to implement, no extra CPU time
• Any mean gradient induces sub-grid scale activity and dissipation, even in 2D !!
• Strong limitation due to its lack of universality.
Eg.: in a channel flow, Cs=0.1 should be used
ij ij sgs ij
sgs ij
m τ S ρν S S
ε = ≈ 2
Solid wall
0
and ) (
because
0 but
0
12 ≠
=
≠
=
=
S y
U U
W
V ν sgs
No laminar-to-turbulent transition possible
The Germano identity
• By performing , the following sgs contribution appears
• Let’s apply another filter to these equations
• By performing , one obtains the following equations
• From A and B one obtains
j i j
i sgs
ij u u u u
T = ρ − ρ
j i j
i sgs
ij ρu u ρuu
τ = −
NS
NS
j i j
i sgs
ij ρu u ρu u
τ = −
( )
j sgs ij ij i
j j i i
x x
P x
u u t
u
∂ τ τ
∂
∂
∂
∂ ρ ∂
ρ + = − + +
∂
∂
j sgs ij ij
i j
j i i
x x
P x
u u t
u
∂ τ τ
∂
∂
∂
∂ ρ ∂
ρ
+
+
−
=
∂ +
∂
j sgs ij ij
i j
j i i
x T x
P x
u u t
u
∂ τ
∂
∂
∂
∂ ρ ∂
ρ
+
+
−
=
∂ +
∂
A
B
j i j
i sgs
ij sgs
ij u u u u
T =τ −ρ + ρ
The dynamic Smagorinsky model
• Assume the Smagorinsky model is applied twice
• Assume the same constant can be used and write the Germano identity
( )
s ij ij ijij sgs kk sgs
ij 2 C 2S S S
3
1 2
∆
=
− τ δ ρ
τijsgs Tkksgs ij
( )
Cs Sij Sij SijT 2 2
3
1 2
∆
=
− δ ρ
j i j
i sgs
ij sgs
ij u u u u
T =τ −ρ + ρ
( )
Cs Sij Sij Sij Tkksgsδij ρ( )
Cs Sij Sij Sij τkksgsδij ρui uj ρui ujρ ∆ + = ∆ + − +
3 2 1
3 2 2 1
2 2
2
ij sgs kk sgs
kk ij
ij
s M N T
C = + τ − δ 3
2 1 Cs dynamically obtained
from the solution itself
The dynamic Smagorinsky model
• The model constant is obtained in the least mean square sense
• No guaranty that . Good news for the backscattering of energy; Bad news from a numerical point of view.
• In practice on takes
• Must be stabilized by some ad hoc procedure.
E.g.: plan, Lagragian or local averaging
• Proper wall behavior
ij ij
ij ij
sgs kk sgs
kk ij
s M M
M T
N C
−
+
= τ δ
3 1
2
2 > 0 Cs
∆
≈
∆ 2
• The dynamic procedure is one of the reason for the development of LES in the last 15 years
• It allows to overcome the lack of universality of the Smagorinsky model
• The dynamic procedure can be (has been) applied to other models E.g.: dynamic determination of the sgs Prandtl number when
computing the heat fluxes
• BUT:
– it requires some ad hoc procedure to stabilize the computation – Defining a filter is not an easy task in complex geometries
The dynamic Smagorinsky model
∆
≈
∆ 2
• From the eddy-viscosity assumption, modeling means finding a proper expression for
• The Smagorinsky model reads
• More generally, from dimensional argument
An improved static model
sgs
τij
νsgs
( )
s ij ijsgs = C ∆ 2 2S S
ν
( ) [ ( ) ]
12 , , with , = −
∆
= Cm OP t OP t T
sgs x x
ν
Dynamic procedure Should depend on the filtered velocity.
No necessarily equal to 2Sij Sij
• A good candidate appears to be based on the traceless symmetric part of the square of the velocity gradient tensor
• Considering its second invariant
1. Involves both the strain and rotation rates 2. Exactly zero for any 2D field
3. Near solid walls, goes asymptotically to zero
Choice of the frequency scale OP
(
ij ji)
kk ijd
ij g2 g2 g2 δ
3 1 2
1 + −
= Σ
(
+Ω Ω)
+ Ω + Ω= Σ
Σdij ijd S S S 2IVS 2
3 6
1 2 2 2 2 2 2
li jl kj ik S
ij ij ij
ijS IV S S
S
S2 = Ω2 = Ω Ω Ω = Ω Ω
• The WALE model makes use of the previous invariant to define the sgs viscosity:
1. Proper asymptotic behavior 2. No extra filtering required 3. Simple implementation
The Wall Adapting Local Eddy viscosity model
( ) ( )
( )
5/2( )
5/4 , with 0.52 / 3
2 =
Σ Σ + Σ
∆ Σ
= m
d ij d ij ij
ij
d ij d ij m
sgs C
S S ν C
43
( )
42 1
0 3
→
=
y
sgs O y
ν
Periodic cylindrical tube at bulk Reynolds number 10000
Simple geometry with complex mesh
An academic case
• Close to solid walls, the largest scales are small …
About solid walls
Boundary layer along the x-direction: Vorticity ωx
- steep velocity profile, Lt ~ κy
- Resolution requirement: ∆y+ = O(1), ∆z+ and ∆x+ = O(10) !!
- Number of grid points: O(Rτ2) for wall resolved LES
z
y
x
u
• In the near wall region, the total shear stress is
constant. Thus the proper velocity and length scales are based on the wall shear stress τw:
• In the case of attached boundary layers, there is an inertial zone where the following universal velocity law is followed
About solid walls
τ ντ
ρ τ
l u
u = w =
2 5
, constant"
Universal
"
:
0.4
constant, Karman
Von :
, ,
1 ln
. C
C
y yu u
u u C
y u
≈
≈
=
= +
= + + +
+
κ κ
ν
κ τ τ
y
u
• A specific wall treatment is required to avoid huge mesh refinement or large errors,
• Use a coarse grid and the log law to impose the proper fluxes at the wall
Wall modeling
u
v ττττ12model
ττττ32model
y
u
Exact velocity gradient at wall
Velocity gradient at wall assessed from a coarse grid
• Coarse grid LES is not LES !!
• Numerical errors are necessary large, even for the mean quantities
• No reliable model available yet
Wall modeling in LES
Log. zone => L = κ.y
L < ∆y !!
for j=1, 2
∆y+ = O(100)
+ +
+
+ +
+ +
∆
= + +
≠ ∆
≈ ∆
∆
∆
−
≈ ∆
+
+ y y y
y u
y u
y
y κ κ
1 3
ln )
2 / (
) 2 / 3
( dy
du
2
1 /
1 y y
u → = ∆
2 /
2 3
2 y y
u → = ∆
Numerical schemes for
unsteady flows
Classical numerical methods
• Finite elements
• Finite volumes
• Finite differences
• Finite differences are only adapted to Cartesian meshes
• The most intuitive approach
• In 1D, the three methods are equivalent
• Thus the FD are well suited to understand basic phenomena shared by the three methods
A few words about Finite
Differences
• Instead of seeking for f(x), only the values of f at the nodes xi are considered. Thus the unknowns are fi=f(xi)
• The basic idea is to replace each partial derivative in the PDE by expressions obtained from Taylor expansions
written at node i
i i +1 i + 2
−1 i
− 2 i
−3
i x
xi x
+1
xi xi+2
−1
xi
−2
xi
−3
xi
A few words about Finite
Differences
First spatial derivative
• Taylor expansion at node i:
• Only derivatives at node i are involved
i i +1 i + 2
−1 i
− 2 i
−3
i x
(
1) (
1)
2 2 2( (
1)
3)
1 2 x i i
i i
x i
i i
i O x x
dx f d x
x dx
x df x
f f
i i
−
− + +
− +
= − − −
−
(
1) (
1)
2 2 2( (
1)
3)
1 2 i i
x i
i x
i i
i
i O x x
dx f x d
x dx
x df x
f f
i i
−
− + +
− +
= + + +
+
• Defining and
i i +1 i + 2
−1 i
−2 i
−3
i x
( )
132 2 2
1 1
1 2 −
− −
− = −∆ + ∆ + ∆i
x i
x i
i
i O
dx f d dx
f df f
i i
( )
32 2 2
1 2 i
x i
x i
i
i O
dx f d dx
f df f
i i
∆
∆ + +
∆ +
+ =
×
∆i−12
×
∆i2
(
2 1 2) (
2 1 2 1) (
3 1 3)
1 2 1
2
1 i i
x i
i i
i i
i i i
i i
i O
dx f df
f f
i
∆
∆ +
∆
∆ +
∆
∆ +
∆
−
∆
=
∆
−
∆ − + − − − − −
( )
(
2 1 2)
2 1( )
21 2
1 − ∆ −∆ −∆ + ∆
= ∆ − f + f − f − O
df i i i i i i i
1
1 −
−
= −
∆
ix
ix
i∆
i= x
i+1− x
iFirst spatial derivative
• If the mesh is uniform then and one recovers the classical FD formula :
• The truncation error is
• Second order centered scheme
x f f f
dx D
df
i ii
xi
∆
= −
≈
+ −2
1 0 1
1
) ( x
2O ∆
Uniform mesh
i
x
i