Computational Fluid Dynamics Introduction
Transcript of Computational Fluid Dynamics Introduction
-
7/31/2019 Computational Fluid Dynamics Introduction
1/18
26.03.2004
Sl ide 1 Hchstleistungsrechenzentrum Stut tgar t
C.-D. Munz1, S. Roller2, M. Dumbser1
University of Stuttgart1Institute for Aerodynamics and Gas Dynamics (IAG)
www.iag.uni-stuttgart.de2High-Performance Computing-Center Stuttgart (HLRS)
www.hlrs.de
Introduction to Computational Fluid Dynamics
1The Underlying Equations
2
Contents
1. Equations
2. Finite Volume Schemes
3. Linear Advection Equation
4. Systems of Advection Equations
5. Scalar Conservation Law
6. One-dimensional Euler Equations7. Godunov-Type Schemes
8. Flux-Vector Splitting Schemes
9. Second Order Accuracy MUSCL Schemes
10. Boundary Conditions
11. Finite-Volume Schemes in Multi-Dimensions
12. ENO-/ WENO Schemes
13. Discontinuous Galerkin Finite Element Methods
-
7/31/2019 Computational Fluid Dynamics Introduction
2/18
3
1. Equations
Conservation equation
e.g.: Mass conservation
: normal
mass in V :
continuum assumption, density
nr
nr
dVV
4
1. Equations
Conservation equation
e.g.: Mass conservation
: normal
mass in V :
continuum assumption, density
nr
nr
No mass can appear or disappear
dSnfdVdt
d
V
m
V
=r
dVV
-
7/31/2019 Computational Fluid Dynamics Introduction
3/18
5
Change of mass in V flux through boundary
continuously differentiable
(Gauss theorem)
V arbitrary
dSnfdVdt
d
Vm
V =r
mf,
( ) =+V
mt0dVf
( ) 0=+ vt
6
The Compressible Navier-Stokes Equations
Equation of state:
( ) 0v t =+
( ) ( )( ) pvvvt
=++ o
( )( ) qv)(peve t +=++
( ) ( )( )221 ve11p ==
pressure
viscous stress tensor
heat flux vector
p
q
density
speed
total energy
v
e
-
7/31/2019 Computational Fluid Dynamics Introduction
4/18
7
Euler Equations
Equation of state:
( ) 0v t =+
( ) ( )( ) 0pvvv t =++ o
( )( ) 0pevet
=++
( ) ( )( )221 ve11p ==
pressurepdensity
speed
total energy per unit
volume
v
e
8
Equations of Fluid Dynamics
Compressible Navier-Stokes equations
Conservation equations for mass, momentum and energy
with viscosity and heat conduction
hyperbolic parabolic
Incompressible Navier-Stokes
equations
parabolic elliptic
0v
=c
M
Euler equations
gas dynamics
hyperbolic
Re
-
7/31/2019 Computational Fluid Dynamics Introduction
5/18
9
2. Finite Volume Schemes
( ) [ ]T,0Din0ufu t =+
smoothpiecewiseboundary
fr,
j
kjj
j
C
kjCCCD
==U
iC
Discretization of space
Grid
10
( )( ) dtdSntxufuCuC nn j
t
t C
n
jj
n
jj +
+ =1
,1 r
[ ]1nnj t,tCovernIntegratio +
Evolution equations for mean values
Direct approximation of the integral conservation laws:
Finite volume scheme
Basic part: Appropriate approximation of the flux,
numerical flux
-
7/31/2019 Computational Fluid Dynamics Introduction
6/18
11
Finite Volume Scheme in One Dimension
x
t
1ix ix 1+ix
1+nt
nt
+ +
+ +
=+
1n
n
1/2i
1/2i
1n
n
1/2i
1/2i
t
t
x
x
x
t
t
x
x
t 0dxdtt))f(u(x,t)dx(x,u
[ ] [ ]1nn1/2i1/2-i t,tx,xovernIntegratio ++
12
))dtt,f(u(xt
1esapproximatg
)dxtu(x,x
1esapproximatu
1n
n
1/2i
1/2i
t
t
1/2i1/2i
x
x
n
n
i
+
+
++
)g-(gx
tuu n1/2-i
n
1/2i
n
i
1n
i ++ =
with
Finite Volume Scheme Scheme in Conservation Form
-
7/31/2019 Computational Fluid Dynamics Introduction
7/18
13
3. Linear Advection Equation
=+ auau xt ,0
sticscharacteri
( ) ( ) adt
tdxtxx == with:C
:Solution
satisfiesttxuufunctionA ,=
( )( ) xt uauttxudt
d+=,
CalongconstantSolution = uu
14
Solution of Initial Value Problem
( ) ( ) = xxqxu allfor0,
x
t
P
00 tax 0x
( )a
dt
tdx=
( ) ( ) txtaxqtxu ,allfor, =
-
7/31/2019 Computational Fluid Dynamics Introduction
8/18
15
Upwind Scheme
x
t
1ix ix 1+ix
1+nt
nt
Grid
1forstable
0
:0
1
1
+
axt
x
uua
t
uu
a
n
i
n
i
n
i
n
i
(CFL-Condition)
16
CIR Method
( )
( )nin
i
n
i
n
i
n
i
n
i
n
i
n
i
n
i
n
i
n
in
i
n
i
uuux
ta
uux
tauu
auu
auu
x
tauu
11
11
1
1
11
22
2
ionReformulat
0for
0for
(1946)ReesIsaacson,Courant,
+
++
+
+
+
+
=
=
dissipation
central difference
-
7/31/2019 Computational Fluid Dynamics Introduction
9/18
17
Reformulation of the CIR-Method I, Godunovs Idea
x
u
xi-1/2 xi+1/2 xi+3/2
n
iu
[ ]1/2i1/2-inini x,xfor xu(x)u +=
Godunovs Idea
constantpiecewiseu n
18
1. Solve the initial value problem
[ ]1/2i1/2-in
i
n
n
xt
x,xfor xu(x)u
with
Rfr x(x)uu(x,0),0auu
+=
==+
x
u
xi-1/2 xi+1/2 xi+3/2
-
7/31/2019 Computational Fluid Dynamics Introduction
10/18
19
1ax
t:conditionCFL,t)dxu(x,
x
1:u
1/2i
1/2i
x
x
n
i = +
Result: CIR-method
x
u
xi-1/2 xi+1/2 xi+3/2
2. Average the exact solution
20
Reformulation of the CIR-Method II
x
t
1ix ix 1+ix
1+nt
nt
[ ] [ ]
+ +
+ +
=+
++1n
n
1/2i
1/2i
1n
n
1/2i
1/2i
t
t
x
x
t
t
x
x
1nn1/2i1/2-i
0t)dxdtau(x,t)dxu(x,
t,tx,xovernIntegratio
-
7/31/2019 Computational Fluid Dynamics Introduction
11/18
21
n
1/2-i
n
1/2i
n
i
1n
i gt-gtuxux ++ =
with
)u,g(ug:fluxNumerical
)dtt,au(xt
1esapproximatg
)dxtu(x,x
1esapproximatu
1ii1/2i
t
t
1/2i1/2i
x
x
n
n
i
1n
n
1/2i
1/2i
++
++
=
+
+
22
Upwind-type Flux Calculation
)u(uax
t)u(ua
x
t-uu
formonconservatiinScheme
uaua
0aforau
0aforau)u,g(ug
n
i
n
1i
n
1i
n
i
n
i
1n
i
1i
-
i
1i
i
1ii1/2i
=
+=
==
+
++
++
+
++
Result: CIR-method
-
7/31/2019 Computational Fluid Dynamics Introduction
12/18
23
Reformation of the CIR-Method III
Riemann Problem
>
-
7/31/2019 Computational Fluid Dynamics Introduction
13/18
25
A matrixmm
4. Systems of Advection Equations
0=+ xt Auu
eigenvectors
= mrrrR ...21
Diagonalisation ( )maadiagARR ,...,: 11 ==
maaa
-
7/31/2019 Computational Fluid Dynamics Introduction
14/18
-
7/31/2019 Computational Fluid Dynamics Introduction
15/18
-
7/31/2019 Computational Fluid Dynamics Introduction
16/18
31
Riemann problem
Example 1:
( )
>
shock wave
32
Riemann problem
Example 2:
( )
>+
rarefaction wave
1=t
x1=
t
x
-
7/31/2019 Computational Fluid Dynamics Introduction
17/18
33
Solution of the Riemann problem
waveshock:rl uu >
( )
( ) ( )
lr
lr
r
l
uu
ufufs
st
xu
st
xu
txu
=
>