You are on page 1of 115

Computational uid dynamics

Martin Kronbichler
martin.kronbichler@it.uu.se
Applied Scientic Computing (Tillmpad berkningsvetenskap)
February 11, 2010
Martin Kronbichler (TDB) FVM for CFD February 11, 2010 1 / 72
Introduction
The NavierStokes equations
Conservation of mass
Conservation of momentum
Constitutive & kinematic relations
Conservation of energy
Equations of state & compressible NavierStokes equations
Incompressible NavierStokes equations
Discretization
Overview of spatial discretizations
The Finite Volume Method
Time discretization
Spatial discretization
Turbulence and its modeling
Martin Kronbichler (TDB) FVM for CFD February 11, 2010 2 / 72
Introduction
What is CFD?

Fluid mechanics deals with the motion of uids (liquids and gases),
induced by external forces.

Fluid ow is modeled by partial dierential equations (PDE),


describing the conservation of mass, momentum, and energy.

Computational Fluid Dynamics (CFD) is the discipline of


discretizing these PDE and solving them using computers.
Martin Kronbichler (TDB) FVM for CFD February 11, 2010 3 / 72
Introduction
In which application elds is CFD used?

Aerospace and aeronautical applications (airplanes, water and space


vehicles)

Mechanical applications (gas turbines, heat exchange, explosions,


combustion, architecture)

Biological applications (blood ow, breathing, drinking)

Meteorological applications (weather prediction)

Environmental applications (air and water pollution)

and many more . . .


Martin Kronbichler (TDB) FVM for CFD February 11, 2010 4 / 72
Introduction
Why to use CFD?

Pre-design of components: simulation vs. experiment (simulations


are cheaper, faster, and safer, but not always reliable)

vehicles with lower fuel consumption, quieter, heavier loads

combustion engines

oil recovery

water and gas turbines (eectiveness)

stress minimization

Detection and prediction

hurricanes, storms, tsunamis

pollution transport

diseases

forces, stresses
Martin Kronbichler (TDB) FVM for CFD February 11, 2010 5 / 72
Introduction
Why to use CFD?

Pre-design of components: simulation vs. experiment (simulations


are cheaper, faster, and safer, but not always reliable)

vehicles with lower fuel consumption, quieter, heavier loads

combustion engines

oil recovery

water and gas turbines (eectiveness)

stress minimization

Detection and prediction

hurricanes, storms, tsunamis

pollution transport

diseases

forces, stresses
Martin Kronbichler (TDB) FVM for CFD February 11, 2010 5 / 72
Introduction
Why to use CFD?

Pre-design of components: simulation vs. experiment (simulations


are cheaper, faster, and safer, but not always reliable)

vehicles with lower fuel consumption, quieter, heavier loads

combustion engines

oil recovery

water and gas turbines (eectiveness)

stress minimization

Detection and prediction

hurricanes, storms, tsunamis

pollution transport

diseases

forces, stresses
Martin Kronbichler (TDB) FVM for CFD February 11, 2010 5 / 72
Introduction
Visualization of CFD results
ONERA M6 wing optimization
O. Amoignon, M. Berggren
Martin Kronbichler (TDB) FVM for CFD February 11, 2010 6 / 72
Introduction
Visualization of CFD results
Pipe ow, computer lab
Martin Kronbichler (TDB) FVM for CFD February 11, 2010 7 / 72
Introduction
Requirements for industrial CFD

Robustness give a solution (for as many input cases as possible)

Reliability give a good solution

Performance give a good solution fast

Geometries give a good solution fast for real problems

Automatic tool chain reduce requirements of user interaction


Knowledgeable user controls and evaluates simulation outcomes!
Martin Kronbichler (TDB) FVM for CFD February 11, 2010 8 / 72
Introduction
CFD Solution Tool Chain

CAD description of geometry

Grid generation from CAD model (usually the most time consuming
part)

Problem set up - knowledgeable user needed

Mathematical model to use

Spatial and temporal discretization

Available resources

Much more . . .

Preprocessing - parse conguration and prepare solver

Solving - run the solver

Post processing - extract and compute information of interest

Visualization - often most important

Interpretation - physics, mathematics, numerics, experiments


Martin Kronbichler (TDB) FVM for CFD February 11, 2010 9 / 72
Introduction
CFD Solution Tool Chain

CAD description of geometry

Grid generation from CAD model (usually the most time consuming
part)

Problem set up - knowledgeable user needed

Mathematical model to use

Spatial and temporal discretization

Available resources

Much more . . .

Preprocessing - parse conguration and prepare solver

Solving - run the solver

Post processing - extract and compute information of interest

Visualization - often most important

Interpretation - physics, mathematics, numerics, experiments


Martin Kronbichler (TDB) FVM for CFD February 11, 2010 9 / 72
Introduction
CFD Solution Tool Chain

CAD description of geometry

Grid generation from CAD model (usually the most time consuming
part)

Problem set up - knowledgeable user needed

Mathematical model to use

Spatial and temporal discretization

Available resources

Much more . . .

Preprocessing - parse conguration and prepare solver

Solving - run the solver

Post processing - extract and compute information of interest

Visualization - often most important

Interpretation - physics, mathematics, numerics, experiments


Martin Kronbichler (TDB) FVM for CFD February 11, 2010 9 / 72
Introduction
CFD Solution Tool Chain

CAD description of geometry

Grid generation from CAD model (usually the most time consuming
part)

Problem set up - knowledgeable user needed

Mathematical model to use

Spatial and temporal discretization

Available resources

Much more . . .

Preprocessing - parse conguration and prepare solver

Solving - run the solver

Post processing - extract and compute information of interest

Visualization - often most important

Interpretation - physics, mathematics, numerics, experiments


Martin Kronbichler (TDB) FVM for CFD February 11, 2010 9 / 72
Introduction
CFD Solution Tool Chain

CAD description of geometry

Grid generation from CAD model (usually the most time consuming
part)

Problem set up - knowledgeable user needed

Mathematical model to use

Spatial and temporal discretization

Available resources

Much more . . .

Preprocessing - parse conguration and prepare solver

Solving - run the solver

Post processing - extract and compute information of interest

Visualization - often most important

Interpretation - physics, mathematics, numerics, experiments


Martin Kronbichler (TDB) FVM for CFD February 11, 2010 9 / 72
Introduction
CFD Solution Tool Chain

CAD description of geometry

Grid generation from CAD model (usually the most time consuming
part)

Problem set up - knowledgeable user needed

Mathematical model to use

Spatial and temporal discretization

Available resources

Much more . . .

Preprocessing - parse conguration and prepare solver

Solving - run the solver

Post processing - extract and compute information of interest

Visualization - often most important

Interpretation - physics, mathematics, numerics, experiments


Martin Kronbichler (TDB) FVM for CFD February 11, 2010 9 / 72
Introduction
CFD Solution Tool Chain

CAD description of geometry

Grid generation from CAD model (usually the most time consuming
part)

Problem set up - knowledgeable user needed

Mathematical model to use

Spatial and temporal discretization

Available resources

Much more . . .

Preprocessing - parse conguration and prepare solver

Solving - run the solver

Post processing - extract and compute information of interest

Visualization - often most important

Interpretation - physics, mathematics, numerics, experiments


Martin Kronbichler (TDB) FVM for CFD February 11, 2010 9 / 72
Introduction
CFD Solution Tool Chain

CAD description of geometry

