You are on page 1of 60

AA214B: NUMERICAL METHODS FOR COMPRESSIBLE FLOWS 1 / 60

AA214B: NUMERICAL METHODS FOR


COMPRESSIBLE FLOWS
The Finite Volume Method

These slides are partially based on the recommended textbook: Culbert B. Laney.
“Computational Gas Dynamics,” CAMBRIDGE UNIVERSITY PRESS, ISBN 0-521-62558-0

1 / 60
AA214B: NUMERICAL METHODS FOR COMPRESSIBLE FLOWS 2 / 60

Outline
1 Conservative Finite Volume Methods in One Dimension
2 Introduction to Reconstruction-Evolution Methods
3 First-Order Upwind Reconstruction-Evolution Methods
Scalar Conservation Laws
Euler Equations
Roe’s First-Order Upwind Method for the Euler Equations
4 Introduction to Second- & Higher-Order Reconstruction-Evolution
Methods
5 The MUSCL/TVD Method
The Method of Lines
Flux Splitting
Second-Order Approximation
Van Leer’s Slope Limiter
6 Steger-Warming Flux Vector Splitting Method for the Euler Equations
7 Multidimensional Extensions
2 / 60
AA214B: NUMERICAL METHODS FOR COMPRESSIBLE FLOWS 3 / 60

Note: The material covered in this chapter equally applies to scalar


conservation laws and the Euler equations, in one and multiple
dimensions. To keep matters as simple as possible however, this material
is presented primarily in one dimension then briefly extended to multiple
dimensions.

3 / 60
AA214B: NUMERICAL METHODS FOR COMPRESSIBLE FLOWS 4 / 60
Conservative Finite Volume Methods in One Dimension

Recall that the integral form of a conservation law can be written as


Z xi+1/2 Z t n+1
[u(x, t n+1 ) − u(x, t n )] dx = −
 
[f u(xi+1/2 , t) − f u(xi−1/2 , t) ] dt
xi−1/2 tn

This leads to the following numerical conservation form


\n
∂ ū
∆t = −λ(fˆi+1/2
n
− fˆi−1/2
n
) (1)
∂t i
where
Z xi+1/2 Z t n+1
1 1
ūin ≈ u(x, t n )dx, fˆi+1/2
n

≈ f u(xi+1/2 , t) dt
∆x xi−1/2 ∆t tn
(2)
and the rest of the notation is the same as in the previous Chapter
4 / 60
AA214B: NUMERICAL METHODS FOR COMPRESSIBLE FLOWS 5 / 60
Conservative Finite Volume Methods in One Dimension

ūin is the spatial cell-integral average value of u at time t n — that is,


the average value of u in the cell [xi−1/2 , xi+1/2 ] at time t n
fˆn
i+1/2 is the time-integral average of f at the point xi+1/2
Note that for a uniform spatial discretization, xi = (xi−1 + xi+1 )/2
and therefore
Z xi+1/2
1
g (x)dx = g (xi ) + O(∆x 2 )
∆x xi−1/2
It follows that in this case
if uin is replaced by ūin , ALL concepts and results presented in the
previous Chapter — that is, for the finite difference method —
equally apply for the finite volume method presented in this Chapter
ūin = uin + O(∆x 2 ) ⇒ second-order accuracy in space is not affected
by identifying ūin with uin and vice-versa ⇒ there is no need to
distinguish between finite volume and finite difference when the order
of spatial accuracy is less or equal to 2
the “bar” notation is often dropped in the remainder of this chapter,
particularly when this should not create any confusion
5 / 60
AA214B: NUMERICAL METHODS FOR COMPRESSIBLE FLOWS 6 / 60
Introduction to Reconstruction-Evolution Methods

Two-step finite volume design approach


spatial reconstruction
reconstruct u(x, t n ) in each cell without necessarily accounting for
the upwind direction
this step differentiates the finite volume method which forms u then
f (u), from the finite difference method which forms directly f (u)
temporal evolution
approximate u(xi+1/2 , t) for t n ≤ t ≤ t n+1 then evaluate

1
Z t n+1
fˆi+1/2
n

= f u(xi+1/2 , t) dt
∆t tn

any reasonable approximation based on waves and characteristics


naturally introduces the minimal amount of upwinding required by
the CFL condition
Reconstruction-evolution methods are sometimes called
Godunov-type methods or MUSCL-type methods

6 / 60
AA214B: NUMERICAL METHODS FOR COMPRESSIBLE FLOWS 7 / 60
Introduction to Reconstruction-Evolution Methods

7 / 60
AA214B: NUMERICAL METHODS FOR COMPRESSIBLE FLOWS 8 / 60
Introduction to Reconstruction-Evolution Methods

Example: first-order reconstruction-evolution method for the linear


advection equation
piecewise constant reconstruction in the cell [xi−1/2 , xi+1/2 ]:
u(x, t n ) ≈ pr (x) = ūin
for the linear advection equation, u(x, t) = u(x − a(t − t n ), t n ) and
therefore

u(xi+1/2 , t) ≈ pe,i+1/2 (t) = pr xi+1/2 − a(t − t n )



 n
ūi for 0 ≤ λa ≤ 1
= n
ūi+1 for − 1 ≤ λa ≤ 0

then
Z t n+1 Z t n+1
1 1
fˆi+1/2
n 
= f pe,i+1/2 (t) dt = ape,i+1/2 (t)dt
∆t tn ∆t tn
aūin

for 0 ≤ λa ≤ 1
= n
aūi+1 for − 1 ≤ λa ≤ 0

8 / 60
AA214B: NUMERICAL METHODS FOR COMPRESSIBLE FLOWS 9 / 60
Introduction to Reconstruction-Evolution Methods

What if the previous example was about a nonlinear conservation


law instead of the linear advection equation?
piecewise constant reconstruction
gives rise to a Riemann problem at each cell edge, and the Riemann
problem has an exact solution at x/t = 0
an approximate Riemann solver can be used instead of the true
Riemann solver without changing the numerical solution
higher-order reconstruction
the jump at each cell edge in the higher-order piecewise polynomial
reconstruction gives rise to a problem that lacks a known exact
solution
the exact solution can be approximated using Riemann solvers

