Você está na página 1de 13

Flux Functions

CFD03-1
26.03.2004
Slide 1 Hchstleistungsrechenzentrum Stuttgart
C.-D. Munz
1
, S. Roller
2
, M. Dumbser
1
University of Stuttgart
1
Institute for Aerodynamics and Gas Dynamics (IAG)
www.iag.uni-stuttgart.de
2
High-Performance Computing-Center Stuttgart (HLRS)
www.hlrs.de
Introduction to Computational Fluid Dynamics
3
Flux Functions
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 Equations
7. 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
Flux Functions
CFD03-2
3
7. Godunov Type Schemes
Preliminaries
Simplest flux calculation
( ) ( ) ( ) ( )
1 1
2
1
,
2
1
+ +
+
+ = =
i i i i
i
u f u f u u g g
only stable by adding artifical viscosity
xxxx xx
u x u x
4 2
,
Jameson scheme for transonic flow
Runge-Kutta time step scheme
sophisticated choice of dissipation
4
Piecewise constant solution
Solve the local Riemann problems exactly
Average the exact solution
Godunovs Idea
x
u
x
i-1/2
x
i+1/2
x
i+3/2
n
i
u
n
2 i
u
+
n
1 i
u

n
1 i
u
+
Flux Functions
CFD03-3
5
Formulation as Finite-Volume-Method
numerical flux at
( )
n
2 / 1 i
n
2 / 1 i
n
i
1 n
i
g g
x
t
u u
+
+