Grid generation from CAD model (usually the most time consuming
part)

Problem set up - knowledgeable user needed

Mathematical model to use

Spatial and temporal discretization

Available resources

Much more . . .

Preprocessing - parse conguration and prepare solver

Solving - run the solver

Post processing - extract and compute information of interest

Visualization - often most important

Interpretation - physics, mathematics, numerics, experiments


Martin Kronbichler (TDB) FVM for CFD February 11, 2010 9 / 72
Introduction
CFD software

Commercial: Fluent, Comsol, CFX, Star-CD

In-house codes: Edge (FOI), DLR-Tau (German Aerospace Center),


Fun3D (NASA), Sierra/Premo (American Aerospace)

Open Source: OpenFOAM, FEniCS, OpenFlower


Martin Kronbichler (TDB) FVM for CFD February 11, 2010 10 / 72
Introduction
CFD links

http://www.cfd-online.com

http://www.uent.com

http://www.openfoam.org
Martin Kronbichler (TDB) FVM for CFD February 11, 2010 11 / 72
The NavierStokes equations
A mathematical model for uid ow
The NavierStokes equations
Martin Kronbichler (TDB) FVM for CFD February 11, 2010 12 / 72
The NavierStokes equations
NavierStokes equations an overview

The governing equations of uid dynamics are the conservation laws


of mass, momentum, and energy.

In CFD, this set of conservation laws are called the


NavierStokes equations.

Derive compressible NavierStokes equations rst

Simplify these equations to get the incompressible NavierStokes


equations
Martin Kronbichler (TDB) FVM for CFD February 11, 2010 13 / 72
The NavierStokes equations
Notation
density
u velocity, u = (u
1
, u
2
, u
3
)
p pressure
T temperature
dynamic viscosity
kinematic viscosity, = /
nabla operator, =
_

x
1
,

x
2
,

x
3
_
inner product, a b = a
1
b
1
+a
2
b
2
+a
3
b
3
Martin Kronbichler (TDB) FVM for CFD February 11, 2010 14 / 72
The NavierStokes equations
General form of conservation laws

Monitor the ow characteristics of a xed control volume .

Rate of total change in the control volume:

change in the interior,

ow over boundary of control volume,


expressed as
D
Dt
_
(t)
q d =
_

q
t
d +
_

qu nds =
_
(t)
S d
for some quantity q and a source term S (generation or elimination).
n denotes the outer normal on . This is the Reynolds transport
theorem.
Note: (t) is an ensemble of molecules, is a xed control volume.

Dierential form:
Dq
Dt
=
q
t
+u q = S.
Martin Kronbichler (TDB) FVM for CFD February 11, 2010 15 / 72
The NavierStokes equations
General form of conservation laws

Monitor the ow characteristics of a xed control volume .

Rate of total change in the control volume:

change in the interior,

ow over boundary of control volume,


expressed as
D
Dt
_
(t)
q d =
_

q
t
d +
_

qu nds =
_
(t)
S d
for some quantity q and a source term S (generation or elimination).
n denotes the outer normal on . This is the Reynolds transport
theorem.
Note: (t) is an ensemble of molecules, is a xed control volume.

Dierential form:
Dq
Dt
=
q
t
+u q = S.
Martin Kronbichler (TDB) FVM for CFD February 11, 2010 15 / 72
The NavierStokes equations
General form of conservation laws

Monitor the ow characteristics of a xed control volume .

Rate of total change in the control volume:

change in the interior,

ow over boundary of control volume,


expressed as
D
Dt
_
(t)
q d =
_

q
t
d +
_

qu nds =
_
(t)
S d
for some quantity q and a source term S (generation or elimination).
n denotes the outer normal on . This is the Reynolds transport
theorem.
Note: (t) is an ensemble of molecules, is a xed control volume.

Dierential form:
Dq
Dt
=
q
t
+u q = S.
Martin Kronbichler (TDB) FVM for CFD February 11, 2010 15 / 72
The NavierStokes equations Conservation of mass
Continuity equation I
The continuity equation describes the conservation of mass .
The mass M of the material in (t) is constant (molecules cannot be
created/destroyed), that is M(t) = M(t +t).
DM
Dt
=
D
Dt
_
(t)
d
. .
M
= 0
(t) denotes the uid density.
Martin Kronbichler (TDB) FVM for CFD February 11, 2010 16 / 72
The NavierStokes equations Conservation of mass
Continuity equation II
Rewritten for a stationary control volume by using the Reynolds transport
theorem:
rate of mass change in + mass ow over = 0,
_

t
d +
_

u nds = 0.
Martin Kronbichler (TDB) FVM for CFD February 11, 2010 17 / 72
The NavierStokes equations Conservation of momentum
Momentum equation I
The momentum equation describes the conservation of momentum .
Newtons second law of motion: the total rate of momentum m change in
(t) is equal to the sum of acting forces K, i.e.,
Dm
Dt
=
D
Dt
_
(t)
ud = K,
(interpretation: mass acceleration = force).
Martin Kronbichler (TDB) FVM for CFD February 11, 2010 18 / 72
The NavierStokes equations Conservation of momentum
Momentum equation II
Rewritten for a stationary control volume :
_

u
t
+
_

(u u) nds = K,
where u u is a rank-2 tensor with entries u
i
u
j
.
Decompose force into surface forces and volume forces:
rate of momentum change in + momentum ow over
= surface forces on + volume forces on ,
_

u
t
dV+
_

(uu)nds =
_

pnds +
_

nds
. .
surface forces
+
_

f d.
Martin Kronbichler (TDB) FVM for CFD February 11, 2010 19 / 72
The NavierStokes equations Conservation of momentum
Momentum equation II
Rewritten for a stationary control volume :
_

u
t
+
_

(u u) nds = K,
where u u is a rank-2 tensor with entries u
i
u
j
.
Decompose force into surface forces and volume forces:
rate of momentum change in + momentum ow over
= surface forces on + volume forces on ,
_

u
t
dV+
_

(uu)nds =
_

pnds +
_

nds
. .
surface forces
+
_

f d.
Martin Kronbichler (TDB) FVM for CFD February 11, 2010 19 / 72
The NavierStokes equations Conservation of momentum
Momentum equation III

Surface forces acting on ds of :

Pressure force p(n) ds (analog to isotropic stress in structural


mechanics),

Viscous force nds, is the Cauchy stress tensor (analog to


deviatoric stress in structural mechanics).

Volume forces f d acting on small interior volume d:

Gravity force g d, e.g., f = g,

Other types of forces: Coriolis, centrifugal, electromagnetic, buoyancy


Martin Kronbichler (TDB) FVM for CFD February 11, 2010 20 / 72
The NavierStokes equations Conservation of momentum
Momentum equation III

Surface forces acting on ds of :

Pressure force p(n) ds (analog to isotropic stress in structural


mechanics),

Viscous force nds, is the Cauchy stress tensor (analog to


deviatoric stress in structural mechanics).

Volume forces f d acting on small interior volume d:

Gravity force g d, e.g., f = g,

Other types of forces: Coriolis, centrifugal, electromagnetic, buoyancy


Martin Kronbichler (TDB) FVM for CFD February 11, 2010 20 / 72
The NavierStokes equations Conservation of momentum
Newtonian uid
Model that relates the stress tensor to the velocity u:
We consider so-called Newtonian uids, where the viscous stress is
linearly related to strain rate, that is,
= 2(u)
2
3
I tr (u) =
_
u +(u)
T
_