9 / 60
AA214B: NUMERICAL METHODS FOR COMPRESSIBLE FLOWS 10 / 60
Introduction to Reconstruction-Evolution Methods

10 / 60
AA214B: NUMERICAL METHODS FOR COMPRESSIBLE FLOWS 11 / 60
First-Order Upwind Reconstruction-Evolution Methods
Scalar Conservation Laws

Suppose that the reconstruction is piecewise constant: Then, each


cell edge gives rise to a Riemann problem
The exact evolution of the piecewise constant reconstruction yields
uin+1 = uin − λ(fˆi+1/2
n
− fˆi−1/2
n
)
where Z t n+1
1
fˆi+1/2
n

= f uRiemann (xi+1/2 , t) dt
∆t tn
Since the solution of the Riemann problem is self-similar a function
of (x − xi+1/2 )/t) , uRiemann (xi+1/2 , t) is constant for all time since
(xi+1/2 − xi+1/2 )/t = 0

=⇒ fˆi+1/2
n
 
= f uRiemann (xi+1/2 , t) = f (uRiemann (0)) (3)

where f uRiemann (xi+1/2 , t) is computed using any exact or
approximate Riemann solver and t is any arbitrary time t > t n
Many first-order upwind methods for scalar conservation laws are
based on (3)
11 / 60
AA214B: NUMERICAL METHODS FOR COMPRESSIBLE FLOWS 12 / 60
First-Order Upwind Reconstruction-Evolution Methods
Scalar Conservation Laws

Upwind methods based on fˆi+1/2


n

= f uRiemann (xi+1/2 , t)
equation (3) assumes that the waves from different cell edges do not
interact (or at least that any interaction does not affect the solution
at the cell edges)
|λa(u)| ≤ 12 ⇒ waves originating at one cell edge cannot interact
with those originating from any other cell edge
|λa(u)| ≤ 1 ⇒ they can, but the interactions cannot reach the cell
edges in one time-step
upwind
CFL condition: |λa(u)| ≤ 1
conservative, consistent, converge when ∆x → 0 and ∆t → 0 and
the CFL condition is satisfied
explicit, finite volume
linearly stable provided the CFL condition is satisfied
satisfy all nonlinear stability conditions discussed in the previous
Chapter
formally first-order accurate in time and space (except possibly at
sonic points)

12 / 60
AA214B: NUMERICAL METHODS FOR COMPRESSIBLE FLOWS 13 / 60
First-Order Upwind Reconstruction-Evolution Methods
Scalar Conservation Laws

Upwind methods based on fˆi+1/2


n

= f uRiemann (xi+1/2 , t) (continue)
if |λa(u)| ≤ 1, waves can interact only if there is a compressive sonic (sonic
⇒ a(u) = 0, compressive ⇒ wave direction switches from right to left)
point inside the cell1

waves at the left cell edge are right-running, counterparts at the right cell
edge are left-running
if the wave speeds are always positive, all waves originating from xi+1/2 are
right-running ⇒ fˆi+1/2
n = f uRiemann (xi+1/2 , t) = f (uin ) ⇒ FTBS


if the wave speeds are always negative, all waves originating from xi+1/2
are left-running ⇒ fˆi+1/2
n n ) ⇒ FTFS