=
n
2 / 1 i
g
+
2 / 1 i
x
+
t
n
t
n+1
x
i-1/2
x
i+1/2
x
i+3/2
x
i-1
x
i
x
i+1
x
t
6
Numerical flux of the Godunov-method
Properties
exact conservation
nonlinear wave propagation incorporated
adaptivity
)) u , u ; 0 ( u ( f g
1 i i RP
n
2 / 1 i + +
=
Flux Functions
CFD03-4
7
Approximate Riemann Solution
Definition: w=w(x/t;u
l
,u
r
) is defined to be an approximate
Riemann solution, if the following is valid:
1. a
l
smallest, a
r
largest signal velocity
2. Consistency with the integral conservation
3. Consistency with the integral entropy condition
( ) ( ) ( ) ( ) ( )
l r r l
2 x
2 x
r l
u f u f t u u
2
x
dx u , u ; t x w +


( ) ( ) ( ) ( ) ( ) ( )
l r r l
2 x
2 x
r l
u F u F t U U
2
x
dx u , u ; t x w U +


small enough t
8
Approximate Riemann Solution
Definition: w=w(x/t;u
l
,u
r
) is defined to be an approximate
Riemann solution, if the following is valid:
1. a
l
smallest, a
r
largest signal velocity
2. Consistency with the integral conservation
3. Consistency with the integral entropy condition
( ) ( ) ( ) ( ) ( )
l r r l
2 x
2 x
r l
u f u f t u u
2
x
dx u , u ; t x w +


( ) ( ) ( ) ( ) ( ) ( )
l r r l
2 x
2 x
r l
u F u F t U U
2
x
dx u , u ; t x w U +


small enough t
u
r
u
2
u
1
u
l
x
2
x
2
x
{
t
t
Flux Functions
CFD03-5
9
Godunov-Type Methods
Definition: A method is called Godunov-Type Scheme, if it
satisies
where w is an approximative Riemann solution.
Theorem: A Godunov-type scheme may be written in the
conservation form with the numerical flux:
( ) ( )dx u , u ; t x w
x
1
dx u , u ; t x w
x
1
u
0
2 x
n
1 i
n
i
2 x
0
n
i
n
1 i
1 n
i


+

=
( ) ( )
i
0
2 x
n
1 i
n
i i 2 1 i
u
t 2
x
dx u , u ; t x w
x
1
u f g


+ +
10
The Roe Scheme
Roe-Linearization, P. Roe (1981):
1. A
lr
(u,u) = A(u)
2. A
lr
diagonalizable
3. Mean value property:
( )

>
<
=
= +
+
0 fr x u
0 fr x u
0 , x u
R R in 0 u A u
r
l
x lr t
( ) matrix Roe called is u u A A
r l lr lr
, =
( ) ( ) ( )
l r lr l r
u u A u f u f =
Flux Functions
CFD03-6
11
Theorem: : The solution of the linearized RP satisfies the
consistency with the integral conservation if and
only if satisfies the meanvalue property.
lr
A
x
t
1
a
t
x
=
2
a
t
x
=
3
a
t
x
=
2
x

2
x
12
Roe mean values for a perfect gas
with
( ) ( ) u A u , u A
r l lr
=
( )
|
.
|

\
|
=
+
+
=
+
+
=
2 2
l r
l l r r
l r
l l r r
v
2
1
H 1 c ,
H H
H ,
v v
v
Flux Functions
CFD03-7
13
Solution of the linearized Riemann problem
1. Transformation
2. Constant states

=
=
3
1 i
j j l r
r u u ( ),
l r l r
w w R u u =
2 2 1 1 2
1 1 1
r r u u
r u u
r
l

+ + =
+ =
x
C
1
a
t
x
=
2
a
t
x
=
3
a
t
x
=
t
l
u
1
u
2
u
r
u
( ) [ ] e m v H v
c
+

=
1 1
2
1 2 2
1

( ) [ ]
2 1 1 1
2
1
2
1
+ = c v m
c
2 1 4
=
=
2 2 3
v m
14
Numerical Flux of the Roe Scheme
( )
( )

=
+
+
+
=

+
=
+ =
3
1
1
3
1
2
1
2
1
j
j j j i
i
j
j j j i
i
r a u f g
r a u f g

Usually the average is taken


( ) ( )

=
+ +
+ =
3
1
1 1
2
1
2
1
,
j
j j j i i i i Roe
r a f f u u g
central differencing correction
according to wave propagation
Flux Functions
CFD03-8
15
Properties of the Roe-scheme
A single shock wave or a single contact discontinuity is
resolved exactly.
The Roe method may violate the consistency with the
entropy condition at strong rarefactions
Underestimation of wave velocities at rarefactions
(Einfeldt, Roe, Munz, Sjogreen, J. Comput. Phys. 92 (1991), 272-295).
Entropy-fix:

>
=
otherwise
a for
a
1,3 3 , 1
1,3
~
a
16
The Method of Harten, Lax and Van Leer
x
t
l
a
t
x
=
r
a
t
x
=
2
x

2
x
lr
u
Simplest Godunov-type scheme
t
Flux Functions
CFD03-9
17
HLL Approximate Riemann Solution
state te intermedia a
velocity ve largest wa and smallest a , a
a
t
x
for a
a
t
x
a for a
a
t
x
for a
u ; u ;
t
x
w
lr
r l
r r
r l lr
l l
r l

>

<
=
|
.
|

\
|
18
( ) ( )
l r
l r l l r r
lr
a a
u u u a u a
u
on conservati integral y with Consistenc

+
=
f f
( )
( ) ( )
( )
l r
-
l r
-
l r
-
l r
r
-
l l r
r l HLL
u u
a a
a a
a a
u a u a
u , u g
flux Numerical

=
+
+
+
+
f f
{ }
{ } c v c v
c v c v
r r
l l
+ =
=
, max a
, min a
s velocitie signal of n Calculatio
r
l
Flux Functions
CFD03-10
19
Method of Lax Friedrichs
t
x
: a ,
t
x
: a
r l
= =
{ }
( ) ( ) ( ) ( ) ( )
scheme) - upwind (no
u u
t 2
x
u u
2
1
u , u g
flux numerical
c v , c v max
t
x
condition - CFL
l r r l r l LF
+ =
+ >
f f
20
Riemann solver
Godunov-scheme Roe-scheme HLL-scheme
(Harten, Lax, van Leer)
Exact solution of Exact solution of A priori estimates of
Riemann problem, lin. Riemann problem, the fastest wave speeds,
fixed point problem theory of characteristics
t
x
rarefaction
contact
discontinuity
shock wave
u
r
u
2
u
1
u
l
u
2
t
x u
r
u
1
u
l
t
x
x = a
l
t
u
r
u
1r
u
l
x = a
r
t
t a x
1
=
t a x
2
=
t a x
3
=
Flux Functions
CFD03-11
21
8. Flux-Vector Splitting Methods
Splitting of the flux
with
non-negative EW
non-positive EW
Numerical flux
( ) ( ) ( ) u f u f u f
+
+ =
left right
( )
( )
du
u f d
u A
+
+
=
( )
( )
du
u f d
u A

=
( ) ( ) ( )
1 1
,
+
+
+
+ =
i i i i
u f u f u u g
22
Flux-Vector Splitting of Steger, Warming
Euler Theorem:
Flux of Euler equations is homogenious of degree 1:
Idea: Diagonalization of the Jacobian matrix A(u), splitting of the
diagonal matrices into a positive and a negative one
( ) ( ) u f u f = all for
( ) ( )u u A u f = ( )
( )
du
u f d
u A
Flux Functions
CFD03-12
23
Diagonalization
Splitting of
Splitting of flux:
R R A =
1
( ) c v v c v diag with + = , , :

,
+
+ =
( ) ( )u u A u f

( )
+ + + +
=
3 2 1
, , : a a a diag with
( )

=
3 2 1
, , : a a a diag with
( ) ( ) ( )
1 1
,
+
+
+
+ =
i i i i
u f u f u u g
24
( ) ( )
( )
( ) ( )
( ) 1 - 2
c
a a
2
cv
a a
2
v v
f f
v f f
2
c
a a v f f
a a a 1 2
2

f
2
1 4
1
1 4
2
2
2
1
1,1 1,4
2 1,1 1,3
1 4 1 1,1 1,2
4 1 2 1,1
+ + +
+

+
+ +




Steger-Warming flux into x-direction
Flux Functions
CFD03-13
25
M number Mach
( )
( )
( ) 2c v 1 - C mit
v F
2
1
1 2

C F F
v F F

C
F F
c
v
M , 1 M
4
c
F
1 1
2 1,3 2 1 1,2 1,4
2 1,1 1,3
1
1,1 1,2
1
2
1,1
+ =
+

=
=
=
= + =
+ +
+ +
+ +
+
( )
( )
( ) 2c v 1 - C mit
v F
2
1
1 2

C F F
v F F

C
F F
c
v
M , M 1
4
c
F
1 1
2 1,3 2 1 1,2 1,4
2 1,1 1,3
1
1,1 1,2
1
2
1,1
=
+

=
=
=
= =


1 M
right the Flux to
1 1
F F =
+
left the Flux to
0 F
-
1
=
1 M 1 - < <
-1 M
0 F
1
=
+
1 1
F F =

Flux-vector splitting method of van Leer, x-direction

Você também pode gostar