2
3
( u)I,
(compare with constitutive and kinematic relations in elasticity theory).
For Cartesian coordinates

ij
=
_
u
j
x
i
+
u
i
x
j
_

2
3

k=1
u
k
x
k
.
The dynamic viscosity is assumed constant
= (T, p) constant.
Martin Kronbichler (TDB) FVM for CFD February 11, 2010 21 / 72
The NavierStokes equations Conservation of momentum
Newtonian uid
Model that relates the stress tensor to the velocity u:
We consider so-called Newtonian uids, where the viscous stress is
linearly related to strain rate, that is,
= 2(u)
2
3
I tr (u) =
_
u +(u)
T
_

2
3
( u)I,
(compare with constitutive and kinematic relations in elasticity theory).
For Cartesian coordinates

ij
=
_
u
j
x
i
+
u
i
x
j
_

2
3

k=1
u
k
x
k
.
The dynamic viscosity is assumed constant
= (T, p) constant.
Martin Kronbichler (TDB) FVM for CFD February 11, 2010 21 / 72
The NavierStokes equations Conservation of energy
Energy equation I
The energy equation describes the conservation of energy .
The rst law of thermodynamics:
The total rate of total energy E changes in (t) is equal to the rate of
work L done on the uid by the acting forces K plus the rate of heat added
W, that is
DE
Dt
=
D
Dt
_
(t)
E d = L +W
where E is the total energy per unit volume.
Martin Kronbichler (TDB) FVM for CFD February 11, 2010 22 / 72
The NavierStokes equations Conservation of energy
Energy Equation II
Rewritten for a stationary control volume , explicitly specifying the source
terms:
Rate of total energy change in + Total energy ow over =
Rate of work of pressure and viscous forces on +
Rate of work of forces on + Rate of heat added over
_

E
t
d +
_

Eu nds =
_

pu nds +
_

( u) nds
+
_

f ud +
_

kT nds
for the uid temperature T and thermal conductivity k.
Martin Kronbichler (TDB) FVM for CFD February 11, 2010 23 / 72
The NavierStokes equations Conservation of energy
Involved variables and equations
We have

seven variables (, u
1
, u
2
, u
3
, p, T, E)

ve equations (continuity, 3momentum, energy)


We need two more equations to close the system, the so-called equations
of state.
Martin Kronbichler (TDB) FVM for CFD February 11, 2010 24 / 72
The NavierStokes equations Equations of state & compressible NavierStokes equations
Equations of state
Properties of a perfect gas:
p =( 1)
internal energy
..
_
E
1
2
|u|
2
_
T =
1
c
v
_
E
1
2
|u|
2
_
where =
c
p
c
v
is the ratio of specic heats, and c
p
and c
v
are the specic
heats at constant pressure and volume.
A typical value for air at sea level pressure is = 1.4.
Martin Kronbichler (TDB) FVM for CFD February 11, 2010 25 / 72
The NavierStokes equations Equations of state & compressible NavierStokes equations
The compressible NavierStokes equations in integral form
The equations of continuity, momentum, and energy can be combined into
one system of equations.

Dene compound variable U = (, u


1
, u
2
, u
3
, E) (called
conservative variables)

Dene ux vectors
F n =
_
_
u n
(u u) n +pI n
(E +p)u n
_
_
. .
inviscid/convective

_
_
0
n
( u) n +k(T) n
_
_
. .
viscous
and an external strength vector F
e
= (0, f, f u)
T
Compressible NavierStokes equations in integral form
_

U
t
d +
_

F nds =
_

F
e
d
Martin Kronbichler (TDB) FVM for CFD February 11, 2010 26 / 72
The NavierStokes equations Equations of state & compressible NavierStokes equations
The compressible NavierStokes equations in integral form
The equations of continuity, momentum, and energy can be combined into
one system of equations.

Dene compound variable U = (, u


1
, u
2
, u
3
, E) (called
conservative variables)

Dene ux vectors
F n =
_
_
u n
(u u) n +pI n
(E +p)u n
_
_
. .
inviscid/convective

_
_
0
n
( u) n +k(T) n
_
_
. .
viscous
and an external strength vector F
e
= (0, f, f u)
T
Compressible NavierStokes equations in integral form
_

U
t
d +
_

F nds =
_

F
e
d
Martin Kronbichler (TDB) FVM for CFD February 11, 2010 26 / 72
The NavierStokes equations Equations of state & compressible NavierStokes equations
Compressible NavierStokes equations, dierential form
Assume: ux tensor F is dierentiable
Apply the Gauss theorem to the integral form and get
_

_
U
t
+ F F
e
_
d = 0.
Since the integral is zero for an arbitrary control volume , we obtain the
dierential form of the
Compressible NavierStokes equations
U
t
+ F = F
e
.
Martin Kronbichler (TDB) FVM for CFD February 11, 2010 27 / 72
The NavierStokes equations Equations of state & compressible NavierStokes equations
Compressible NavierStokes equations, dierential form
Assume: ux tensor F is dierentiable
Apply the Gauss theorem to the integral form and get
_

_
U
t
+ F F
e
_
d = 0.
Since the integral is zero for an arbitrary control volume , we obtain the
dierential form of the
Compressible NavierStokes equations
U
t
+ F = F
e
.
Martin Kronbichler (TDB) FVM for CFD February 11, 2010 27 / 72
The NavierStokes equations Incompressible NavierStokes equations
The incompressible NavierStokes equations
Motivation: we can use simpler equations if we have more information

Incompressible uid: density does not change with pressure, i.e.,


= const.

Energy equation decouples from the rest of the system; continuity and
momentum equations can be simplied.

Many practically relevant ows are incompressible (e.g. air at speeds


up to 100 m/s) predominant CFD model
Martin Kronbichler (TDB) FVM for CFD February 11, 2010 28 / 72
The NavierStokes equations Incompressible NavierStokes equations
Continuity equation
The continuity equation,

t
+ (u) = 0,
becomes for constant simply
u = 0, i.e.,
3

i =1
u
i
x
i
= 0.
Martin Kronbichler (TDB) FVM for CFD February 11, 2010 29 / 72
The NavierStokes equations Incompressible NavierStokes equations
Momentum equation
The momentum equation,
u
t
+ (u u) = p + +f,
can be simplied by using u = 0,
(u u) = (u )u +( u)u = (u )u
=
_
u +(u)
T
_

2
3
( u)I =
_
u +(u)
T
_
=
_
u +(u)
T
_
=
_

2
u +( u)
_
=
2
u.
This gives the incompressible version of the momentum equation
u
t
+(u )u =
1

p +

2
u +f
Martin Kronbichler (TDB) FVM for CFD February 11, 2010 30 / 72
The NavierStokes equations Incompressible NavierStokes equations
Momentum equation
The momentum equation,
u
t
+ (u u) = p + +f,
can be simplied by using u = 0,
(u u) = (u )u +( u)u = (u )u
=
_
u +(u)
T
_

2
3
( u)I =
_
u +(u)
T
_
=
_
u +(u)
T
_
=
_

2
u +( u)
_
=
2
u.
This gives the incompressible version of the momentum equation
u
t
+(u )u =
1

p +

2
u +f
Martin Kronbichler (TDB) FVM for CFD February 11, 2010 30 / 72
The NavierStokes equations Incompressible NavierStokes equations
Momentum equation
The momentum equation,
u
t
+ (u u) = p + +f,
can be simplied by using u = 0,
(u u) = (u )u +( u)u = (u )u
=
_
u +(u)
T
_