= f uRiemann (xi+1/2 , t) = f (ui+1
the above is true for the exact Riemann solver or any reasonable
approximate Riemann solver ⇒ all first-order upwind methods based on
fˆi+1/2
n

= f uRiemann (xi+1/2 , t) are FTBS or FTFS except near sonic points
where the wave speeds change sign
1 Compressive sonic points typically occur inside stationary or slowly moving shocks.
13 / 60
AA214B: NUMERICAL METHODS FOR COMPRESSIBLE FLOWS 14 / 60
First-Order Upwind Reconstruction-Evolution Methods
Euler Equations

Assuming that the reconstruction is piecewise constant, each cell


gives rise to a Riemann problem and the exact evolution of the
piecewise constant reconstruction yields
Z t n+1
1
Fbxni+1/2 =

Fx WRiemann (xi+1/2 , t) dt
∆t tn

Again, the solution of the Riemann problem being self-similar,


WRiemann (xi+1/2 , t) is constant for all time

=⇒ Fbxni+1/2 = Fx WRiemann (xi+1/2 , t) = Fx (WRiemann (0)) (4)


 


where Fx WRiemann (xi+1/2 , t) is computed using any exact or
approximate Riemann solver and t is any arbitrary time t > t n
Many first-order upwind methods for the Euler equations are based
on (4)

14 / 60
AA214B: NUMERICAL METHODS FOR COMPRESSIBLE FLOWS 15 / 60
First-Order Upwind Reconstruction-Evolution Methods
Euler Equations

Fbxni+1/2 = Fx WRiemann (xi+1/2 , t)




Again, equation (4) assumes that the waves from different cell edges
do not interact (or at least that any interaction does not affect the
solution at the cell edges)
If λρ(A) ≤ 1, waves travel at most one grid cell per time-step: They
can interact, but the interactions cannot reach the cell edges during
a single time-step
Unlike in the case of scalar conservation laws where a compressive
point inside the cell must be present for waves to interact when
|λa(u)| ≤ 1, waves in the subsonic Euler equations interact routinely
for 1/2 ≤ ρ(A) ≤ 1 (since there are always right- and left-running
waves in subsonic flows)
λρ(A) ≤ 1 is also the CFL condition for all first-order upwind
methods
15 / 60
AA214B: NUMERICAL METHODS FOR COMPRESSIBLE FLOWS 16 / 60
First-Order Upwind Reconstruction-Evolution Methods
Euler Equations


Upwind methods based on Fbxni+1/2 = Fx WRiemann (xi+1/2 , t)
if the wave speeds are always positive (as in some supersonic flows),
all waves originating from xi+1/2 are right-running
⇒ Fbxn = Fx WRiemann (xi+1/2 , t) = Fx (Win ) ⇒ FTBS

i+1/2
if the wave speeds are always negative (as in some supersonic flows),
all waves originating from xi+1/2 are left-running
⇒ Fbxni+1/2 = Fx WRiemann (xi+1/2 , t) = Fx (Wi+1
n

) ⇒ FTFS
the above is true for the exact Riemann solver or any reasonable
approximate Riemann solver2 ⇒ all first-order upwind methods based
on Fbxni+1/2 = Fx WRiemann (xi+1/2 , t) are FTBS or FTFS for
supersonic flows

2 Recall that for Roe’s approximate Riemann solver:

− −
Fx (W (0)) ≈ ARL (WR − WL ) + Fx (WL ) → Fx (W (0)) − Fx (WL ) ≈ ARL (WR − WL )
+ +
Fx (W (0)) ≈ −ARL (WR − WL ) + Fx (WR ) → Fx (WR ) − Fx (W (0)) ≈ ARL (WR − WL )

16 / 60
AA214B: NUMERICAL METHODS FOR COMPRESSIBLE FLOWS 17 / 60
First-Order Upwind Reconstruction-Evolution Methods
Euler Equations

Most properties of first-order upwind methods for scalar conservation


laws carry over to first-order upwind methods for the Euler equations
The reverse is not necessarily true:
for example, the Riemann problem for the Euler equations is not
monotonicity preserving but that for scalar conservation laws is
monotonicity preserving ⇒ first-order upwind methods for the Euler
equations based on reconstruction-evolution sometimes produce
spurious oscillations, especially at steady and slowly moving shocks

17 / 60
AA214B: NUMERICAL METHODS FOR COMPRESSIBLE FLOWS 18 / 60
First-Order Upwind Reconstruction-Evolution Methods
Roe’s First-Order Upwind Method for the Euler Equations

Recall Roe’s approximate Riemann solver for the Euler equations


in particular, recall that the linear (approximate) flux function at
x = 0 can be written as
3
1 1X
ARL W (0) = ARL (WR + WL ) − |λk |∆ξk rk
2 2
k=1
1 1
= ARL (WR + WL ) − |ARL |(WR − WL )
2 2
replace WL and WR by Win and Wi+1 n
, respectively, and replace ARL
n
by Ai+1/2
replace also t = 0 by t = t n , and x = 0 by x = xi+1/2
The vector version of Roe’s method becomes

Fbxni+1/2 = Fx WRiemann (xi+1/2 , t)




18 / 60
AA214B: NUMERICAL METHODS FOR COMPRESSIBLE FLOWS 19 / 60
First-Order Upwind Reconstruction-Evolution Methods
Roe’s First-Order Upwind Method for the Euler Equations

Let (λni+1/2 )j , (ri+1/2


n n
)j , and (li+1/2 )j denote the eigenvalues, right
eigenvectors, and left eigenvectors of Ani+1/2 , respectively
n n
Let (∆ξi+1/2 )j = (li+1/2 )T n n
j (Wi+1 − Wi )
Then
3
1  1X n
Fbxni+1/2 = n
Fx (Wi+1 ) + Fx (Win ) − n
|λi+1/2 |j (∆ξi+1/2 n
)j (ri+1/2 )j
2 2
j=1
3
1 n
 1 n−1 X n
= Fx (Wi+1 ) + Fx (Win ) − Qi+1/2 n
|λi+1/2 |j (∆ξi+1/2 )j
2 2
j=1
1 n 1 n−1
) + Fx (Win ) − |Λn n

= Fx (Wi+1 Q |∆ξi+1/2
2 2 i+1/2 i+1/2
1 n 1 n−1
) + Fx (Win ) − |Λn |Q n n

= Fx (Wi+1 Q ∆Wi+1/2
2 2 i+1/2 i+1/2 i+1/2
1 n 1 n
) + Fx (Win ) − n
− Win )

