0% found this document useful (0 votes)
11 views

04 Finite Volume 2nd Order

Uploaded by

Smita Salunkhe
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

04 Finite Volume 2nd Order

Uploaded by

Smita Salunkhe
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 30

GODUNOV TYPE SCHEMES

Godunov’s idea

§ Consider every 2 grid cells as a tiny shock tube


§ Solve the wave propagation at each interface (g Riemann problem)
t
tn
+1

t xi-1/2 xi+1/2 xi+3/2


n
xi-1 xi xi+1 x
u
uni+1
uni+2
uni
uni−1

x
xi-1/2 xi+1/2 xi+3/2
2 Godunov Type Schemes - 2nd order (MUSCL)
Godunov’s method

§ Numerical flux in Godunov’s method:

gni+1/2 = f(uRP (0;ui ,ui+1))

uRP: solution of the Riemann problem at cell interface

§ Properties of Godunov’s method:


§ Exact conservation
§ Non-linear wave propagation
§ Adaptivity to the solution

§ Stability: CFL condition


3 Godunov Type Schemes - 2nd order (MUSCL)
Approximate Godunov schemes

§ Godunov’s method is stable and conservative, but expensive


§ What is expensive? The non-linearity
ut + r · f (u) = 0
<latexit sha1_base64="cfiL/jJcv+fXdbPz0DTgJNTVWoE=">AAAC5nichVFNS8NAEH3G7++qRy+LRVCEkoqoF0H8wougYFWwUjbptg1Nk5BsBBUP/gFv4tWbV/05+ls8+LJGQUXcsJnZN2/ezuw4ke8l2rZfuqzunt6+/oHBoeGR0bHxwsTkURKmsasqbuiH8YkjE+V7gapoT/vqJIqV7Di+Onbam1n8+FzFiRcGh/oiUmcd2Qy8hudKTahWmE5rWiyIaiAdX4qqWw+1aMyl82JN2LVC0S7ZZonfTjl3isjXflh4RRV1hHCRogOFAJq+D4mE3ynKsBERO8MVsZieZ+IK1xhibkqWIkMSbfPf5Ok0RwOeM83EZLu8xeeOmSkwy71jFB2ys1sV/YT2jfvSYM0/b7gyylmFF7QOFQeN4h5xjRYZ/2V2cuZnLf9nZl1pNLBquvFYX2SQrE/3S2eLkZhY20QEtg2zSQ3HnM/5AgFthRVkr/ypIEzHdVpprDIqQa4oqRfTZq/Pejjm8s+h/naOFkvl5dLywVJxfSMf+ACmMYM5TnUF69jFPutwcYNHPOHZalm31p11/0G1uvKcKXxb1sM7a5KX/Q==</latexit>

<latexit sha1_base64="VLCymXpQhZl0LB/iqbGtLo7cVQ0=">AAADHHichVHRStxAFD2m1apVu20f+xJcBEVYkqVYXwSptfRFUOiq4MoyibPrsNkkTCbS7bK/4m/0B/omfS0o9FV/wgdPxqjYRZwwuXfOPffMvXODNFKZ8bzzMefFy/GJV5NT069nZufeVN6+282SXIeyESZRovcDkclIxbJhlInkfqql6AWR3Au6G0V870TqTCXxd9NP5WFPdGLVVqEwhFqVnbxl3GW32dYiHDRToY0Skdtu+Yv50vAB+DEkaZRVf8zqD9dcr1WpejXPLnfU8UuninJtJ5ULNHGEBCFy9CARw9CPIJDxO4APDymxQwyIaXrKxiWGmGZuTpYkQxDt8t/h6aBEY54Lzcxmh7wl4tbMdLHA/dUqBmQXt0r6Ge0190+LdZ68YWCViwr7tAEVp6ziFnGDYzKey+yVzLtans8sujJoY9V2o1hfapGiz/Be5wsjmljXRlxsWmaHGoE9n/AFYtoGKyhe+U7BtR0f0QprpVWJS0VBPU1bvD7r4Zj9/4c66uzWa/5KbWXnY3X9cznwSXzAPBY51U9Yxzdss44Qv/APl7hyTp3fzpnz55bqjJU57/FoOX9vALTlrpY=</latexit>