2
3
( u)I =
_
u +(u)
T
_
=
_
u +(u)
T
_
=
_

2
u +( u)
_
=
2
u.
This gives the incompressible version of the momentum equation
u
t
+(u )u =
1

p +

2
u +f
Martin Kronbichler (TDB) FVM for CFD February 11, 2010 30 / 72
The NavierStokes equations Incompressible NavierStokes equations
The incompressible NavierStokes equations II
Since the energy equation does not enter the momentum and continuity
equation, we have a closed system of four equations:
Incompressible NavierStokes equations
_
_
_
u = 0,
u
t
+(u )u =
1

p +
2
u +f,
where =

is the uid kinematic viscosity.


Martin Kronbichler (TDB) FVM for CFD February 11, 2010 31 / 72
The NavierStokes equations Incompressible NavierStokes equations
Equation in temperature
The energy equation can be expressed in terms of temperature by using the
equation of state. Transforming the integral form into dierential form as
done before
1
yields
c
p
_
T
t
+ (Tu)
_
= (kT) + : u,
where
: u =
3

i ,j =1

ij
u
j
x
i
=
3

i ,j =1
1
2
_
u
i
x
j
+
u
j
x
i
_
2
,
and is called a dissipative function.
1
for further reading, see e.g. J. Blazek: Computational Fluid Dynamics, Elsevier,
Amsterdam
Martin Kronbichler (TDB) FVM for CFD February 11, 2010 32 / 72
The NavierStokes equations Incompressible NavierStokes equations
Incompressible NavierStokes equations III

Energy equation is decoupled from the continuity and momentum


equations

rst solve the continuity and momentum equations to get the velocity
and pressure.

temperature (energy) equation can be solved for temperature using the


already computed velocity.

Pressure level only dened up to a constant for incompressible


ow

pressure level has to be xed at one point in the ow.

p yields then the relative pressure dierence with respect to that


pressure level.

No time derivative for the pressure

mathematical diculty of the incompressible NavierStokes equations.

p is indirectly determined by the condition u = 0 (p has to be such


that the resulting velocity is divergence free, Lagrange multiplier).
Martin Kronbichler (TDB) FVM for CFD February 11, 2010 33 / 72
The NavierStokes equations Incompressible NavierStokes equations
Incompressible NavierStokes equations III

Energy equation is decoupled from the continuity and momentum


equations

rst solve the continuity and momentum equations to get the velocity
and pressure.

temperature (energy) equation can be solved for temperature using the


already computed velocity.

Pressure level only dened up to a constant for incompressible


ow

pressure level has to be xed at one point in the ow.

p yields then the relative pressure dierence with respect to that


pressure level.

No time derivative for the pressure

mathematical diculty of the incompressible NavierStokes equations.

p is indirectly determined by the condition u = 0 (p has to be such


that the resulting velocity is divergence free, Lagrange multiplier).
Martin Kronbichler (TDB) FVM for CFD February 11, 2010 33 / 72
The NavierStokes equations Incompressible NavierStokes equations
Incompressible NavierStokes equations III

Energy equation is decoupled from the continuity and momentum


equations

rst solve the continuity and momentum equations to get the velocity
and pressure.

temperature (energy) equation can be solved for temperature using the


already computed velocity.

Pressure level only dened up to a constant for incompressible


ow

pressure level has to be xed at one point in the ow.

p yields then the relative pressure dierence with respect to that


pressure level.

No time derivative for the pressure

mathematical diculty of the incompressible NavierStokes equations.

p is indirectly determined by the condition u = 0 (p has to be such


that the resulting velocity is divergence free, Lagrange multiplier).
Martin Kronbichler (TDB) FVM for CFD February 11, 2010 33 / 72
The NavierStokes equations Incompressible NavierStokes equations
Additional conditions
To complete the physical problem setup after having derived the
appropriate PDE, we have to dene the

domain

initial conditions (velocity, temperature, etc at t = 0)

boundary conditions (inow, outow, wall, interface, . . .)

material properties
Martin Kronbichler (TDB) FVM for CFD February 11, 2010 34 / 72
Discretization
Discretization
Numerical solution strategies for the
ow equations
Martin Kronbichler (TDB) FVM for CFD February 11, 2010 35 / 72
Discretization
Solution Strategies Outline
Some points we will cover regarding solver strategies of CFD

Pros and cons of various discretization methods

Finite Volume Method (FVM)

Turbulence and its modeling


Martin Kronbichler (TDB) FVM for CFD February 11, 2010 36 / 72
Discretization Overview of spatial discretizations
Overview of Methods
Discretization methods for the CFD equations:

Finite Dierence Method (FDM)


+ eciency, + theory, geometries

Finite Element Method (FEM)


+ theory, + geometries, shocks, uses no directional information

Spectral Methods (Collocation, Galerkin, . . .)


+ accuracy, + theory, geometries

Finite Volume Methods (FVM)


+ robustness, + geometries, accuracy

Discontinuous Galerkin Methods (DGM)


+ geometries, + shocks, eciency (e.g. smooth solutions)

Hybrid Methods
+ versatile, complex (not automatable)
Martin Kronbichler (TDB) FVM for CFD February 11, 2010 37 / 72
Discretization Overview of spatial discretizations
Overview of Methods
Discretization methods for the CFD equations:

Finite Dierence Method (FDM)


+ eciency, + theory, geometries

Finite Element Method (FEM)


+ theory, + geometries, shocks, uses no directional information

Spectral Methods (Collocation, Galerkin, . . .)


+ accuracy, + theory, geometries

Finite Volume Methods (FVM)


+ robustness, + geometries, accuracy

Discontinuous Galerkin Methods (DGM)


+ geometries, + shocks, eciency (e.g. smooth solutions)

Hybrid Methods
+ versatile, complex (not automatable)
Martin Kronbichler (TDB) FVM for CFD February 11, 2010 37 / 72
Discretization Overview of spatial discretizations
Overview of Methods
Discretization methods for the CFD equations:

Finite Dierence Method (FDM)


+ eciency, + theory, geometries

Finite Element Method (FEM)


+ theory, + geometries, shocks, uses no directional information

Spectral Methods (Collocation, Galerkin, . . .)


+ accuracy, + theory, geometries

Finite Volume Methods (FVM)


+ robustness, + geometries, accuracy

Discontinuous Galerkin Methods (DGM)


+ geometries, + shocks, eciency (e.g. smooth solutions)

Hybrid Methods
+ versatile, complex (not automatable)
Martin Kronbichler (TDB) FVM for CFD February 11, 2010 37 / 72
Discretization The Finite Volume Method
Introduction
The Finite Volume Method (FVM) is based on the integral form of the
governing equations.
The integral conservation is enforced in so-called control volumes
( d ) dened by the computational mesh.
The type of FVM is specied by

the type of control volume

the type of evaluation of integrals and uxes


Martin Kronbichler (TDB) FVM for CFD February 11, 2010 38 / 72
Discretization The Finite Volume Method
FVM derivation, introduction
Consider a general scalar hyperbolic conservation law:
u
t
+ F(u) = 0 in , (1)
with appropriate boundary and initial conditions.
Compared to the compressible NavierStokes equations, we use a problem
where

u replaces the vector of conservative variables (, u, E),

F replaces the ux tensor as dened earlier,

we have a scalar problem instead of a system.