= Fx (Wi+1 |A |(Wi+1 (5)
2 2 i+1/2
19 / 60
AA214B: NUMERICAL METHODS FOR COMPRESSIBLE FLOWS 20 / 60
First-Order Upwind Reconstruction-Evolution Methods
Roe’s First-Order Upwind Method for the Euler Equations

Recall also that the Roe-average matrix must satisfy


n
Fx (Wi+1 ) − Fx (Win ) = Ani+1/2 (Wi+1
n
− Win )

Also recall that


+ − + −
n
Ai+1/2 + Ani+1/2 = Ani+1/2 and Ani+1/2 − Ani+1/2 = |Ani+1/2 |

It follows that
 + −

n
Fx (Wi+1 ) − Fx (Win ) = Ani+1/2 + Ani+1/2 (Wi+1
n
− Win )

For this reason, Roe’s first-order upwind method is sometimes called


a flux difference splitting method
+ −
n
) − Fx (Win ) = Ani+1/2 (Wi+1
n
− Win ) + Ani+1/2 (Wi+1
n
− Win )

Fx (Wi+1

20 / 60
AA214B: NUMERICAL METHODS FOR COMPRESSIBLE FLOWS 21 / 60
Introduction to Second- & Higher-Order Reconstruction-Evolution Methods

Start with the temporal evolution


Z t n+1
1
Fbxni+1/2 ≈

Fx W (xi+1/2 , t) dt
∆t tn

Step 1: Compute a second or even higher-order approximation of the


above integral
for example, use the midpoint rule
Z t n+1
1  
Fx W (xi+1/2 , t) dt = Fx W (xi+1/2 , t n+1/2 ) + O(∆t 2 )

∆t tn

or the trapezoidal rule


Z t n+1
1 1  
Fx W (xi+1/2 , t n+1 )

Fx W (xi+1/2 , t) dt =
∆t tn 2
1
Fx W (xi+1/2 , t n ) + O(∆t 2 )

+
2

21 / 60
AA214B: NUMERICAL METHODS FOR COMPRESSIBLE FLOWS 22 / 60
Introduction to Second- & Higher-Order Reconstruction-Evolution Methods

Step 2: Perform a Taylor series expansion about t = t n — for


example
 ∂Fx
Fx W (xi+1/2 , t n ) + W (xi+1/2 , t n ) (t − t n )
 
Fx W (xi+1/2 , t) =
∂t
O (t − t n )2

+

Step 3: Express time derivatives in the Taylor series in terms of space


derivatives — for example, the time derivative of the momentum
flux can be obtained from the conservation of momentum
∂ ∂vx ∂ ∂p
(ρvx ) = −ρvx + vx (ρvx ) −
∂t ∂x ∂x ∂x

22 / 60
AA214B: NUMERICAL METHODS FOR COMPRESSIBLE FLOWS 23 / 60
Introduction to Second- & Higher-Order Reconstruction-Evolution Methods

Step 4: Differentiate the spatial reconstruction at time level n to


approximate the spatial derivative at (xi+1/2 , t n )
note that in general, the reconstruction and/or its derivatives contain
jump discontinuities at the cell edges at xi+1/2
“average” the left and right limits, Wi+1/2,L (t) and Wi+1/2,R (t), of
the approximation of W (xi+1/2 , t)
the Riemann solver average is the only average that yields the exact
solution in the case of piecewise constant reconstruction
use Wi+1/2,L (t) and Wi+1/2,R (t) as the left and right states in the
exact solution of the Riemann problem

23 / 60
AA214B: NUMERICAL METHODS FOR COMPRESSIBLE FLOWS 24 / 60
Introduction to Second- & Higher-Order Reconstruction-Evolution Methods

Because the above four-step procedure is based on Taylor series and


differential forms, it does not apply at shocks
At shocks, all higher-order terms of the approximation should be
eliminated and a return to first-order piecewise constant
reconstruction becomes essential

24 / 60
AA214B: NUMERICAL METHODS FOR COMPRESSIBLE FLOWS 25 / 60
The MUSCL/TVD Method

MUSCL: Monotonic Upwind Scheme for Conservation Laws


More specifically, this section describes the method proposed in 1986
by Anderson, Thomas, and Van Leer who called it “the MUSCL”
method, and not the original MUSCL method designed in 1979 by
Van Leer using the approach summarized in the previous section
Both of this method and the original MUSCL method are
reconstruction-evolution methods

25 / 60
AA214B: NUMERICAL METHODS FOR COMPRESSIBLE FLOWS 26 / 60
The MUSCL/TVD Method
The Method of Lines

Two-step approximation procedure


Spatial Discretization
time is frozen and space is discretized

∂Fx F
bx
s,i+1/2
(t) − F
bx
s,i−1/2
(t)
(xi , t) ≈
∂x ∆x
the above equation is called the semi-discrete finite volume/difference
approximation
Fbx is called the semi-discrete conservative numerical flux
s
the semi-discrete approximation comprises a system of ordinary
differential equations
in many cases, it is needed only at discrete time levels, in which case
it can be written as
bn
F bn
dWin xs,i+1/2 − Fxs,i−1/2
≈− (6)
dt ∆x
where Win = Wi (t n ) and F
bn n
xs,i+1/2 = Fxs,i+1/2 (t )
b

26 / 60
AA214B: NUMERICAL METHODS FOR COMPRESSIBLE FLOWS 27 / 60
The MUSCL/TVD Method
The Method of Lines

Two-step approximation procedure (continue)

dWin Fbxns,i+1/2 − Fbxns,i−1/2


≈−
dt ∆x

Temporal Discretization
any ordinary differential equation solver (time-integration algorithm)
can be used to solve Eq. (6)
in other words, space is frozen and time is discretized
the resulting approximation — for example using FT
bn
F bn
Win+1 − Win xi+1/2 − Fxi−1/2
=
∆t ∆x
is called the fully discrete finite difference approximation, and F
bx is
called the fully discrete conservative numerical flux
The two-stage approximation procedure described above is
sometimes called the method of lines, where the lines are the
coordinate lines x = cst and t = cst
27 / 60
AA214B: NUMERICAL METHODS FOR COMPRESSIBLE FLOWS 28 / 60
The MUSCL/TVD Method
Flux Splitting

In the context of the finite volume method


t n+1
Z !
bn n 1
= Fx W (xi+1/2 , t n )
 
F xs,i+1/2 = Fxs,i+1/2 (t ) ≈
b Fx W (xi+1/2 , t) dt
∆t tn

Using flux vector splitting — that is, assuming

Fx (W ) = Fx+ (W ) + Fx− (W )

Leads to

Fbxns,i+1/2 ≈ Fx+ W (xi+1/2 , t n ) + Fx− W (xi+1/2 , t n )


 


Therefore, one needs to approximate Fx+ W (xi+1/2 , t n ) — or
n
equivalently, W (xi+1/2
 , t ) — with a leftward bias, nand
− n
Fx W (xi+1/2 , t ) — or equivalently, W (xi+1/2 , t ) — with a
rightward bias

28 / 60
AA214B: NUMERICAL METHODS FOR COMPRESSIBLE FLOWS 29 / 60
The MUSCL/TVD Method
Second-Order Approximation

First, W (xi+1/2 , t n ) is approximated with a leftward bias


a first-order accurate reconstruction of the primitive variables u of
which W is made leads to

u(xi+1/2 , t n ) ≈ ūin

a second-order accurate linear reconstruction of the primitive


variables u of which W is made leads to the following extrapolation
ūin − ūi−1
n
1
u(xi+1/2 , t n ) ≈ ūin + (xi+1/2 − xi ) = ūin + (ūin − ūi−1
n
)
∆x 2
instead of a pure constant or pure linear reconstruction, the following
convex linear combination is considered, which limits the effect of
the extrapolation

n+ 1 n+ n
ui+1/2 = ūin + n
φ (ūi − ūi−1 )
2 i
and a second-order accurate reconstruction (φ 6= 0) in the smooth
regions of the flow
29 / 60
AA214B: NUMERICAL METHODS FOR COMPRESSIBLE FLOWS 30 / 60
The MUSCL/TVD Method
Second-Order Approximation

Principle of a slope limiter

30 / 60
AA214B: NUMERICAL METHODS FOR COMPRESSIBLE FLOWS 31 / 60
The MUSCL/TVD Method
Second-Order Approximation

Next, W (xi+1/2 , t n ) is approximated with a rightward bias


a first-order accurate reconstruction of the primitive variables of
which W is made leads to

u(xi+1/2 , t n ) ≈ ūi+1
n

a second-order accurate linear reconstruction of the primitive


variables of which W is made leads to the following extrapolation
n n
ūi+2 − ūi+1 1 n
u(xi+1/2 , t n ) ≈ ūi+1
n
+ n
(xi+1/2 −xi+1 ) = ūi+1 − (ūi+2 n
−ūi+1 )
∆x 2
instead of a pure constant or pure linear reconstruction, the following
convex linear combination is considered for limiting the effect of the
extrapolation

n− n 1 n− n n
ui+1/2 = ūi+1 − φ (ūi+2 − ūi+1 )
2 i+1
where the superscript n− refers to time t n and the rightward bias

31 / 60
AA214B: NUMERICAL METHODS FOR COMPRESSIBLE FLOWS 32 / 60
The MUSCL/TVD Method
Second-Order Approximation
Applying the method of lines yields
bn
F bn
dWin xs,i+1/2 − Fxs,i−1/2
= −
dt ∆x
where
   
bn + n+ − n−
Fxs,i+1/2 = Fx W (u ) + Fx W (u )
i+1/2 i+1/2

+
 
n 1 n+ n n


 
n 1 n− n n

= Fx W ūi + φi (ūi − ūi−1 ) + Fx W ūi+1 − φ (ūi+2 − ūi+1 )
2 2 i+1
dWin 1  +  n 1 n+ n n


 
n 1 n− n n

⇒ = − Fx W ūi + φi (ūi − ūi−1 ) + Fx W ūi+1 − φ (ūi+2 − ūi+1 )
dt ∆x 2 2 i+1
1  +  n 1 n+ n n


 
n 1 n− n n

+ Fx W ūi−1 + φi−1 (ūi−1 − ūi−2 ) + Fx W ūi − φ (ūi+1 − ūi )
∆x 2 2 i
 
 
 
 
1 
 +
 
n 1 n+ n n

+
 
n 1 n+ n n

= − F x W ūi + φi (ūi − ūi−1 ) − Fx W ūi−1 + φi−1 (ūi−1 − ūi−2 )


∆x 
 2 2 

 | {z } 

+ n 
∆fˆ
i−1/2
 
 
 
 
1  −  n 1 n− n 1
    
n − n n− n n 
− F
 x W ū i+1 − φ ( ūi+2 − ū i+1 ) − F x W ū i − φ (ū i+1 − ū i ) 
∆x  2 i+1 2 i 

| {z }
 
 − n 
∆fˆ
i+1/2

32 / 60
AA214B: NUMERICAL METHODS FOR COMPRESSIBLE FLOWS 33 / 60
The MUSCL/TVD Method
Second-Order Approximation

Many variants of the MUSCL method exist today


The most popular ones use flux difference splitting along the lines of
an approximate Riemann solver such as Roe’s solver instead of flux
vector splitting: In this case, convex linear combinations of the
constant and linear reconstructions of Wi+1/2,L (t) and Wi+1/2,R (t)
are used as the left and right states in the solution of the
approximate Riemann problem
Many slope limiters have been proposed in the literature and
continue to be the subject of on-going research: One example is
presented next

33 / 60
AA214B: NUMERICAL METHODS FOR COMPRESSIBLE FLOWS 34 / 60
The MUSCL/TVD Method
Van Leer’s Slope Limiter

Ratios of solution differences


n
uin − ui−1 n
ui+1 − uin 1
rin+ = , rin− = = n+
ui+1 − uin
n n n
ui − ui−1 ri

Note that
rin± ≥ 0 if the solution u is monotone increasing or monotone
decreasing
rin± ≤ 0 if the solution u has a maxium or a minimum
|rin+ | is large and |rin− | is small if the solution differences decrease
n
dramatically from left to right or if ui+1 ≈ uin
|rin+ | is small and |rin− | is large if the solution differences increase
n
dramatically from left to right or if ui−1 ≈ uin

34 / 60
AA214B: NUMERICAL METHODS FOR COMPRESSIBLE FLOWS 35 / 60
The MUSCL/TVD Method
Van Leer’s Slope Limiter

Very large or very small ratios |rin± | sometimes signal shocks, but
not always
n
for example, if ui+1 − uin = 0 and uin − ui−1
n
6= 0, then |rin+ | = ∞
regardless of whether the solution is smooth or shocked
in general, because there is only limited information contained in
solution samples, no completely reliable way to distinguish shocks
from smooth regions exists
consequently, slope-limited methods do not even attempt to identify
shocks: Instead, they regulate maxima and minima — whether or
not they are associated with shocks — using the nonlinear stability
conditions (for example, TVD)

35 / 60
AA214B: NUMERICAL METHODS FOR COMPRESSIBLE FLOWS 36 / 60
The MUSCL/TVD Method
Van Leer’s Slope Limiter

Van Leer’s slope limiter can be described as


 2r

 for r ≥0 limits the slope
φ(r ) = 1+r


0 for r <0 reverses to constant (first-order) reconstruction

Note that φ(1) = 1 (no slope limiting if the solution behaves locally as a linear function)
Note also that lim φ(r ) = 2
r →∞
Equipping the scheme described in the previous pages with

n± n−/+
φi = φ(ri )

n−/+
(explain why in this case it is φ(ri ) and not φ(rin± )) makes it:
TVD and therefore nonlinearly stable
second-order accurate in monotone regions of the flow (proof given in class)
in practice, between first-order and second-order accurate at extrema

36 / 60
AA214B: NUMERICAL METHODS FOR COMPRESSIBLE FLOWS 37 / 60
Steger-Warming Flux Vector Splitting Method for the Euler Equations

Recall that flux splitting is defined as

Fx (W ) = Fx+ (W ) + Fx− (W )
dFx+ dFx−
≥ 0, ≤0
dW dW
Hence, the flux split form of the Euler equations is

∂W ∂Fx+ ∂Fx−
+ + =0
∂t ∂x ∂x
∂Fx+
Then, can be discretized conservatively using at least one
∂x
∂Fx−
point to the left — for example, using BS — and can be
∂x
discretized conservatively using at least one point to the right — for
example, using FS — thus obtaining conservation and satisfaction of
the CFL condition
37 / 60
AA214B: NUMERICAL METHODS FOR COMPRESSIBLE FLOWS 38 / 60
Steger-Warming Flux Vector Splitting Method for the Euler Equations

Recall the related concept of wave speed splitting

A(W ) = A+ (W ) + A− (W )
A+ (W ) ≥ 0, A− (W ) ≤ 0

Then, the vector conservation law can be written in wave speed split
form as
∂W ∂W ∂W
+ A+ + A− =0
∂t ∂x ∂x
where the matrices A+ and A− are usually obtained by splitting the
eigenvalues of A into positive and negative parts
− −
λi = λ+
i + λi , λ+
i ≥ 0, λi ≤ 0

=⇒ Λ = Λ+ + Λ− , Λ+ ≥ 0, Λ− ≤ 0

38 / 60
AA214B: NUMERICAL METHODS FOR COMPRESSIBLE FLOWS 39 / 60
Steger-Warming Flux Vector Splitting Method for the Euler Equations

For the 1D Euler equations

QAQ −1 = Λ ⇒ A = Q −1 ΛQ
where λ1 = vx λ 2 = vx + c λ 3 = vx − c
and
ρ ρ
− 2c
 
1 2c
ρ ρ
Q −1  vx 2c (vx + c) − 2c (vx − c)
 
=  2


2 2
 2
  2

vx ρ vx c ρ vx c
2 2c 2 + γ−1 + cvx − 2c 2 + γ−1 − cv x
  v2 2
 
ρ ρ
c − 2 + γ−1
x c
c vx − ρc
γ−1 vx2 cvx c

Q =
2 − γ−1 −vx + γ−1 1 

ρc  
v2 cvx c
− 2x − γ−1 vx + γ−1 −1
A = A+ + A− , A+ ≥ 0, A− ≤ 0
A+ = Q −1 Λ+ Q ≥ 0, A− = Q −1 Λ− Q ≤ 0

39 / 60
AA214B: NUMERICAL METHODS FOR COMPRESSIBLE FLOWS 40 / 60
Steger-Warming Flux Vector Splitting Method for the Euler Equations

For the Euler equations, Fx is homogeneous of degree 1


Steger and Warming (1981)3
dFx
Fx (W ) = (W )W = A(W )W
dW h i
⇒ Fx± (W ) = A± (W )W = Q −1 (W )Λ± (W )Q(W ) W

 
1
γ−1 ±
Fx± = ρλ1 vx 
γ 1 2
v
2 x
1
 
ρ ± vx + c
+ λ2 
2γ 1 2 c2
v + γ−1
2 x
+ cvx
1
 
ρ ± vx − c
+ λ3 
2γ 1 2 c2
v + γ−1
2 x
− cvx
3 Lerat (1983): dFx+ /dW ≥ 0 and dFx− /dW ≤ 0
40 / 60
AA214B: NUMERICAL METHODS FOR COMPRESSIBLE FLOWS 41 / 60
Steger-Warming Flux Vector Splitting Method for the Euler Equations

Practical implementation
compute at each grid point (or in each cell)
1 1
λ+
i = max(0, λi ) = (λi + |λi |), λ− (λi − |λi |)
i = min(0, λi ) =
2 2
(7)
compute at each grid point (or in each cell) the Mach number
vx
M=
c
if M ≤ −1
Fx+ = 0, Fx− = Fx
if −1 ≤ M ≤ 0
 
1
ρ vx + c
Fx+ = (vx + c) 
 

2γ 1 2 c2
v + γ−1 + cvx
2 x
 
1
 
1
γ−1 ρ vx − c
Fx− = ρvx  vx  + (vx − c) 
 

γ 1 2
v 2γ 1 2
v + c2
− cv
2 x 2 x γ−1 x

41 / 60
AA214B: NUMERICAL METHODS FOR COMPRESSIBLE FLOWS 42 / 60
Steger-Warming Flux Vector Splitting Method for the Euler Equations

Practical implementation (continue)


continue
continue
if 0 ≤ M ≤ 1
 
1
 
1
γ−1 ρ vx + c
Fx+ = ρvx  vx  + (vx + c) 
 

γ 1 2
v 2γ 1 2
v + c2
+ cv
2 x 2 x γ−1 x
 
1
ρ vx − c
Fx− = (vx − c) 
 

2γ 1 2 c2
v + γ−1 − cvx
2 x

if M > 1
Fx+ = Fx , Fx− = 0

42 / 60
AA214B: NUMERICAL METHODS FOR COMPRESSIBLE FLOWS 43 / 60
Steger-Warming Flux Vector Splitting Method for the Euler Equations

Problem: At the sonic points (M = 0 for the entropy waves and


M = ±1 for the acoustic waves), the wave speed splitting (7) is not
differentiable — the first derivative of the split wave speeds is
discontinuous at the sonic points because the function “absolute
value” is discontinuous at zero: Consequently, the wave speed
splitting (7) may experience numerical difficulties at these sonic
points — for example, when an implicit scheme is used, the
numerical flux function Fbxi+1/2 is based on an approximate Riemann
solver such as in (5), and therefore |A| needs to be differentiated
Solution: Regularization (or “entropy fix”, or “rounding the corner”)
 
1
q
λ±i = λi ± λ 2 + 2
i
2

where  is a small user-adjustable parameter

43 / 60
AA214B: NUMERICAL METHODS FOR COMPRESSIBLE FLOWS 44 / 60
Multidimensional Extensions

The extension to multiple dimensions of the material covered in this


chapter is straightforward (except perhaps for the characteristic
theory)
The expressions of the Euler equations in 2D and 3D can be
obtained from Chapter 2 (as particular cases of the expression of the
Navier-Stokes equations in 3D)
Furthermore, given that Chapter 6 discusses the extension of the
finite difference method to multiple dimensions on structured grids,
this chapter discusses — for the sake of variety — the extension of
the finite volume method to multiple dimensions on unstructured
grids
For simplicity, the focus is set here on the 2D Euler equations

∂W ∂Fx (W ) ∂Fy (W )
+ + =0 (8)
∂t ∂x ∂y
and on unstructured triangular meshes
44 / 60
AA214B: NUMERICAL METHODS FOR COMPRESSIBLE FLOWS 45 / 60
Multidimensional Extensions

2D unstructured triangular mesh

Euler-Poincaré theorem: Asymptotically, there are about two times


more triangles than nodes in a 2D triangular mesh

45 / 60
AA214B: NUMERICAL METHODS FOR COMPRESSIBLE FLOWS 46 / 60
Multidimensional Extensions

2D cell-centered grid

simple implementation: each triangle is at the same time a control


volume or primal cell
three numerical fluxes per triangle only, but more flow variables than
necessary (recall the Euler-Poincaré theorem)

46 / 60
AA214B: NUMERICAL METHODS FOR COMPRESSIBLE FLOWS 47 / 60
Multidimensional Extensions

2D vertex-based grid

deemed more accurate than the cell-centered approach for


stretched/skewed grids
more memory efficient than comparable cell-centered techniques
(recall the Euler-Poincaré theorem)
requires however the construction of an associated control volume or
dual cell

47 / 60
AA214B: NUMERICAL METHODS FOR COMPRESSIBLE FLOWS 48 / 60
Multidimensional Extensions

2D control volume or dual cell for the vertex-based approach

Sample algorithm for constructing a dual cell Ci attached to vertex i


for each triangle τikl connected to i:
determine the point of intersection of the three medians, Gikl
connect the point Gikl to the midpoints Mil and Mik of the edges il
and ik, respectively

48 / 60
AA214B: NUMERICAL METHODS FOR COMPRESSIBLE FLOWS 49 / 60
Multidimensional Extensions

2D control volume or dual cell for the vertex-based approach


(continue)

at the wall boundaries, one obtains “half” dual cells


the union of all full and half dual cells covers exactly the union of all
triangles τikl and therefore covers exactly the given triangular mesh

49 / 60
AA214B: NUMERICAL METHODS FOR COMPRESSIBLE FLOWS 50 / 60
Multidimensional Extensions

2D cell edge for the vertex-based approach

the boundary ∂Ci of each dual cell Ci attached to vertex i is the


union of cell edges ∂Ci?

∂Ci = ∂Cij ∪ ∂Cik ∪ ∂Cil ∪ ∂Cim ∪ ∂Cin

the cell edge ∂Cij , which is attached to the edge ij, is itself the union
of two segments Mij Gijk and Mij Gijn
50 / 60
AA214B: NUMERICAL METHODS FOR COMPRESSIBLE FLOWS 51 / 60
Multidimensional Extensions

Consider again the 2D Euler equations (8): From the results of


Chapter 3, it follows that the integration over the dual cell Ci of
these equations can be written (after usage of the divergence
theorem) as


Z Z
∂W i 1 1
+ F · ~νi dΓi = 0, where W i = Wi dΩ
∂t kCi k ∂Ci kCi k Ci
(9)
51 / 60
AA214B: NUMERICAL METHODS FOR COMPRESSIBLE FLOWS 52 / 60
Multidimensional Extensions

Integrating Eq. (9) between t n and t n+1 , dividing by ∆t, and


re-arranging gives
t n+1 t n+1
!
1 ∂W i 1 1 →

Z Z Z
dt = − F ·~
νi dΓi dt
∆t tn ∂t ∆t tn kCi k ∂Ci

X 1 Z t n+1
!
1 →

Z
= − F ·~
νi? dΓi dt (10)
?
∆t t n kCi k ∂Ci?

52 / 60
AA214B: NUMERICAL METHODS FOR COMPRESSIBLE FLOWS 53 / 60
Multidimensional Extensions

Eq. (10) can be re-written as


t n+1 t n+1 Z  !


Z Z
∂W i X ∆t 1
dt = − F · ~νi? dΓi dt
tn ∂t ?
kCi k ∆t tn ∂Ci?

Which leads to
\n
∂W X ∆t
n
∆t =− Fbi? (11)
∂t i ?
kCi k

where
t n+1 Z 


Z Z
n 1 1
Wi ≈ Wi (x, y , t n )dΩ, n
Fbi? ≈ F · ~νi? dΓi dt
kCi k Ci ∆t tn ∂Ci?
(12)
Eq. (11) is the 2D extension of Eq. (1), and definitions (12) are the
2D extensions of definitions (2)
53 / 60
AA214B: NUMERICAL METHODS FOR COMPRESSIBLE FLOWS 54 / 60
Multidimensional Extensions

I
z }| !{
1
Z t n+1 Z


bn
Hence, F ≈ F (W ) · ~
νi? dΓi dt
i?
∆t tn ∂Ci?



Z
A popular approximation of I is I ≈ F (W (Mi? , t)) · ~
νi? dΓi
∂Ci?
t n+1
!
bn ≈ 1 →

Z Z
=⇒ F i? F (W (Mi? , t)) · ~
νi? dΓi dt is constructed in 2D similarly
∆t tn ∂Ci?

1
Z t n+1
bn

to how Fx ≈ Fx W (xi+1/2 , t) dt in constructed in 1D
i+1/2 ∆t tn

54 / 60
AA214B: NUMERICAL METHODS FOR COMPRESSIBLE FLOWS 55 / 60
Multidimensional Extensions

In particular, upwind methods based on

bn = → − →

Z  
(1) (1) (2) (2)
F i? F (WRiemann (Mi? , t)) · νi? dΓi = F (WRiemann (Mi? , t)) · l ~
~ νi? + l ~ νi?
∂Ci?

bn

are the 2D extensions of 1D upwind methods based on Fx = Fx WRiemann (xi+1/2 , t)
i+1/2
Let  
(1) (1) (2) (2)
ν˜i? =
~ l ~
νi? + l ~
νi?

Normalize
◦ ν˜ij
~
ν˜ij =
~
ν˜ij k2
k~
55 / 60
AA214B: NUMERICAL METHODS FOR COMPRESSIBLE FLOWS 56 / 60
Multidimensional Extensions

Recall that in three dimensions


ρ~v T
 

 ρvx v T + p~
~ exT 

T
(Fx (W ) Fy (W ) Fz (W )) = 
 ~
ρvy v + p~ eyT 

T
 ρvz ~v + p~ ezT 
(E + p)~v T

~0 T
 

 (τ · e~x ) T 

(Rx (W ) Ry (W ) Rz (W )) = 
 (τ · e~y ) T 

 (τ · e~z ) T 
(τ · ~v + κ∇T ) T

e~xT = (1 0 0), e~yT = (0 1 0), e~zT = (0 0 1), ~0 T = (0 0 0)

56 / 60
AA214B: NUMERICAL METHODS FOR COMPRESSIBLE FLOWS 57 / 60
Multidimensional Extensions



Computation of F (WRiemann (Mij , t)) (Method #1))
extension of Roe’s one-dimensional (1D) approximate Riemann solver to 3D

consider the multidimensional flux in the direction of ~ ν˜ij

− ◦ ◦ ◦ ◦ T
F~˜◦ = F · ~
ν ν˜ij = (ρv~ ˜ ◦ ρvx v~
ν ν ν˜ij x ρvy v~
˜ ◦ +p~ ˜ ◦ +p~
ν ν˜ij y ρvz v~ ν˜ij z (E +p)v~
˜ ◦ +p~
ν ˜◦ )
ν
ij |{z} |{z} ij ij ij ij ij
|{z} 5×3
5×1 3×1
◦ ◦ ◦
ν˜ij x + vy ~
˜ ◦ = vx ~
where v~
ν ν˜ij y + vz ~
ν˜ij z
ij
Roe’s averages are based in this case on the secant approximation defined by
F~˜ ◦ (Wi ) − F~
ν ˜ ◦ (Wj ) = A~
ν ν˜ ◦ (Wij )( Wi − Wj )
ij ij ij |{z} |{z}
5×1
|{z}
5×1
5×5
∂F~
˜◦
ν ij
where A~
˜◦ =
ν , which gives
ij ∂W
√ √ √ √ √ √
ρi vxi + ρj vxj ρi vyi + ρj vyj ρi vzi + ρj vzj
vxij = √ √ vyij = √ √ vzij = √ √
ρi + ρj ρi + ρj ρi + ρj
H H
√i
ρi + √ρj √ √
ρi hi + ρj hj
j √
hij = √ √ = √ √ ρij = ρi ρj
ρi + ρj ρi + ρj
s  
1
=⇒ cij = (γ − 1) hij − (vx2 + vy2 + vz2 )
2 ij ij ij

the eigenvalues of A~
ν ˜ ◦ ± c, and v~
˜ ◦ are: v~
ν ˜ ◦ with multiplicity 3
ν
ij ij ij
57 / 60
AA214B: NUMERICAL METHODS FOR COMPRESSIBLE FLOWS 58 / 60
Multidimensional Extensions



Computation of F (WRiemann (Mij , t)) (Method #1))
extension of Roe’s 1D approximate Riemann solver to 3D (continue)
formulate Roe’s multidimensional approximate Riemann problem:
∂W ∂W
˜ ◦ (Wij )
+ A~
ν = 0, where s is the abscissa along ~
ij, with uniform initial
∂t ij ∂s
| {z } | {z } | {z }
5×1 5×5 5×1
conditions on an infinite spatial domain, except for a single jump discontinuity
compute Roe’s flux
   
   
1 1
   

−     
˜
F WRiemann (Mij , t) =  F ◦ (W ) + F ◦ (W ) −
 ~˜ i ˜ j |A ˜ ◦ (Wij )|( Wj − Wi ) k~
ν ijk2
 ν ij ~
ν ij ~
ν ij
 
| {z } 2  2 |{z} |{z} 
 | } 
5×1
{z } | {z | {z }
5×1 5×1
5×1 5×1 5×5

58 / 60
AA214B: NUMERICAL METHODS FOR COMPRESSIBLE FLOWS 59 / 60
Multidimensional Extensions


−  
Computation of F WRiemann (Mij , t) (Method #2))
comp 1 2 T
along the edge ij, “compress” the conservative fluid state vector to obtain W = (ρ ρvn ρe + ρvn ) , where
| {z } 2
3×1
vn = ~v ·~˜◦, ~
ν ij v denotes the fluid velocity vector, and comp stands for “compressed”
comp comp
along the edge ij, formulate Roe’s 1D approximate Riemann problem using W and W , and solve this
i j
 1 T
comp comp 2
problem to obtain W (M , t) = W = ρRiemann (ρvn )Riemann (ρe + ρvn )Riemann
Riemann ij Riemann 2
now, given that the fluid velocity vector ~
v can be decomposed as ~ v = vn ~˜◦
ν + v − vn ~
(~ ˜ ◦ ) , it follows
ν
ij ij
| {z } | {z }
normal direction tangential direction
that (Roe’s) 1D approximate Riemann problem along the edge ij acts only on vn and therefore modifies only the
component of ~ v along ~˜◦
ν ij
next, “expand” ~vRiemann as

~
v
exp ˜ ◦ + (~
= vRiemann ~
ν ˜ ◦ )average = v exp
v − vn ~
ν ~
e +v
exp
~
e +v
exp
~
e
Riemann n ij ij Riemannx x Riemanny y Riemannz z

where exp stands for “expanded”


then, compute the “expanded” vector WRiemann
| {z }
5×1
exp exp exp exp
W = (ρRiemann ρRiemann v ρ v ρ v
Riemann Riemannx Riemann Riemanny Riemann Riemannz
1 exp 2 T
ρRiemann eRiemann + ρRiemann k~
v k)
2 Riemann
 
 

−   →
−  exp 
finally, compute F WRiemann (Mij , t) as F  W 
|{z} 
| Riemann 
| {z } {z }
5×1
5×1 5×1
59 / 60
AA214B: NUMERICAL METHODS FOR COMPRESSIBLE FLOWS 60 / 60
Multidimensional Extensions

Note that

− 
(1) (2)

Fbijn = F (WRiemann (Mij , t)) · l (1)~νij + l (2)~νij

− 
(1) (2)

Fbjin = F (WRiemann (Mij , t)) · l (1)~νji + l (2)~νji
Since ~νji = −~νij , it follows that
Fbjin = −Fbijn
=⇒ Fbijn + Fbjin = 0 =⇒ Fbij is a conservative numerical flux
60 / 60

You might also like