@f1 (u) @f2 (u)


ut + + =0
@x @y
<latexit sha1_base64="Lvq/t1gd9X6hpJipJedmwF3L3/A=">AAADV3iclVFRSxtBEJ5LWo2xaqIvQl9Wg6AI4S5I9EUQa4svhRQaFYyEvXMTl1zujr09MYb7B/2D+jN8Fux366WtWhH32JvZb775dmbHjXwZa9u+sQrFDx+npksz5dlPc/MLleriURwmyhNtL/RDdeLyWPgyEG0ttS9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lzLpxL5+oX1Rkqc6bx13KuHwEV968f</latexit>

ut + A1 (u) + A2 (u) =0
@x @x

§ Idea: linearize g Roe Scheme


4 Godunov Type Schemes - 2nd order (MUSCL)
Roe linearization

§ P. Roe (1981): Replace the exact solution of the original Riemann problem
by the exact solution of the linearized Riemann problem:

ì u l für x < 0
u t + A lr u x = 0, u (x ,0 ) = í
î u r für x > 0

§ The matrix Alr= Alr(ul,ur) is called Roe matrix, if


1. Alr(u,u) = A(u)
2. Alr can be diagonalized (i.e. Alr is hyperbolic)
3. Alr fulfills the mean value property: f (ur ) − f (ul ) = Alr ⋅ (ur − ul )

5 Godunov Type Schemes - 2nd order (MUSCL)


Solving the linearized Riemann problem

§ The 4 constant states

x t x x
= a1 = a2 = a3
t t t
u1 u2
u1 = ul + g1r1
ul ur u2 = ul + g1r1 + g 2r2

1 1 3
§ The flux g Roe (u i , u i +1 ) = (f i +1 + f i ) - å a k g k rk
2 2 k =1
Central difference Correction according
to wave propagation
6 Godunov Type Schemes - 2nd order (MUSCL)
Properties of the Roe scheme

§ A single shock or a single contact discontinuity is resolved exactly.

§ In rarefactions, it underestimates the wave speed of the rarefaction.

§ At strong rarefactions, the Roe scheme might violate the entropy condition.

"
$ a für a1,3 > δ
g Entropy fix: a 1,3 = # 1,3
$
% δ otherwise

7 Godunov Type Schemes - 2nd order (MUSCL)


The Method of Harten, Lax and Van Leer

§ Simplest Godunov type scheme

x x
= al = ar
t t t

Dt
ulr

Dx Dx x
-
2 2

8 Godunov Type Schemes - 2nd order (MUSCL)


The Method of Harten, Lax and Van Leer