Martin Kronbichler (TDB) FVM for CFD February 11, 2010 39 / 72
Discretization The Finite Volume Method
FVM derivation, introduction
Consider a general scalar hyperbolic conservation law:
u
t
+ F(u) = 0 in , (1)
with appropriate boundary and initial conditions.
Compared to the compressible NavierStokes equations, we use a problem
where

u replaces the vector of conservative variables (, u, E),

F replaces the ux tensor as dened earlier,

we have a scalar problem instead of a system.


Martin Kronbichler (TDB) FVM for CFD February 11, 2010 39 / 72
Discretization The Finite Volume Method
FVM derivation, control volumes
Consider the equation in two dimensions, and we divide the domain into
M non-overlapping control volumes K
m
.
K
m
vertex-centered nite volume method
Martin Kronbichler (TDB) FVM for CFD February 11, 2010 40 / 72
Discretization The Finite Volume Method
FVM derivation, discretized solution
In each control volume, K
m
, we store one value u
m
, which is the average
of u in K
m
.
u
m
=
1
|K
m
|
_
K
m
u d
Martin Kronbichler (TDB) FVM for CFD February 11, 2010 41 / 72
Discretization The Finite Volume Method
FVM derivation, integral form I
The FVM is based on the integral formulation of the equations.
We start by integrating (1) over one of the control volumes,
_
K
m
u
t
d +
_
K
m
F(u) d = 0. (2)
The rst integral can be simplied by changing order of time derivative and
integration to get
_
K
m
u
t
d =
d
dt
_
K
m
u d = |K
m
|
du
m
dt
. (3)
Inserting (3) back into (2) yields
du
m
dt
=
1
|K
m
|
_
K
m
F(u) d.
Martin Kronbichler (TDB) FVM for CFD February 11, 2010 42 / 72
Discretization The Finite Volume Method
FVM derivation, integral form I
The FVM is based on the integral formulation of the equations.
We start by integrating (1) over one of the control volumes,
_
K
m
u
t
d +
_
K
m
F(u) d = 0. (2)
The rst integral can be simplied by changing order of time derivative and
integration to get
_
K
m
u
t
d =
d
dt
_
K
m
u d = |K
m
|
du
m
dt
. (3)
Inserting (3) back into (2) yields
du
m
dt
=
1
|K
m
|
_
K
m
F(u) d.
Martin Kronbichler (TDB) FVM for CFD February 11, 2010 42 / 72
Discretization The Finite Volume Method
FVM derivation, time evolution
We need to propagate the solution u
m
in time.
There are many possibilities for choosing a time integration method, for
example RungeKutta, multistep methods etc.
See some Ordinary Dierential Equation (ODE) textbook for more
information.
2
We will use forward Euler in all our examples, i.e.,
du
m
dt
=
u
n+1
m
u
n
m
t
,
where u
n
m
= u
m
(t
n
).
2
e.g., E. Hairer, S.P. Nrsett, G. Wanner: Solving Ordinary Dierential Equations. I:
Nonsti Problems. Springer-Verlag, Berlin, 1993.
Martin Kronbichler (TDB) FVM for CFD February 11, 2010 43 / 72
Discretization The Finite Volume Method
FVM derivation, time evolution
We need to propagate the solution u
m
in time.
There are many possibilities for choosing a time integration method, for
example RungeKutta, multistep methods etc.
See some Ordinary Dierential Equation (ODE) textbook for more
information.
2
We will use forward Euler in all our examples, i.e.,
du
m
dt
=
u
n+1
m
u
n
m
t
,
where u
n
m
= u
m
(t
n
).
2
e.g., E. Hairer, S.P. Nrsett, G. Wanner: Solving Ordinary Dierential Equations. I:
Nonsti Problems. Springer-Verlag, Berlin, 1993.
Martin Kronbichler (TDB) FVM for CFD February 11, 2010 43 / 72
Discretization The Finite Volume Method
FVM derivation, time evolution
Inserting the forward Euler time discretization into our system gives
u
n+1
m
= u
n
m

t
|K
m
|
_
K
m
F(u) d.
Martin Kronbichler (TDB) FVM for CFD February 11, 2010 44 / 72
Discretization The Finite Volume Method
FVM derivation, integral form II
By integration by parts (Gauss divergence theorem) of the ux integral we
get the basic FVM formulation
u
n+1
m
= u
n
m

t
|K
m
|
_
K
m
F(u) nds. (4)
The boundary integral describes the ux of u over the boundary K
m
of
the control volume.
Note: Transforming the volume to a surface integral gets us back to the
form used for the derivation of the NavierStokes equations.
Dierent ways of evaluating the ux integral specify the type of FVM
(together with the control volume type).
Martin Kronbichler (TDB) FVM for CFD February 11, 2010 45 / 72
Discretization The Finite Volume Method
FVM derivation, integral form II
By integration by parts (Gauss divergence theorem) of the ux integral we
get the basic FVM formulation
u
n+1
m
= u
n
m

t
|K
m
|
_
K
m
F(u) nds. (4)
The boundary integral describes the ux of u over the boundary K
m
of
the control volume.
Note: Transforming the volume to a surface integral gets us back to the
form used for the derivation of the NavierStokes equations.
Dierent ways of evaluating the ux integral specify the type of FVM
(together with the control volume type).
Martin Kronbichler (TDB) FVM for CFD February 11, 2010 45 / 72
Discretization The Finite Volume Method
FVM derivation, numerical ux
The integral in (4) is evaluated using a so-called numerical ux function.

There are a lot of dierent numerical uxes available for the integral
evaluation, each of them having its pros and cons.
Terminology: Riemann solvers (they are usually designed to solve the
Riemann problem which is a conservation law with constant data and
a discontinuity).

Both exact and approximate solvers (i.e., ways to evaluate the ux


integral (4)) have been developed, usually the latter class is used.

E.g. exact solver for Euler


3
equations developed by Godunov.

Widely used approximate solvers: Roe, HLLC, central ux.


3
Contains only the inviscid terms from the compressible NavierStokes equations
Martin Kronbichler (TDB) FVM for CFD February 11, 2010 46 / 72
Discretization The Finite Volume Method
FVM derivation, numerical ux
The integral in (4) is evaluated using a so-called numerical ux function.

There are a lot of dierent numerical uxes available for the integral
evaluation, each of them having its pros and cons.
Terminology: Riemann solvers (they are usually designed to solve the
Riemann problem which is a conservation law with constant data and
a discontinuity).

Both exact and approximate solvers (i.e., ways to evaluate the ux


integral (4)) have been developed, usually the latter class is used.

E.g. exact solver for Euler


3
equations developed by Godunov.

Widely used approximate solvers: Roe, HLLC, central ux.


3
Contains only the inviscid terms from the compressible NavierStokes equations
Martin Kronbichler (TDB) FVM for CFD February 11, 2010 46 / 72
Discretization The Finite Volume Method
FVM derivation, numerical ux II
The numerical ux functions are usually denoted by F

(u
L
, u
R
, n) where u
L
is the left (local) state and u
R
is the right (remote) state of u at the
boundary K
m
,
_
K
m
F(u) nds =

j
_
K
j
m
F(u) n
j
ds

j
|K
j
m
|F

(u
L
, u
R
, n
j
)
and j denotes the index of each subboundary of K
m
with a given normal
n
j
.
Martin Kronbichler (TDB) FVM for CFD February 11, 2010 47 / 72
Discretization The Finite Volume Method
FVM derivation, numerical ux II
The numerical ux functions are usually denoted by F

