Professional Documents
Culture Documents
ME7310 Course Learning Objectives
ME7310 Course Learning Objectives
ME7310 Course Learning Objectives
• Textbook
• Computational Fluid Dynamics for Engineers, Cambridge
University Press, 2011.
• Project based course
• 6 tutorials, 2 are available at www.cambridge.org\9781107018952
• Objectives
• Understand the physics and significance of flow and
models used in CFD
• Hands on experience in CFD
• Critical attitude
1
References
Computational Fluid Dynamics for Engineers,
Bengt Andersson et al., Cambridge, 2011.
• An Introduction to Computational Fluid Dynamics: The
Finite Volume Method, Versteeg, H.K. & Malalasekera,
W., Prentice Hall, 2007 (2nd ed).
• Mixture Formation in Internal Combustion Engines,
Baumgarten, C., Springer, 2006.
• Turbulent Flows, Pope, S.B., Cambridge, 2000.
• A First Course in Turbulence, by Tennekes H.& Lumley
J.L., The MIT Press, 1972.
• Engines: An Introduction, Lumley J.L., Cambridge, 1999
• A First Course in Computational Fluid Dynamics, by H.
Aref and S. Blachandar, Cambridge, 2018.
3
2
What can be simulated with CFD?
• Flow, laminar and turbulent
• Single phase and multiphase
• Flow in porous materials
• Mass and heat transfer
• Convection, diffusion and reaction
• Phenomena on the boundaries
• Reaction
• Melting
• Dissolution
• Radiation
• Free surfaces (waves)
Advantages of CFD
• Insight
• CFD analysis shows you parts of the system or
phenomena happening within the system that would not
otherwise be visible through any other means.
• Foresight
• Possible to test many variations,
• Answer many ‘what if?’
• Efficiency
• Better and faster design or analysis leads to shorter
design cycles.
3
Course Content
• [Single-phase] Flow and Transport Phenomena
– Conservation of
– Mass
– Momentum
– Energy
– Species
• Numerical aspects of CFD (ME5995)
• Turbulence models
• Mixing and Chemical Reactions
• Multiphase flows (ME7995)
• ICE Engine (Uns. Turb. Spray Combustion Flow)
• Best practice guidelines
BEV-Heft 13.1
pp: 383~392
4
What is difficult in CFD?
• Meshing (Grid, Cell)
• Too fine mesh is slow and too coarse is less accurate
• Low quality mesh cause convergence problems
• Numerical methods (Schemes)
• Balance between stability and accuracy
• Reaching convergence
• Physical Models
• Turbulence simulations
• Multiple Time- an Length- scales
• Balance between Accuracy, Stability and Simulation storage/time
• Chemical Reaction simulations
• Stiff Source Terms
• Multiple Species and Time- scales
• Multiphase simulations
• Simple models have severe limitations
• Advanced models are less accurate and unstable
2
U j S ( )
t j x j j x j x j
j=1 and 2 for 2D and j=1,2, and 3 for 3D
2 2 2
U1 +U 2 +U 3 = + S ( )
t x1 x2 x3 x1x1 x2x2 x3x3
Computational Fluid Dynamics for Engineers, Chalmers University
Cambridge University Press, 2011
5
Tensor notation [U1,U2 ,U3 ]
For a vector is the equation written as
U i U i 2U i
U j = + S (U i )
t x j x j x j
the summation reads (NOTE there is no summation over the vector elements,
only the repeated indices in the same term)
U i U i 2U i
U j = x x + S (U i )
t j x j j j j
The Second order PDE can be classified according to the sign of the
Determinant: D = B2 - 4AC
(a) elliptic if D < 0
(b) parabolic if D = 0
(c) hyperbolic if D > 0
6
Mathematical Classification of PDE & Flows
Hyperbolic Parabolic Elliptic
1.Two real distinctive 1.A single real set of 1.Imaginary or complex.
characteristics. characteristics.
2. The information
2. The information 2. There are no special
propagates in a
travels to downstream directions of the
particular direction sowithin the domain from information propagation.
that one datum needs initial plane of data
to be given at an initial
satisfying the specified
point on each
boundary conditions.
characteristic 3. Laplace’s or
Poisson’s equation
3. Unsteady heat
3.The first order wave conduction in 1-D 2 2
equation:
u u T 2
u 2
x 2
y
a
t x 2 0, or f (x, y)
t x
a 0
Elliptic problems
• Elliptic equations are characteristic of diffusion problems, this includes many
(but not all) steady state flows.
• Examples are potential flow, the steady state temperature distribution in a rod of
solid material, and equilibrium stress distributions in solid objects under applied
loads.
• For potential flows the velocity is expressed in terms of a velocity potential:
u=. Because the flow is incompressible, .u=0, which results in 2=0. This is
also known as Laplace’s equation:
2 2
0
x 2 y 2
• The solution depends solely on the boundary conditions. This is also known as a
boundary value problem.
• A disturbance in the interior of the solution affects the solution everywhere else.
The disturbance signals travel in all directions.
• As a result, solutions are always smooth, even when boundary conditions are
discontinuous. This makes numerical solution easier!
14
7
Parabolic problems
• Parabolic equations describe marching problems. This includes time
dependent problems which involve significant amounts of dissipation.
Examples are unsteady viscous flows and unsteady heat conduction. Steady
viscous boundary layer flow is also parabolic (march along streamline, not in
time).
• An example is the transient temperature distribution in a cooling down rod:
t=0
2
2
t x
Hyperbolic problems
• Hyperbolic equations are typical of marching problems with negligible
dissipation.
2 2
• An example is the wave equation: c2 2
t
2
x
• This describes the transverse displacement of a string during small amplitude
vibrations. If y is the displacement, x the coordinate along the string, and a the
initial amplitude, the solution is:
ct x
y ( x, t ) a cos sin
L L
• Note that the amplitude is independent of time, i.e. there is no dissipation.
• Hyperbolic problems can have discontinuous solutions.
• Disturbances may affect only a limited region in space. This is called the zone of
influence. Disturbances propagate at the wave speed c.
• Local solutions may only depend on initial conditions in the domain of
dependence.
• Examples of flows governed by hyperbolic equations are shockwaves in
16
transonic and supersonic flows.
8
Classification of Fluid Flow Equations
Steady Flow Unsteady Flow
Viscous flow Elliptic Parabolic
Inviscid flow M < 1 (subsonic) Hyperbolic
Elliptic
M> 1 (supersonic) Hyperbolic
Hyperbolic
Thin shear layers Parabolic Parabolic
• For inviscid flows at M<1, pressure disturbances travel faster than the
flow speed. If M>1, pressure disturbances can not travel upstream.
Limited zone of influence is a characteristic of hyperbolic problems.
• In thin shear layer flows, velocity derivatives in flow direction are much
smaller than those in the cross flow direction. Equations then
effectively contain only one (second order) term and become
parabolic. Also the case for other strongly directional flows such as
fully developed duct flow and jets.
17
9
The continuity balance
x1+ x1, x2+ x2, x3+ x3
x3
U1 U 2 U 3
0
( U1) x1 ( U1) x 1+ x 1
t x1 x2 x3
x3
U j
0
x2 x2 t x j
x1
x1
Pressure is transported with the speed of sound and at subsonic velocity U<0.1-0.3 c
the fluid can be assumed incompressible ( = constant)
U j U1 U 2 U 3
0 (the index j is repeated) i.e. 0
x j x1 x2 x3
The CFD program solves for velocity and pressure and the continuity balance
is solved by introducing pressure by the pressure velocity coupling
e.g. Poisson equation
P U iU j
xi x
i xi x j
Viscous transport
dU1
Gas 21
dx2
The second index denote momentum direction
The first index the direction of the transport
Liquid
10
Viscous stresses
• Shear stress • Total stress
U1 U 2 U i U j 2 U k
12 21 ij ji ij
x j xi 3 xk
x2 x1
• Normal stress • Incompressible flow U k
0
xk
U i U j
U1 2 U U 2 U 3 ij ji
11 2 3 1 x j xi
x1
x1 x2 x3
Momentum balance
U1 momentum
Navier-Stokes equations
U1 U U1 U1 1 P 1 11 1 21 1 31
U1 1 U 2 U3 g1
t x1 x2 x3 x1 x1 x2 x3
U 2 U 2 U 2 U 2 1 P 1 12 1 22 1 32
U1 U2 U3 g2
t x1 x2 x3 x2 x1 x2 x3
U 3 U 3 U 3 U 3 1 P 1 13 1 23 1 33
U1 U2 U3 g3
t x1 x2 x3 x3 x1 x2 x3
11
The Fundamental Laws Governing Transport Processes
Coordinate Systems
Eulerian Lagrangian
1. Fixed control volume in 1. Attention is fixed on a particular mass
space. of fluid as it flows.
2. Independent variables: 2. Independent variables: coordinates
spatial coordinate, i.e., x, y, z, which a specified fluid element passed
and t. through at time to, i.e., xo, yo, zo, and to.
3. Most problems can be In other word, if it is known that our
solved in the framework. particular portion of fluid passed
through the coordinates xo, yo, and zo at
some time to, then its position at some
later time may be calculated if the
velocity components u, v, and w are
known.
1. The term D/Dt is the so-called “material derivative. ”It represents the total change in
the quantity as seen by an observer who is following the fluid and is watching a
particular mass of the fluid.
2. The right-hand side represents the total change in expressed in eulerian coordinates.
3. The equation expresses the Lagrangian rate of change of for a given fluid element in
terms of the Eulerian derivatives
12
Energy balance
• h hm hT hC Total energy
• hm 12 U iU i Kinetic energy
T
• hT mn
n
c p ,n dT Thermal energy (Ideal gas)
Tref
• hC mn hn Chemical energy
• gi xi
n
Potential energy
• Using
hm 12 U iU i
PU i P U ijU i U i
Ui P i and U i ij ij
xi xi xi xi xi xi
13
hm 12 U iU i
Balance for mechanical energy ρe
hm hm U i PU i
Ui + P
t xi xi xi
Accumu- Convection Reversible Rate of work
lation conversion done by pressure
to heat of surroundings
U
xi
ijU i ij i
x j
g iU i
hm hm U i PU i
t
Ui
xi
P
xi
xi
xi
ijU i ij Ux i g iU i
j
hm 12 U iU i
28
14
Dissipation of mechanical energy
All energy lost in the flow is dissipated to heat in the flow
or at the walls; for Newtonian fluid:
2
U i 1 U i U j 2 U i
ij W/kg
x j 2 x j xi 3 xi
or
2
U i 1 U i U j 2 U i
ij W/m 3
x j 2 x j xi 3 xi
Heat balance
Energy Equation becomes Temperature-Transport
Equation for ideal gas & Incompressible Flow
( c pT ) c pT 2T U j U k
U j keff P kj Rm (C , T )(H ) ST
t x j x j x j x j x j m
15
Species balance
Geometry modeling
Define geometry and boundaries
Defining models
Add models for turbulence, Grid generation
chemical reactions etc Divide the geometry into
small computational cells
Set properties
Density, viscosity etc
Solve
Choose solver, iteration methods, convergence requirement
Post-processing
Analyze the results
16
Boundary conditions
In Out
L
U U in (0, x)
U U in U U out ( L, x )
L L
P Pout
mk mk ,in
T Tin
Wall
Velocity Heat transport
No slip condition U i U wall ,i •Fixed heat flux
•Fixed temperature
Species •Convective heat transfer
•No penetration •External radiation heat transfer
•Reaction •Combined external radiation and
convection heat transfer
Computational Fluid Dynamics for Engineers, Chalmers University
Cambridge University Press, 2011
Rotational symmetry
Inflow=outflow Outflow
17
Fluid properties
• The equation of state e.g.
• The ideal gas law P
yn
RT
• Cubic equations n M w, n
RT a
P
V b V 2 ubV wb 2
• Viscosity e.g.
• Chapman-Enskog
5 mk BT
• Sutherland’s law
gas
16 2
Pre-processor
• CAD program
• Most commercial CFD programs contains a CAD program
• Most CFD programs can import standard CAD files
• Mesh program
• Divide fluid volume into small computational cells (1000
to 100 millions)
• More accurate meshing in critical areas
• Structured/unstructured mesh
• Problem definition (part of the CFD program)
• Flow properties
• Boundary conditions
• Source terms e.g. reactions
18
Meshing
Bulk Wall
Structured grids
• Structured or unstructured grids depend on how the grid index is
organized
Structured grid
y i
x j
19
ME7310 Mesh/Grid/Cell
tetrahedron pyramid
triangle
arbitrary polyhedron
hexahedron prism or wedge
quadrilateral
40
20
Tri/tet vs. quad/hex meshes
• For simple geometries, quad/hex
meshes can provide high-quality
solutions with fewer cells than a
comparable tri/tet mesh.
41
42
21
Velocity magnitude (0-6 m/s) on a dinosaur
43
44
22
Hybrid mesh example
• Valve port grid.
• Specific regions can be meshed
with different cell types.
tet mesh
• Both efficiency and accuracy are
enhanced relative to a
hex mesh
hexahedral or tetrahedral mesh
alone.
wedge mesh
MESH GENERATION
• Traditional Approach
• Long meshing times
• Meshing by guessing
• Skewed cells
• Grid convergence?
▪ Current State of the Art
• Automated meshing
• Adaptive Mesh
Refinement (AMR)
• Orthogonal cells
• Easy to perform grid
convergence studies
46
23
ME7310 Finite Approximations
Solvers
24
Density-Based Solver Formulation
for Compressible Flow
49
* The first row of the above equation corresponds to the continuity equation. The second,
third, and fourth rows are the momentum equations. The fifth row is the energy equations.
Sometimes, this form of equations is more convenient to the desired numerical algorithm,
i.e., density based algorithm, pressure based, etc.
25
ME7310 The Fundamental Laws Governing Transport Processes
x y z t
For example,
x *
y *
z *
t *
L L L L /V
u v w
u *
v *
w *
*
V V V
p T e
*
p *
T *
e *
V
2
T V
2
0
and the vectors are, t *
x *
y *
z *
* *
u *
u
* *
*
u * 2
p *
*
xx
U *v *
, E * u * v * xy*
*
w *
* u * w * xz*
E t* E *
p *
u *
u * xx* v * xy* w * *
q *
t xz x
v * *
w * *
u
* * *
v *
xy u
* *
w *
*
xz
F
*
v p yy
* *2 * *
, G
*
v w yz
* * * *
* v * w * *yz * w * 2 p * zz*
E * p * v * u * * v * * w * * q * E * p * w * u * * v * * w * * q *
t xy yy yz y t xz yz zz z
26
ME7310 The Fundamental Laws Governing Transport Processes
N
n k j
N s r
E y k e k k W k
j 1
N K N k 1
s fj s
'
jk n k
K
"
jk n k , j 1 ,2 , , N r
k 1 bj k 1
N ' N "
s
s
( n k ) j "
jk '
jk K f n l
jl
K b n l
jl
j j
l 1 l 1
K f A f T
B f j
exp E f R u T
j j j
B
b j
K b j
A b j
T exp E b j
R u T
Post Processing
27
Post Processing
• Analyze the quality of the simulation
• Visualization
– Velocity vectors Avoid auto-scaling!
– Pressure contours
– Concentrations and temperatures
– Flux
– Flow lines, streamlines, streaklines
– Turbulent properties k,,T,L
• Animations
• Quantification
– e.g. calculation of fluxes, integral quantities, averages
Computational Fluid Dynamics for Engineers, Chalmers University
Cambridge University Press, 2011
28