§ Even further simplification: Only one state between left and right
( x
* ul for < al
* t
!x $ * x
w # ; ul ; ur & = ) ulr for al ≤ ≤ ar
"t % * t
* x
* ur for > ar
+ t

§ al, ar smallest and largest wave speed


§ ulr intermediate state

9 Godunov Type Schemes - 2nd order (MUSCL)


Comparison of the 3 Riemann solvers

Godunov-scheme Roe-scheme HLL-scheme


Exact solution of the Exact solution of the A priori guess of
Riemann problem, lin. Riemann problem, highest/lowest
Fix point iteration Characteristics theorie wave speeds

t t t
Contact
discontinuity x = a2t
Rarefaction x = a1t
x = a 3t x = alt x = art
u1 u2 u1 ulr
u2

ul ur x ul ur x ul ur x

10 Godunov Type Schemes - 2nd order (MUSCL)


Flux calculation – overview

Upwind differencing
§ Flux-difference splitting schemes: Godunov-type schemes
Godunov, Roe, HLL, Osher
§ Flux-vector splitting schemes
Steger-Warming, van Leer, AUSM, ...

Piecewise constant values


First order accurate, quite similar results

11 Godunov Type Schemes - 2nd order (MUSCL)


TIME STEP RESTRICTION
Time step restrictions

§ Explicit time discretizations are numerically stable only under a condition. I.e. the max. time
step is restricted:

xi x
xi -1/ 2 xi +1/ 2

§ To calculate the flux over the boundary, we assume that the state on the cell boundary is
constant during the time step.
§ This is justified only as long as no waves of the neighbouring Riemann problem interact with
the ones of the local Riemann problem.
13 Godunov Type Schemes - 2nd order (MUSCL)
Time step restriction

§ I.e. we search for the time, which the fastest wave needs from one cell
boundary to the next one:
t Δt i 1
=
< CFL condition
Δx i v1i + c i
v1i + c Δx i
⇒ Δt i <=
v1i + c i

xi x Δx i = x i+1/2 − x i−1/2
xi -1/ 2 xi +1/ 2

§ In practice, the CFL conditions (named after Courant, Friedrichs und Levy)
is multiplied by a security factor s to get from inequality to equation:
Δx i
Δt i = σ ⋅
v1i + c i
14 Godunov Type Schemes - 2nd order (MUSCL)
Time step restriction

§ The states in the cells vary as well as the cell sizes in the computational domain.
Therefore, the time step has to be caculated per cell (local time step).
§ The entire simulation than has to use the smallest local time step:

$ '
Δx
Δt global = σ ⋅ min & max i )
&v )
% i + ci (

§ For stationary problems, it is possible to use the local time step in each cell (i.e.
allow for temporal inconsistency).
§ This is possible since for the fully converged solution, the change of the states is
zero.
§ For instationary problems, this is not possible.
15 Godunov Type Schemes - 2nd order (MUSCL)
Time step calculation on arbitrary meshes

In multiple space dimensions, the time step restriction becomes more severe.
We have to use a characteristic lenth for each cell, i.e. the diameter of the
inner circle.

$ '
2 ⋅ r
Δt global = σ ⋅ min & max i )
&v + c )
% i i (

Be careful with strongly distorted cells (especially in Navier-Stokes).


The inner circle becomes very small, leading to tiny time steps.
16 Godunov Type Schemes - 2nd order (MUSCL)
2ND ORDER SCHEME: MUSCL

MONOTONIC UPWIND SCHEME


FOR CONSERVATION LAWS
2nd order in space and time: MUSCL scheme – basic idea

§ Flux formulation: gi+1/2,j is an approximation to what flows in or out over


the boundary i+1/2,j of cell i,j during the entire time intervall.
§ Problem: we only know uij, i.e. what is inside cell i,j at time level tn, but not
its distribution inside the cell or how it varies during the time step.
§ Idea: assume a linear distribution inside the cell to determine the flux at
the boundary more accurately.

§ => explicit scheme 2nd order in space and time

18 Godunov Type Schemes - 2nd order (MUSCL)


Upwind 2nd order

§ Explicit in time
§ Upwind in space

§ 2nd order in space


§ 2nd order in time

§ The MUSCL scheme

§ MUSCL: monotonic upwind scheme for conservation laws

19 Godunov Type Schemes - 2nd order (MUSCL)


Finite volume discritzation – cell mean values

Real values at Real


cell boundaries distribution

integral
mean values

§ Problem: the constant representation (i.e. representation with polynomial of


order 0)is quite inexact. It leads to an overall scheme of 1st order

20 Godunov Type Schemes - 2nd order (MUSCL)


Let’s try to use higher order polynomials

§ Let’s try to use higher order polynomials WITHIN a cell

§ Order of the polynomial is related to the order of the entire scheme.


§ Up to now:
Polynomial of degree 0 = constant values per cell, scheme of 1st order
§ Idea for next step:
Polynomial of degree 1 = linear distribution, scheme of 2nd order?

21 Godunov Type Schemes - 2nd order (MUSCL)


Piecewise linear reconstruction

Monotonic Upwind Scheme for Conservation Laws

xi-1 xi xi+1 xi+2 x

Instead of assuming u=const in [xi-1/2, xi+1/2], we now assume that u is linearly


distributed. I.e. we determine a straight line, evaluate it at the boundaries and
determine the fluxes with that.
22 Godunov Type Schemes - 2nd order (MUSCL)
1st step: get the slope of the line

§ To determine the straight line, we need a point and a slope.


§ The point is xij with the value uij.
§ Slope: 2 possibilities, left sided or right sided difference:
ui, j −ui−1, j ui+1, j −ui, j
Lij = , Rij =
Δx Δx
§ We have to chose one of them or a linear combination
§ This is done by the€so-called limiter
§ For 2nd order, it has to fulfill a condition (TVD property)

23 Godunov Type Schemes - 2nd order (MUSCL)


Limiter: TVD property

§ TVD property (Total Variation Diminishing)

n
∑u i+1 − uni ≤ ∑ ui+1
0
− ui0
all i all i

§ Sufficient condition
€ (A.Harten)
% Δx si Δx si (
0≤& , )≤ 2
u
' i − ui−1 ui+1 − ui*


24 Godunov Type Schemes - 2nd order (MUSCL)
Limiters

§ Minmod limiter (
si = minmod Li, j , Ri, j )
#a for a < b , ab > 0
%%
€ ( )
minmod a , b = $b for a ≥ b , ab > 0
%
%&0 otherwise

§ Sweby‘s limiter: weighted minmod



( ) { ( )
sk a,b = sign(a) max minmod a , kb , minmod ka , b ( )}
with 1 ≤ k ≤ 2


25 Godunov Type Schemes - 2nd order (MUSCL) €
Reconstruction in space and time

§ At time tn, extrapolate from middle of the cell (i,j) to boundary of the cell
(i+1/2,j)
Δx n
uni± = uni ± si slope sin
2
§ To get the 2nd order also in time, the basic idea is the same: extrapolate from
time level tn to time level tn+1:
n+ 1 Δt
ui±
2
= uni± + u
2 t

§ But: we can not compute a slope in time, because we only have 1 time level.
Therefore, we replace €the time derivatives by spatial derivatives
Δt Δt
t n → t n+1/2: un+1/2

= uni± −
2 ⋅ Δx
( ( ) ( ))
f uni+ − f uni− = uni± −
2 ⋅ Δx
(
ai±1/2 uni+ − uni− )
26 Godunov Type Schemes - 2nd order (MUSCL)
How to get the flux with that

u (in ++11)/ 2- , j ui+1,j


u in++,1j/ 2
uij

xi-1 xi xi+1 xi+2 x

§ Now we have to change the way we think from cell-oriented to boundary


oriented: the flux at boundary i+1/2,j is now

gn+1/2 (n+1/2
i+1/2 = g ui+ , un+1/2
(i+1) − )
27 Godunov Type Schemes - 2nd order (MUSCL)


Upwind scheme with MUSCL

gi+ 12, j = gn+1/2 (


i+1/2, j = g ui+, j
n+1/2
, un+1/2
(i+1) −, j )
#un+1/2 if ai+ 12, j > 0
%% i+, j
= ai+ 12, j $ 21 (un+1/2
i+, j + un+1/2
(i+1)−, j ) if ai+ 12, j = 0
% n+1/2
%&u(i+1)−, j if ai+ 12, j < 0

hi, j+ 12 analogously

28

Godunov Type Schemes - 2nd order (MUSCL)
MUSCL procedure (summary)

Δx n
§ Boundary values at tn uni± = uni ± si Slope sin
2

§ tn g tn+1/2 uni±+1/2 = uni± -


Δt
2 × Dx
( ( ) ( ))
f uni+ - f uni-

§ Final step: uni+1 = uni - (


Δt n+1/2 n+1/2
gi+1/2 - gi-1/2 ) with gni++1/2
1/2
(
= g uni++1/2 , un(i++1/2
1)- )
Δx

29 Godunov Type Schemes - 2nd order (MUSCL)


Summary – General FV scheme

Determine the time step

Set boundary conditions

Reconstruction

Set boundary conditions

Flux calculation

Update the state at next time level

30 Godunov Type Schemes - 2nd order (MUSCL)

You might also like