(u
L
, u
R
, n) where u
L
is the left (local) state and u
R
is the right (remote) state of u at the
boundary K
m
,
_
K
m
F(u) nds =

j
_
K
j
m
F(u) n
j
ds

j
|K
j
m
|F

(u
L
, u
R
, n
j
)
and j denotes the index of each subboundary of K
m
with a given normal
n
j
.
Martin Kronbichler (TDB) FVM for CFD February 11, 2010 47 / 72
Discretization The Finite Volume Method
FVM derivation, full discretization
The full discretization for control volume K
m
is hence
u
n+1
m
= u
n
m

t
|K
m
|

j
|K
j
m
|F

(u
L
, u
R
, n
j
)
In one dimension, we have
u
n+1
m
= u
n
m

t
x
_
K
m
F(u) nds
= u
n
m

t
x
_
F(u
n
m+1/2
) F(u
n
m1/2
)
_
= u
n
m

t
x
_
F

(u
n
m
, u
n
m1
, 1) +F

(u
n
m
, u
n
m+1
, 1)
_
Martin Kronbichler (TDB) FVM for CFD February 11, 2010 48 / 72
Discretization The Finite Volume Method
FVM derivation, full discretization
The full discretization for control volume K
m
is hence
u
n+1
m
= u
n
m

t
|K
m
|

j
|K
j
m
|F

(u
L
, u
R
, n
j
)
In one dimension, we have
u
n+1
m
= u
n
m

t
x
_
K
m
F(u) nds
= u
n
m

t
x
_
F(u
n
m+1/2
) F(u
n
m1/2
)
_
= u
n
m

t
x
_
F

(u
n
m
, u
n
m1
, 1) +F

(u
n
m
, u
n
m+1
, 1)
_
Martin Kronbichler (TDB) FVM for CFD February 11, 2010 48 / 72
Discretization The Finite Volume Method
FVM derivation, full discretization
The full discretization for control volume K
m
is hence
u
n+1
m
= u
n
m

t
|K
m
|

j
|K
j
m
|F

(u
L
, u
R
, n
j
)
In one dimension, we have
u
n+1
m
= u
n
m

t
x
_
K
m
F(u) nds
= u
n
m

t
x
_
F(u
n
m+1/2
) F(u
n
m1/2
)
_
= u
n
m

t
x
_
F

(u
n
m
, u
n
m1
, 1) +F

(u
n
m
, u
n
m+1
, 1)
_
Martin Kronbichler (TDB) FVM for CFD February 11, 2010 48 / 72
Discretization The Finite Volume Method
FVM derivation, upwind scheme I
Get the information upwind, where the information comes from.
Image from http://en.wikipedia.org
Martin Kronbichler (TDB) FVM for CFD February 11, 2010 49 / 72
Discretization The Finite Volume Method
FVM derivation, upwind scheme II
Example in one dimension
F(u) = u,
where is the direction of the ow. So in each control volume we compute
_
K
m
un ds.
Case > 0 (information ows from left to right), equidistant mesh:
u
m1/2
= u
m1
, u
m+1/2
= u
m
.
Hence, we get
u
n+1
m
= u
n
m

t
x
_
F(u
n
m+1/2
)n
m+1/2
+F(u
n
m1/2
)n
m1/2
_
= u
n
m

t
x

_
u
n
m+1/2
u
n
m1/2
_
= u
n
m

t
x

_
u
n
m
u
n
m1
_
.
Martin Kronbichler (TDB) FVM for CFD February 11, 2010 50 / 72
Discretization The Finite Volume Method
FVM derivation, upwind scheme II
Example in one dimension
F(u) = u,
where is the direction of the ow. So in each control volume we compute
_
K
m
un ds.
Case > 0 (information ows from left to right), equidistant mesh:
u
m1/2
= u
m1
, u
m+1/2
= u
m
.
Hence, we get
u
n+1
m
= u
n
m

t
x
_
F(u
n
m+1/2
)n
m+1/2
+F(u
n
m1/2
)n
m1/2
_
= u
n
m

t
x

_
u
n
m+1/2
u
n
m1/2
_
= u
n
m

t
x

_
u
n
m
u
n
m1
_
.
Martin Kronbichler (TDB) FVM for CFD February 11, 2010 50 / 72
Discretization The Finite Volume Method
FVM derivation, upwind scheme II
Example in one dimension
F(u) = u,
where is the direction of the ow. So in each control volume we compute
_
K
m
un ds.
Case > 0 (information ows from left to right), equidistant mesh:
u
m1/2
= u
m1
, u
m+1/2
= u
m
.
Hence, we get
u
n+1
m
= u
n
m

t
x
_
F(u
n
m+1/2
)n
m+1/2
+F(u
n
m1/2
)n
m1/2
_
= u
n
m

t
x

_
u
n
m+1/2
u
n
m1/2
_
= u
n
m

t
x

_
u
n
m
u
n
m1
_
.
Martin Kronbichler (TDB) FVM for CFD February 11, 2010 50 / 72
Discretization The Finite Volume Method
FVM derivation, upwind scheme (Roe ux)
Practical implementation of upwinding: construct it by the Roe Flux
F

(u
L
, u
R
, n) =
n F(u
L
) +n F(u
R
)
2
+

n F

( u)

u
L
u
R
2
.
Here, u satises the mean value theorem,
n F(u
L
) = n F(u
R
) +n F

( u) (u
L
u
R
) .
and is called the Roe average (problem dependent).
Upwinding is rst order accurate.
Martin Kronbichler (TDB) FVM for CFD February 11, 2010 51 / 72
Discretization The Finite Volume Method
FVM derivation, upwind scheme (Roe ux)
Practical implementation of upwinding: construct it by the Roe Flux
F

(u
L
, u
R
, n) =
n F(u
L
) +n F(u
R
)
2
+

n F

( u)

u
L
u
R
2
.
Here, u satises the mean value theorem,
n F(u
L
) = n F(u
R
) +n F

( u) (u
L
u
R
) .
and is called the Roe average (problem dependent).
Upwinding is rst order accurate.
Martin Kronbichler (TDB) FVM for CFD February 11, 2010 51 / 72
Discretization The Finite Volume Method
FVM derivation, central scheme I
For F(u) = u on a equidistant mesh, the central scheme approximation is
u
m1/2
=
u
m1
+u
m
2
, u
m1/2
=
u
m
+u
m+1
2
.
Hence,
u
n+1
m
= u
n
m

t
x
_
F(u
n
m+1/2
)n
m+1/2
+F(u
n
m1/2
)n
m1/2
_
= u
n
m

t
x

_
u
n
m+1/2
u
n
m1/2
_
= u
n
m

t
x

_
u
n
m
+u
n
m+1
2

u
n
m1
+u
n
m
2
_
= u
n
m

t
x

_
u
n
m+1
u
n
m1
2
_
.
Martin Kronbichler (TDB) FVM for CFD February 11, 2010 52 / 72
Discretization The Finite Volume Method
FVM derivation, central scheme I
For F(u) = u on a equidistant mesh, the central scheme approximation is
u
m1/2
=
u
m1
+u
m
2
, u
m1/2
=
u
m
+u
m+1
2
.
Hence,
u
n+1
m
= u
n
m

t
x
_
F(u
n
m+1/2
)n
m+1/2
+F(u
n
m1/2
)n
m1/2
_
= u
n
m

t
x

_
u
n
m+1/2
u
n
m1/2
_
= u
n
m

t
x

_
u
n
m
+u
n
m+1
2

u
n
m1
+u
n
m
2
_
= u
n
m

t
x

_
u
n
m+1
u
n
m1
2
_
.
Martin Kronbichler (TDB) FVM for CFD February 11, 2010 52 / 72
Discretization The Finite Volume Method
FVM derivation, central scheme II
Possibilities for evaluating the central ux:
1. F

(u
L
, u
R
, n) = n F
_
u
L
+u
R
2
_
d,
2. F

(u
L
, u
R
, n) =
n F(u
L
) +n F(u
R
)
2
d.
The central scheme is second order accurate.
But:

the central scheme gives rise to unphysical oscillations around steep


gradients (shocks)

the central scheme ignores the direction of the ow

choice of articial dissipation d can reduce accuracy


Martin Kronbichler (TDB) FVM for CFD February 11, 2010 53 / 72
Discretization The Finite Volume Method
FVM derivation, central scheme II
Possibilities for evaluating the central ux:
1. F

(u
L
, u
R
, n) = n F
_
u
L
+u
R
2
_
d,
2. F

(u
L
, u
R
, n) =
n F(u
L
) +n F(u
R
)
2
d.
The central scheme is second order accurate.
But:

the central scheme gives rise to unphysical oscillations around steep


gradients (shocks)

the central scheme ignores the direction of the ow

choice of articial dissipation d can reduce accuracy


Martin Kronbichler (TDB) FVM for CFD February 11, 2010 53 / 72
Discretization The Finite Volume Method
FVM derivation, second derivatives
Flux tensor F contains terms with rst derivatives in u for the
NavierStokes equations (corresponding to second derivatives in the
dierential form of the equations).
Need to approximate these terms before evaluating the ux function.
Usually, apply central dierences of the kind
_
u
x
_
m1/2
=
u
m
u
m1
x
.
Martin Kronbichler (TDB) FVM for CFD February 11, 2010 54 / 72
Discretization The Finite Volume Method
FVM derivation, second derivatives
Flux tensor F contains terms with rst derivatives in u for the
NavierStokes equations (corresponding to second derivatives in the
dierential form of the equations).
Need to approximate these terms before evaluating the ux function.
Usually, apply central dierences of the kind
_
u
x
_
m1/2
=
u
m
u
m1
x
.
Martin Kronbichler (TDB) FVM for CFD February 11, 2010 54 / 72
Discretization The Finite Volume Method
Higher order discretization schemes for FVM
There are a number of higher order schemes for orders of accuracy 2,
like

MUSCL (Monotone Upstream-centered Schemes for Conservation


Laws)

ENO (Essentially Non-Oscillatory)

WENO (Weighted ENO)

RDS (Residual Distribution Scheme)


They combine dierent techniques to attain a high-order solution without
excessive oscillations, for example so called ux limiters (reducing articial
oscillations), wider stencils over several control volumes, dierent
weightings, reconstruction, and adding degrees of freedom in each control
volume.
Martin Kronbichler (TDB) FVM for CFD February 11, 2010 55 / 72
Discretization The Finite Volume Method
Higher order discretization schemes for FVM
There are a number of higher order schemes for orders of accuracy 2,
like

MUSCL (Monotone Upstream-centered Schemes for Conservation


Laws)

ENO (Essentially Non-Oscillatory)

WENO (Weighted ENO)

RDS (Residual Distribution Scheme)


They combine dierent techniques to attain a high-order solution without
excessive oscillations, for example so called ux limiters (reducing articial
oscillations), wider stencils over several control volumes, dierent
weightings, reconstruction, and adding degrees of freedom in each control
volume.
Martin Kronbichler (TDB) FVM for CFD February 11, 2010 55 / 72
Discretization The Finite Volume Method
Choosing the discretization parameters
A necessary condition for stability of the time discretization is the CFL
condition (depends on the combination of space and time discretization).
For the one dimensional upwind discretization
u
n+1
m
= u
n
m

t
x

_
u
n
m
u
n
m1
_
,
we require

t
x

1.
Interpretation: The dierence approximation (which only uses information
from one grid point to the left/right) can only represent variations in the
solution up to /x from one time step to the next time step size has
to be smaller than that limit
Martin Kronbichler (TDB) FVM for CFD February 11, 2010 56 / 72
Discretization The Finite Volume Method
Steady state calculations
For certain computations, the time-dependance is of no importance.
Sought: steady state solution. when the solution has stabilized, the
change in time will go to zero,
u
n+1
m
= u
n
m

t
|K
m
|

j
|K
j
m
|F

(u
L
, u
R
, n
j
)
. .
residual
= u
n
m
, m.
Measure whether steady state has been achieved: residual gets small.
To reach steady state, many dierent acceleration techniques can be used,
for example local time stepping and multigrid.
Two examples of steady state:

computation of the drag and lift around an airfoil,

mixing problem considered in the computer lab.


Martin Kronbichler (TDB) FVM for CFD February 11, 2010 57 / 72
Discretization The Finite Volume Method
Steady state calculations
For certain computations, the time-dependance is of no importance.
Sought: steady state solution. when the solution has stabilized, the
change in time will go to zero,
u
n+1
m
= u
n
m

t
|K
m
|

j
|K
j
m
|F

(u
L
, u
R
, n
j
)
. .
residual
= u
n
m
, m.
Measure whether steady state has been achieved: residual gets small.
To reach steady state, many dierent acceleration techniques can be used,
for example local time stepping and multigrid.
Two examples of steady state:

computation of the drag and lift around an airfoil,

mixing problem considered in the computer lab.


Martin Kronbichler (TDB) FVM for CFD February 11, 2010 57 / 72
Discretization The Finite Volume Method
Steady state calculations
For certain computations, the time-dependance is of no importance.
Sought: steady state solution. when the solution has stabilized, the
change in time will go to zero,
u
n+1
m
= u
n
m

t
|K
m
|

j
|K
j
m
|F

(u
L
, u
R
, n
j
)
. .
residual
= u
n
m
, m.
Measure whether steady state has been achieved: residual gets small.
To reach steady state, many dierent acceleration techniques can be used,
for example local time stepping and multigrid.
Two examples of steady state:

computation of the drag and lift around an airfoil,

mixing problem considered in the computer lab.


Martin Kronbichler (TDB) FVM for CFD February 11, 2010 57 / 72
Discretization The Finite Volume Method
FVM for the incompressible NavierStokes equations

The incompressible NavierStokes equations are a system in ve


equations (u, p, T), so go through them one by one according to the
above procedure

Need to take special care of p, since it does not involve a time


derivative

Computational domain and material parameters , specied from


application

Initial and boundary conditions complete the formulation


Martin Kronbichler (TDB) FVM for CFD February 11, 2010 58 / 72
Discretization The Finite Volume Method
Initial condition
The state of all variables at time t
0
has to be dened in order to initiate
the solution process.
For example
u|
t=0
= u
0
.
Martin Kronbichler (TDB) FVM for CFD February 11, 2010 59 / 72
Discretization The Finite Volume Method
Boundary conditions, inow
The inow is the part of the domain where u n < 0.
Setting an inow Dirichlet boundary condition, that is u = u
in
on K
in
:

strongly imposed, set the inow boundary node values to the


respective value
U
m
= U
in
for all faces K
m
on K
in
.

weakly imposed, use the numerical ux,


F

(U
m
, U
in
, n).
The inow data can be viewed as given in a ghost point; boundary
treated as the interior.
Martin Kronbichler (TDB) FVM for CFD February 11, 2010 60 / 72
Discretization The Finite Volume Method
Boundary conditions, inow
The inow is the part of the domain where u n < 0.
Setting an inow Dirichlet boundary condition, that is u = u
in
on K
in
:

strongly imposed, set the inow boundary node values to the


respective value
U
m
= U
in
for all faces K
m
on K
in
.

weakly imposed, use the numerical ux,


F

(U
m
, U
in
, n).
The inow data can be viewed as given in a ghost point; boundary
treated as the interior.
Martin Kronbichler (TDB) FVM for CFD February 11, 2010 60 / 72
Discretization The Finite Volume Method
Boundary conditions, inow
The inow is the part of the domain where u n < 0.
Setting an inow Dirichlet boundary condition, that is u = u
in
on K
in
:

strongly imposed, set the inow boundary node values to the


respective value
U
m
= U
in
for all faces K
m
on K
in
.

weakly imposed, use the numerical ux,


F

(U
m
, U
in
, n).
The inow data can be viewed as given in a ghost point; boundary
treated as the interior.
Martin Kronbichler (TDB) FVM for CFD February 11, 2010 60 / 72
Discretization The Finite Volume Method
Boundary conditions, outow
The outow is the part of the domain where u n > 0.
Treating outow boundaries is more complicated than inow parts.
Usually one does a weak formulation such that
1. F

(U
L
, U
L
, n) is used as ux function,
2. F

(U
L
, U

, n) is used as ux function with U

a far-eld
velocity/pressure/temperature.
There are also strong formulations.
Beware of articial back ows!
A common trick is to make the domain big enough to avoid distorting the
solution in the domain of interest.
Martin Kronbichler (TDB) FVM for CFD February 11, 2010 61 / 72
Discretization The Finite Volume Method
Boundary conditions, outow
The outow is the part of the domain where u n > 0.
Treating outow boundaries is more complicated than inow parts.
Usually one does a weak formulation such that
1. F

(U
L
, U
L
, n) is used as ux function,
2. F

(U
L
, U

, n) is used as ux function with U

a far-eld
velocity/pressure/temperature.
There are also strong formulations.
Beware of articial back ows!
A common trick is to make the domain big enough to avoid distorting the
solution in the domain of interest.
Martin Kronbichler (TDB) FVM for CFD February 11, 2010 61 / 72
Discretization The Finite Volume Method
Boundary conditions, solid walls
The solid wall is the part of the domain where u n = 0.
For viscous (NavierStokes) ow we apply a no-slip condition
u = 0.
These boundary conditions are usually imposed strongly.
Martin Kronbichler (TDB) FVM for CFD February 11, 2010 62 / 72
Discretization The Finite Volume Method
Heat transfer
When considering heat transfer for the incompressible NavierStokes
equations, we also need to assign a BC for the temperature T. Two
mechanisms can be applied:

specify temperature with a Dirichlet BC, T = T


w
, or

specify heat ux with a Neumann BC, T/n = f


q
/.
Martin Kronbichler (TDB) FVM for CFD February 11, 2010 63 / 72
Discretization The Finite Volume Method
Turbulence
Turbulence
Martin Kronbichler (TDB) FVM for CFD February 11, 2010 64 / 72
Turbulence and its modeling
Introduction, dimensionless form
In CFD, a scaled dimensionless form of the NavierStokes equation is often
used.
We introduce new variables
x

i
=
x
i
L
, u

i
=
u
i
U
, p

=
p
U
2

,

x
i
=
1
L

i
,

t
=
U
L

,
in which the incompressible NavierStokes equations read

= 0,
u

+(u

)u

+

UL
..
Re
1

2
u

.
Martin Kronbichler (TDB) FVM for CFD February 11, 2010 65 / 72
Turbulence and its modeling
Reynolds number and turbulence
The Reynolds number is dened as
Re =
UL

=
Inertial forces
Viscous forces
,
where U, L, are the characteristic velocity, characteristic length, and the
kinematic viscosity, respectively.
Fluids with the same Reynolds number behave the same way.
When the Reynolds number becomes larger than a critical value, the
formerly laminar ow changes into turbulent ow, for example at
Re 2300 for pipe ows.
Martin Kronbichler (TDB) FVM for CFD February 11, 2010 66 / 72
Turbulence and its modeling
Reynolds number and turbulence
The Reynolds number is dened as
Re =
UL

=
Inertial forces
Viscous forces
,
where U, L, are the characteristic velocity, characteristic length, and the
kinematic viscosity, respectively.
Fluids with the same Reynolds number behave the same way.
When the Reynolds number becomes larger than a critical value, the
formerly laminar ow changes into turbulent ow, for example at
Re 2300 for pipe ows.
Martin Kronbichler (TDB) FVM for CFD February 11, 2010 66 / 72
Turbulence and its modeling
Characterization of turbulence
Turbulent ows are

time dependent

three dimensional

irregular

vortical ( = u)
Image from http://en.wikipedia.org
Describing the turbulence can be done in many ways, and the choice of the
method depends on the application at hand and on computational
resources.
Martin Kronbichler (TDB) FVM for CFD February 11, 2010 67 / 72
Turbulence and its modeling
Direct Numerical Simulation (DNS)

All scales in space and time are resolved.

No modeling of the turbulence.

Limited to small Reynolds numbers, because extremely ne grids and


time steps are required, O(Re
3
) spatial and temporal degrees of
freedom.
Applications of DNS:

Turbulence research.

Reference results to verify other turbulence models.


Martin Kronbichler (TDB) FVM for CFD February 11, 2010 68 / 72
Turbulence and its modeling
Large Eddie Simulation (LES)
Only the large scales are resolved, and small scales are modeled.
Active research.
LES quite popular in certain industries, but still very costly.
Martin Kronbichler (TDB) FVM for CFD February 11, 2010 69 / 72
Turbulence and its modeling
Reynolds-Averaged NavierStokes (RANS) I
Concept introduced by Reynolds in 1895. The most commonly used
approach in industry. Only time averages are considered, nonlinear eects
of the uctuations are modeled.
Use the decomposition
u(x, t) = u(x, t)
. .
time average
+ u

(x, t)
. .
uctuation
,
where the time average is
u(x, t) =
1

_
t+
t
u(x, ) d,
(spatial averaging or ensemble averaging can otherwise be used).
Martin Kronbichler (TDB) FVM for CFD February 11, 2010 70 / 72
Turbulence and its modeling
Reynolds-Averaged NavierStokes (RANS) II
Continuity equation for averaged quantities:
u = 0.
Momentum equations:
u
t
+(u )u +(u

)u

=
1

p +
2
u +f,
or, equivalently,
u
t
+(u )u =
_

pI +u u

_
+f,
Martin Kronbichler (TDB) FVM for CFD February 11, 2010 71 / 72
Turbulence and its modeling
Reynolds-Averaged NavierStokes (RANS) III
u
t
+(u )u =
_

pI +u u

_
+f,
u = 0.
The Reynolds stress term u

contains uctuations, and its eect


needs to be modeled.
Examples are Spalart-Allmaras, K , K , and SST.
Martin Kronbichler (TDB) FVM for CFD February 11, 2010 72 / 72

You might also like