Conservation Laws & Applications J.A. Rossmanith June 22 , 2010

advertisement
Finite volume schemes
Linear advection
TVD Limiters
Nonlinear equations
Rocky Mountain Mathematics Consortium Summer School
Conservation Laws & Applications
Lecture I: Finite Volume Methods for 1D Scalar Equations
J.A. Rossmanith
Department of Mathematics
University of Wisconsin – Madison
June 22nd , 2010
J.A. Rossmanith | RMMC 2010
1/39
Finite volume schemes
Linear advection
TVD Limiters
Nonlinear equations
Outline
1 Finite volume schemes
2 Linear advection
3 TVD Limiters
4 Nonlinear equations
J.A. Rossmanith | RMMC 2010
2/39
Finite volume schemes
Linear advection
TVD Limiters
Nonlinear equations
Outline
1 Finite volume schemes
2 Linear advection
3 TVD Limiters
4 Nonlinear equations
J.A. Rossmanith | RMMC 2010
3/39
Finite volume schemes
Linear advection
TVD Limiters
Nonlinear equations
Finite volume schemes
Hyperbolic conservation laws
PDE in conservation form:
q,t + ∇ · F(q) = 0
=⇒
k
q,t + f,k
(q) = 0
t ∈ R and x ∈ Rd
` + d´
q(t, x) : R , R → Rm
Spatial and time coordinates:
Conserved variables:
F(q) : Rm → Rm×d ,
Flux function:
f k (q) : Rm → Rm
Quasilinear form and hyperbolicity:
q,t + Ak (q) q,k = 0
A(n, q) has real e-vals & lin. ind. e-vectors ∀knk = 1
Real eigenvalues
J.A. Rossmanith | RMMC 2010
k
Ak (q) := f,q
(q)
ˆ
˜
A(n, q) := n · A1 (q), A2 (q), A3 (q)
Flux Jacobian:
Hyperbolic:
where
=⇒
finite speed of propagation
4/39
Finite volume schemes
Linear advection
TVD Limiters
Nonlinear equations
Finite volume schemes
Hyperbolic conservation laws
PDE in conservation form:
q,t + ∇ · F(q) = 0
=⇒
k
q,t + f,k
(q) = 0
t ∈ R and x ∈ Rd
` + d´
q(t, x) : R , R → Rm
Spatial and time coordinates:
Conserved variables:
F(q) : Rm → Rm×d ,
Flux function:
f k (q) : Rm → Rm
Quasilinear form and hyperbolicity:
q,t + Ak (q) q,k = 0
A(n, q) has real e-vals & lin. ind. e-vectors ∀knk = 1
Real eigenvalues
J.A. Rossmanith | RMMC 2010
k
Ak (q) := f,q
(q)
ˆ
˜
A(n, q) := n · A1 (q), A2 (q), A3 (q)
Flux Jacobian:
Hyperbolic:
where
=⇒
finite speed of propagation
4/39
Finite volume schemes
Linear advection
TVD Limiters
Nonlinear equations
Finite volume schemes
Integral form
Integral form:
Z
tn+1
Z n
tn
Z
`
´
q tn+1 , x dx =
o
q,t + ∇ · F dxdt = 0
Ω
Z
Ω
q (tn , x) dx −
Z
Qn+1
ff
∇ · F dx
dt
Ω
I Z tn+1
F · n dt ds
q (tn , x) dx −
Ω
∂Ω tn
I
1
∆t
= Qn −
F̄n+ 2 · n dx
|Ω| ∂Ω
`
´
q tn+1 , x dx =
Ω
Z
tn
Ω
Z
tn+1
Z
Average states:
Spaced-average solution: Qn := 1
|Ω|
Time-averaged flux:
J.A. Rossmanith | RMMC 2010
1
F̄n+ 2 :=
Z
q (tn , x) dx
Ω
1
∆t
Z
tn+1
F(q(t, x)) dt
tn
5/39
Finite volume schemes
Linear advection
TVD Limiters
Nonlinear equations
Finite volume schemes
Integral form
Integral form:
Z
tn+1
Z n
tn
Z
`
´
q tn+1 , x dx =
o
q,t + ∇ · F dxdt = 0
Ω
Z
Ω
q (tn , x) dx −
Z
Qn+1
ff
∇ · F dx
dt
Ω
I Z tn+1
F · n dt ds
q (tn , x) dx −
Ω
∂Ω tn
I
1
∆t
= Qn −
F̄n+ 2 · n dx
|Ω| ∂Ω
`
´
q tn+1 , x dx =
Ω
Z
tn
Ω
Z
tn+1
Z
Average states:
Spaced-average solution: Qn := 1
|Ω|
Time-averaged flux:
J.A. Rossmanith | RMMC 2010
1
F̄n+ 2 :=
Z
q (tn , x) dx
Ω
1
∆t
Z
tn+1
F(q(t, x)) dt
tn
5/39
Finite volume schemes
Linear advection
TVD Limiters
Nonlinear equations
Finite volume schemes
Integral form
Integral form:
Z
tn+1
Z n
tn
Z
`
´
q tn+1 , x dx =
o
q,t + ∇ · F dxdt = 0
Ω
Z
Ω
q (tn , x) dx −
Z
Qn+1
ff
∇ · F dx
dt
Ω
I Z tn+1
F · n dt ds
q (tn , x) dx −
Ω
∂Ω tn
I
1
∆t
= Qn −
F̄n+ 2 · n dx
|Ω| ∂Ω
`
´
q tn+1 , x dx =
Ω
Z
tn
Ω
Z
tn+1
Z
Average states:
Spaced-average solution: Qn := 1
|Ω|
Time-averaged flux:
J.A. Rossmanith | RMMC 2010
1
F̄n+ 2 :=
Z
q (tn , x) dx
Ω
1
∆t
Z
tn+1
F(q(t, x)) dt
tn
5/39
Finite volume schemes
Linear advection
TVD Limiters
Nonlinear equations
Finite volume schemes
Integral form
Integral form:
Z
tn+1
Z n
tn
Z
`
´
q tn+1 , x dx =
o
q,t + ∇ · F dxdt = 0
Ω
Z
Ω
q (tn , x) dx −
Z
Qn+1
ff
∇ · F dx
dt
Ω
I Z tn+1
F · n dt ds
q (tn , x) dx −
Ω
∂Ω tn
I
1
∆t
= Qn −
F̄n+ 2 · n dx
|Ω| ∂Ω
`
´
q tn+1 , x dx =
Ω
Z
tn
Ω
Z
tn+1
Z
Average states:
Spaced-average solution: Qn := 1
|Ω|
Time-averaged flux:
J.A. Rossmanith | RMMC 2010
1
F̄n+ 2 :=
Z
q (tn , x) dx
Ω
1
∆t
Z
tn+1
F(q(t, x)) dt
tn
5/39
Finite volume schemes
Linear advection
TVD Limiters
Nonlinear equations
Finite volume schemes
Integral form
Integral form:
Z
tn+1
Z n
tn
Z
`
´
q tn+1 , x dx =
o
q,t + ∇ · F dxdt = 0
Ω
Z
Ω
q (tn , x) dx −
Z
Qn+1
ff
∇ · F dx
dt
Ω
I Z tn+1
F · n dt ds
q (tn , x) dx −
Ω
∂Ω tn
I
1
∆t
= Qn −
F̄n+ 2 · n dx
|Ω| ∂Ω
`
´
q tn+1 , x dx =
Ω
Z
tn
Ω
Z
tn+1
Z
Average states:
Spaced-average solution: Qn := 1
|Ω|
Time-averaged flux:
J.A. Rossmanith | RMMC 2010
1
F̄n+ 2 :=
Z
q (tn , x) dx
Ω
1
∆t
Z
tn+1
F(q(t, x)) dt
tn
5/39
Finite volume schemes
Linear advection
TVD Limiters
Nonlinear equations
Finite volume schemes
1D schemes
1D finite volume schemes:
Z x 1
i+
1
2
q (tn , x) dx,
Qn
:=
dude
i
∆x x 1
i−
n+ 1
F̄i− 12 :=
2
1
∆t
Z
tn+1
tn
F (q(t, xi− 1 )) dt
2
2
General 1D finite volume scheme
Qn+1
i
=
Qn
i
»
–
∆t
n+ 1
n+ 1
2
2
−
F̄i+ 1 − F̄i− 1
∆x
2
2
n+ 1
Key question: how to compute numerical fluxes F̄i− 12 ?
2
»
– X
N
N
N
X
X
1
∆t
n+ 2
n+ 1
n
2
Qn+1
=
Q
−
F̄
−
F̄
=
Qn
Conservation:
i
i
1
i
N+ 1
∆x
2
2
i=1
i=1
i=1
J.A. Rossmanith | RMMC 2010
6/39
Finite volume schemes
Linear advection
TVD Limiters
Nonlinear equations
Finite volume schemes
1D schemes
1D finite volume schemes:
Z x 1
i+
1
2
q (tn , x) dx,
Qn
:=
dude
i
∆x x 1
i−
n+ 1
F̄i− 12 :=
2
1
∆t
Z
tn+1
tn
F (q(t, xi− 1 )) dt
2
2
General 1D finite volume scheme
Qn+1
i
=
Qn
i
»
–
∆t
n+ 1
n+ 1
2
2
−
F̄i+ 1 − F̄i− 1
∆x
2
2
n+ 1
Key question: how to compute numerical fluxes F̄i− 12 ?
2
»
– X
N
N
N
X
X
1
∆t
n+ 2
n+ 1
n
2
Qn+1
=
Q
−
F̄
−
F̄
=
Qn
Conservation:
i
i
1
i
N+ 1
∆x
2
2
i=1
i=1
i=1
J.A. Rossmanith | RMMC 2010
6/39
Finite volume schemes
Linear advection
TVD Limiters
Nonlinear equations
Outline
1 Finite volume schemes
2 Linear advection
3 TVD Limiters
4 Nonlinear equations
J.A. Rossmanith | RMMC 2010
7/39
Finite volume schemes
Linear advection
TVD Limiters
Nonlinear equations
Linear advection
Basic equation
PDE :
q,t + uq,x = 0,
IC :
q(0, x) = η(x)
BCs :
q(t, 0) = q(t, 1)
u>0
(periodic)
Method of characteristics:
q(t, x) = η (ξ) ,
ξ := (x − ut) − bx − utc
Separation of variables:
∞ n
o
X
1
an cos [nπ (x − ut)] + bn sin [nπ (x − ut)]
q(t, x) = a0 +
2
n=1
Z 1
η(x) cos(nπx) dx, n ≥ 0
an = 2
0
1
Z
bn = 2
η(x) sin(nπx) dx,
n≥1
0
J.A. Rossmanith | RMMC 2010
8/39
Finite volume schemes
Linear advection
TVD Limiters
Nonlinear equations
Centered fluxes
A first attempt at a numerical scheme
Represent solution as a piecewise constant
Centered flux:
n+ 1
F̄i− 12 =
2
1
1
n
n
(f (Qn
u (Qn
i ) + f (Qi−1 )) =
i + Qi−1 )
2
2
Resulting numerical scheme:
–
»
∆t 1
1
n
n
u (Qn
u (Qn
Qn+1
= Qn
i −
i+1 + Qi ) −
i + Qi−1 )
i
∆x 2
2
ˆ
˜
u∆t n
= Qn
Qi+1 − Qn
i −
i−1
2∆x
J.A. Rossmanith | RMMC 2010
9/39
Finite volume schemes
Linear advection
TVD Limiters
Nonlinear equations
Consistency
Local truncation error: failure of scheme to satisfy exact equation
q(t + ∆t, x) − q(t, x)
F̄(x + ∆x/2) − F̄(x − ∆x/2)
+
∆t
∆x
q(t + ∆t, x) − q(t, x)
u {q(t, x + ∆x) − q(t, x − ∆x)}
τ =
+
∆t
2∆x
„
« „
«
1
1
2
τ = q,t + ∆t q,tt + · · · + uq,x + u ∆x q,xxx + · · ·
2
6
`
2´
τ = O ∆t, ∆x
τ =
ex :
Consistency:
τ →0
Fundamental Theorem:
1 ODE: zero-stability,
∆x, ∆t → 0
as
Convergence = Consistency + Stability
q 0 (t)
=0
2 Linear PDE: Lax-Richtmyer stability
3 Scalar conservation law:
total variation stability
4 Systems of conservation laws:
J.A. Rossmanith | RMMC 2010
few convergence proofs
10/39
Finite volume schemes
Linear advection
TVD Limiters
Nonlinear equations
Consistency
Local truncation error: failure of scheme to satisfy exact equation
q(t + ∆t, x) − q(t, x)
F̄(x + ∆x/2) − F̄(x − ∆x/2)
+
∆t
∆x
q(t + ∆t, x) − q(t, x)
u {q(t, x + ∆x) − q(t, x − ∆x)}
τ =
+
∆t
2∆x
„
« „
«
1
1
2
τ = q,t + ∆t q,tt + · · · + uq,x + u ∆x q,xxx + · · ·
2
6
`
2´
τ = O ∆t, ∆x
τ =
ex :
Consistency:
τ →0
Fundamental Theorem:
1 ODE: zero-stability,
∆x, ∆t → 0
as
Convergence = Consistency + Stability
q 0 (t)
=0
2 Linear PDE: Lax-Richtmyer stability
3 Scalar conservation law:
total variation stability
4 Systems of conservation laws:
J.A. Rossmanith | RMMC 2010
few convergence proofs
10/39
Finite volume schemes
Linear advection
TVD Limiters
Nonlinear equations
Consistency
Local truncation error: failure of scheme to satisfy exact equation
q(t + ∆t, x) − q(t, x)
F̄(x + ∆x/2) − F̄(x − ∆x/2)
+
∆t
∆x
q(t + ∆t, x) − q(t, x)
u {q(t, x + ∆x) − q(t, x − ∆x)}
τ =
+
∆t
2∆x
„
« „
«
1
1
2
τ = q,t + ∆t q,tt + · · · + uq,x + u ∆x q,xxx + · · ·
2
6
`
2´
τ = O ∆t, ∆x
τ =
ex :
Consistency:
τ →0
Fundamental Theorem:
1 ODE: zero-stability,
∆x, ∆t → 0
as
Convergence = Consistency + Stability
q 0 (t)
=0
2 Linear PDE: Lax-Richtmyer stability
3 Scalar conservation law:
total variation stability
4 Systems of conservation laws:
J.A. Rossmanith | RMMC 2010
few convergence proofs
10/39
Finite volume schemes
Linear advection
TVD Limiters
Nonlinear equations
Consistency
Local truncation error: failure of scheme to satisfy exact equation
q(t + ∆t, x) − q(t, x)
F̄(x + ∆x/2) − F̄(x − ∆x/2)
+
∆t
∆x
q(t + ∆t, x) − q(t, x)
u {q(t, x + ∆x) − q(t, x − ∆x)}
τ =
+
∆t
2∆x
„
« „
«
1
1
2
τ = q,t + ∆t q,tt + · · · + uq,x + u ∆x q,xxx + · · ·
2
6
`
2´
τ = O ∆t, ∆x
τ =
ex :
Consistency:
τ →0
Fundamental Theorem:
1 ODE: zero-stability,
∆x, ∆t → 0
as
Convergence = Consistency + Stability
q 0 (t)
=0
2 Linear PDE: Lax-Richtmyer stability
3 Scalar conservation law:
total variation stability
4 Systems of conservation laws:
J.A. Rossmanith | RMMC 2010
few convergence proofs
10/39
Finite volume schemes
Linear advection
TVD Limiters
Nonlinear equations
Consistency
Local truncation error: failure of scheme to satisfy exact equation
q(t + ∆t, x) − q(t, x)
F̄(x + ∆x/2) − F̄(x − ∆x/2)
+
∆t
∆x
q(t + ∆t, x) − q(t, x)
u {q(t, x + ∆x) − q(t, x − ∆x)}
τ =
+
∆t
2∆x
„
« „
«
1
1
2
τ = q,t + ∆t q,tt + · · · + uq,x + u ∆x q,xxx + · · ·
2
6
`
2´
τ = O ∆t, ∆x
τ =
ex :
Consistency:
τ →0
Fundamental Theorem:
1 ODE: zero-stability,
∆x, ∆t → 0
as
Convergence = Consistency + Stability
q 0 (t)
=0
2 Linear PDE: Lax-Richtmyer stability
3 Scalar conservation law:
total variation stability
4 Systems of conservation laws:
J.A. Rossmanith | RMMC 2010
few convergence proofs
10/39
Finite volume schemes
Linear advection
TVD Limiters
Nonlinear equations
CFL condition
Courant, Friedrichs, & Lewy (1928)
Method is stable only if numerical domain of dependence includes true
0≤
u∆t
≤1
∆x
−1 ≤
u∆t
≤0
∆x
−1 ≤
u∆t
≤1
∆x
0≤
u∆t
≤2
∆x
−∞ ≤
J.A. Rossmanith | RMMC 2010
u∆t
≤∞
∆x
11/39
Finite volume schemes
Linear advection
TVD Limiters
Nonlinear equations
Lax-Richtmyer stability
Linear method:
Qn+1 = B∆t Qn
(with ∆t/∆x fixed)
Method is LxR stable in some norm k · k if, for every time T > 0, ∃ a
constant CT s.t.
N
kB∆t
k ≤ CT
for all ∆t, N with (N + 1)∆t ≤ T
It is sufficient to show that ∃ α for which
kQn+1 k ≤ (1 + α∆t)kQn k,
since then
kQn+1 k ≤ (1 + α∆t)N +1 kQ0 k ≤ eα∆t(N +1) kQ0 k ≤ eαT kQ0 k
For the centered flux scheme:
“ν
ν”
u∆t
, 1, −
where ν =
B = circulant
2
2
∆x
` T ´
and one can show that ρ B B > 1 + c(ν), where c(ν) > 0
J.A. Rossmanith | RMMC 2010
12/39
Finite volume schemes
Linear advection
TVD Limiters
Nonlinear equations
The modified equation
Numerical method does not exactly solve PDE
Q: What PDE is exactly solved by the numerical method?
Q: What PDE is better approximated than original PDE?
For centered flux scheme:
q(t + ∆t, x) − q(t, x)
u {q(t, x + ∆x) − q(t, x − ∆x)}
+
=0
∆t
2∆x
„
« „
«
1
1
q,t + ∆t q,tt + · · · + uq,x + u ∆x2 q,xxx + · · · = 0
2
6
1
q,t + uq,x = − ∆t q,tt + O(∆t2 + ∆x2 )
2
q,tt = −uq,xt + O(∆t) = u2 q,xx + O(∆t)
1
∴ q,t + uq,x = − ∆t u2 q,xx + O(∆t2 + ∆x2 )
2
∴ method approx an advection-diffusion eqn to O(∆t2 + ∆x2 )
However, diffusion coefficient is negative for all ∆t > 0 and u 6= 0
J.A. Rossmanith | RMMC 2010
13/39
Finite volume schemes
Linear advection
TVD Limiters
Nonlinear equations
The modified equation
Numerical method does not exactly solve PDE
Q: What PDE is exactly solved by the numerical method?
Q: What PDE is better approximated than original PDE?
For centered flux scheme:
q(t + ∆t, x) − q(t, x)
u {q(t, x + ∆x) − q(t, x − ∆x)}
+
=0
∆t
2∆x
„
« „
«
1
1
q,t + ∆t q,tt + · · · + uq,x + u ∆x2 q,xxx + · · · = 0
2
6
1
q,t + uq,x = − ∆t q,tt + O(∆t2 + ∆x2 )
2
q,tt = −uq,xt + O(∆t) = u2 q,xx + O(∆t)
1
∴ q,t + uq,x = − ∆t u2 q,xx + O(∆t2 + ∆x2 )
2
∴ method approx an advection-diffusion eqn to O(∆t2 + ∆x2 )
However, diffusion coefficient is negative for all ∆t > 0 and u 6= 0
J.A. Rossmanith | RMMC 2010
13/39
Finite volume schemes
Linear advection
TVD Limiters
Nonlinear equations
The modified equation
Numerical method does not exactly solve PDE
Q: What PDE is exactly solved by the numerical method?
Q: What PDE is better approximated than original PDE?
For centered flux scheme:
q(t + ∆t, x) − q(t, x)
u {q(t, x + ∆x) − q(t, x − ∆x)}
+
=0
∆t
2∆x
„
« „
«
1
1
q,t + ∆t q,tt + · · · + uq,x + u ∆x2 q,xxx + · · · = 0
2
6
1
q,t + uq,x = − ∆t q,tt + O(∆t2 + ∆x2 )
2
q,tt = −uq,xt + O(∆t) = u2 q,xx + O(∆t)
1
∴ q,t + uq,x = − ∆t u2 q,xx + O(∆t2 + ∆x2 )
2
∴ method approx an advection-diffusion eqn to O(∆t2 + ∆x2 )
However, diffusion coefficient is negative for all ∆t > 0 and u 6= 0
J.A. Rossmanith | RMMC 2010
13/39
Finite volume schemes
Linear advection
TVD Limiters
Nonlinear equations
The modified equation
Numerical method does not exactly solve PDE
Q: What PDE is exactly solved by the numerical method?
Q: What PDE is better approximated than original PDE?
For centered flux scheme:
q(t + ∆t, x) − q(t, x)
u {q(t, x + ∆x) − q(t, x − ∆x)}
+
=0
∆t
2∆x
„
« „
«
1
1
q,t + ∆t q,tt + · · · + uq,x + u ∆x2 q,xxx + · · · = 0
2
6
1
q,t + uq,x = − ∆t q,tt + O(∆t2 + ∆x2 )
2
q,tt = −uq,xt + O(∆t) = u2 q,xx + O(∆t)
1
∴ q,t + uq,x = − ∆t u2 q,xx + O(∆t2 + ∆x2 )
2
∴ method approx an advection-diffusion eqn to O(∆t2 + ∆x2 )
However, diffusion coefficient is negative for all ∆t > 0 and u 6= 0
J.A. Rossmanith | RMMC 2010
13/39
Finite volume schemes
Linear advection
TVD Limiters
Nonlinear equations
The modified equation
Numerical method does not exactly solve PDE
Q: What PDE is exactly solved by the numerical method?
Q: What PDE is better approximated than original PDE?
For centered flux scheme:
q(t + ∆t, x) − q(t, x)
u {q(t, x + ∆x) − q(t, x − ∆x)}
+
=0
∆t
2∆x
„
« „
«
1
1
q,t + ∆t q,tt + · · · + uq,x + u ∆x2 q,xxx + · · · = 0
2
6
1
q,t + uq,x = − ∆t q,tt + O(∆t2 + ∆x2 )
2
q,tt = −uq,xt + O(∆t) = u2 q,xx + O(∆t)
1
∴ q,t + uq,x = − ∆t u2 q,xx + O(∆t2 + ∆x2 )
2
∴ method approx an advection-diffusion eqn to O(∆t2 + ∆x2 )
However, diffusion coefficient is negative for all ∆t > 0 and u 6= 0
J.A. Rossmanith | RMMC 2010
13/39
Finite volume schemes
Linear advection
TVD Limiters
Nonlinear equations
Why did centered flux approach fail?
The problem
Write system in semi-discrete form (∆t → 0, fix ∆x):
2
3
0
−1
1
61
7
0
−1
6
7
1 6
7
.
.
.
.
.
.
Q̇(t) = B Q(t), B =
6
7
.
.
.
7
2∆x 6
4
1
0 −15
−1
1
0
Since B is anti-symmetric, it has purely imaginary eigenvalues
Centered flux finite volume method: forward Euler in time
One possible cure
Leapfrog in time:
Qn+1
= Qn−1
−
i
i
u∆t
∆x
ˆ
n
Qn
i+1 − Qi−1
˜
Problem: 2-time levels, no dissipation
J.A. Rossmanith | RMMC 2010
14/39
Finite volume schemes
Linear advection
TVD Limiters
Nonlinear equations
Why did centered flux approach fail?
The problem
Write system in semi-discrete form (∆t → 0, fix ∆x):
2
3
0
−1
1
61
7
0
−1
6
7
1 6
7
.
.
.
.
.
.
Q̇(t) = B Q(t), B =
6
7
.
.
.
7
2∆x 6
4
1
0 −15
−1
1
0
Since B is anti-symmetric, it has purely imaginary eigenvalues
Centered flux finite volume method: forward Euler in time
One possible cure
Leapfrog in time:
Qn+1
= Qn−1
−
i
i
u∆t
∆x
ˆ
n
Qn
i+1 − Qi−1
˜
Problem: 2-time levels, no dissipation
J.A. Rossmanith | RMMC 2010
14/39
Finite volume schemes
Linear advection
TVD Limiters
Nonlinear equations
Why did centered flux approach fail?
The problem
Write system in semi-discrete form (∆t → 0, fix ∆x):
2
3
0
−1
1
61
7
0
−1
6
7
1 6
7
.
.
.
.
.
.
Q̇(t) = B Q(t), B =
6
7
.
.
.
7
2∆x 6
4
1
0 −15
−1
1
0
Since B is anti-symmetric, it has purely imaginary eigenvalues
Centered flux finite volume method: forward Euler in time
One possible cure
Leapfrog in time:
Qn+1
= Qn−1
−
i
i
u∆t
∆x
ˆ
n
Qn
i+1 − Qi−1
˜
Problem: 2-time levels, no dissipation
J.A. Rossmanith | RMMC 2010
14/39
Finite volume schemes
Linear advection
TVD Limiters
Nonlinear equations
Why did centered flux approach fail?
The problem
Write system in semi-discrete form (∆t → 0, fix ∆x):
2
3
0
−1
1
61
7
0
−1
6
7
1 6
7
.
.
.
.
.
.
Q̇(t) = B Q(t), B =
6
7
.
.
.
7
2∆x 6
4
1
0 −15
−1
1
0
Since B is anti-symmetric, it has purely imaginary eigenvalues
Centered flux finite volume method: forward Euler in time
One possible cure
Leapfrog in time:
Qn+1
= Qn−1
−
i
i
u∆t
∆x
ˆ
n
Qn
i+1 − Qi−1
˜
Problem: 2-time levels, no dissipation
J.A. Rossmanith | RMMC 2010
14/39
Finite volume schemes
Linear advection
TVD Limiters
Nonlinear equations
Artificial viscosity
Basic idea
Artificial viscosity
Add to semi-discrete system a viscous term: (q,t + uq,x = ε q,xx )
2
0
61
6
1 6
B=
6
2∆x 6
4
−1
0
..
.
−1
..
.
1
−1
Q̇(t) = B Q(t),
3
1
7
7
ε
7
..
7+
.
7 ∆x2
0 −15
1
0
−2
61
6
6
6
6
4
2
1
−2
..
.
1
1
..
.
1
1
..
.
−2
1
3
7
7
7
7
7
15
−2
Eigenvalues of B lie in the stability region of Euler for
u2 ∆t
∆x2
≤ε≤
2
2∆t
Resulting methods:
J.A. Rossmanith | RMMC 2010
or
ν≤
2ε
1
≤
u∆x
ν
(0 ≤ ν ≤ 1
by CFL)
1-step, conservative, first-order accurate?
15/39
Finite volume schemes
Linear advection
TVD Limiters
Nonlinear equations
Artificial viscosity
Basic idea
Artificial viscosity
Add to semi-discrete system a viscous term: (q,t + uq,x = ε q,xx )
2
0
61
6
1 6
B=
6
2∆x 6
4
−1
0
..
.
−1
..
.
1
−1
Q̇(t) = B Q(t),
3
1
7
7
ε
7
..
7+
.
7 ∆x2
0 −15
1
0
−2
61
6
6
6
6
4
2
1
−2
..
.
1
1
..
.
1
1
..
.
−2
1
3
7
7
7
7
7
15
−2
Eigenvalues of B lie in the stability region of Euler for
u2 ∆t
∆x2
≤ε≤
2
2∆t
Resulting methods:
J.A. Rossmanith | RMMC 2010
or
ν≤
2ε
1
≤
u∆x
ν
(0 ≤ ν ≤ 1
by CFL)
1-step, conservative, first-order accurate?
15/39
Finite volume schemes
Linear advection
TVD Limiters
Nonlinear equations
Artificial viscosity
Basic idea
Artificial viscosity
Add to semi-discrete system a viscous term: (q,t + uq,x = ε q,xx )
2
0
61
6
1 6
B=
6
2∆x 6
4
−1
0
..
.
−1
..
.
1
−1
Q̇(t) = B Q(t),
3
1
7
7
ε
7
..
7+
.
7 ∆x2
0 −15
1
0
−2
61
6
6
6
6
4
2
1
−2
..
.
1
1
..
.
1
1
..
.
−2
1
3
7
7
7
7
7
15
−2
Eigenvalues of B lie in the stability region of Euler for
u2 ∆t
∆x2
≤ε≤
2
2∆t
Resulting methods:
J.A. Rossmanith | RMMC 2010
or
ν≤
2ε
1
≤
u∆x
ν
(0 ≤ ν ≤ 1
by CFL)
1-step, conservative, first-order accurate?
15/39
Finite volume schemes
Linear advection
TVD Limiters
Nonlinear equations
Artificial viscosity
Lax-Friedrichs method
Derivation
i
u∆t h n
Qi+1 − Qn
Qn+1
= Qn
i−1
i −
i
2∆x
” u∆t h
i
1“ n
n+1
n
Qi
=
Qi+1 + Qn
Qn
i−1 −
i+1 − Qi−1
2
2∆x
i
∆t h n+ 21
n+ 1
n+1
n
Fi+ 1 − Fi− 12
Qi
= Qi −
∆x
2
2
1
1 ∆x
n+ 1
n
n
n
2
(Qn
Fi− 1 = (f (Qi ) + f (Qi−1 )) −
i − Qi−1 )
2
2 ∆t
2
Modified equation
q,t + uq,x =
´
∆x2 `
1 − ν 2 q,xx + O(∆t2 + ∆x2 )
2∆t
Local truncation error:
Stable if
τ = O(∆t + ∆x2 )
0≤ν≤1
Most diffusive method,
J.A. Rossmanith | RMMC 2010
ε=
∆x2
2∆t
16/39
Finite volume schemes
Linear advection
TVD Limiters
Nonlinear equations
Artificial viscosity
Lax-Friedrichs method
Derivation
i
u∆t h n
Qi+1 − Qn
Qn+1
= Qn
i−1
i −
i
2∆x
” u∆t h
i
1“ n
n+1
n
Qi
=
Qi+1 + Qn
Qn
i−1 −
i+1 − Qi−1
2
2∆x
i
∆t h n+ 21
n+ 1
n+1
n
Fi+ 1 − Fi− 12
Qi
= Qi −
∆x
2
2
1
1 ∆x
n+ 1
n
n
n
2
(Qn
Fi− 1 = (f (Qi ) + f (Qi−1 )) −
i − Qi−1 )
2
2 ∆t
2
Modified equation
q,t + uq,x =
´
∆x2 `
1 − ν 2 q,xx + O(∆t2 + ∆x2 )
2∆t
Local truncation error:
Stable if
τ = O(∆t + ∆x2 )
0≤ν≤1
Most diffusive method,
J.A. Rossmanith | RMMC 2010
ε=
∆x2
2∆t
16/39
Finite volume schemes
Linear advection
TVD Limiters
Nonlinear equations
Artificial viscosity
Upwind method
Derivation
1 Reconstruct, Evolve, and Average (REA):
n
Qn+1
= (1 − ν) Qn
i + ν Qi−1
i
2 Numerical update:
3 Numerical flux:
n+ 1
Fi− 12 = u Qn
i−1
2
Modified equation
q,t + uq,x =
1
∆x ν (1 − ν) q,xx + O(∆t2 + ∆x2 )
2
Local truncation error:
Stable if
τ = O(∆t + ∆x2 )
0≤ν≤1
Less diffusive than Lax-Friedrichs, still not least diffusive method
J.A. Rossmanith | RMMC 2010
17/39
Finite volume schemes
Linear advection
TVD Limiters
Nonlinear equations
Artificial viscosity
Upwind method
Derivation
1 Reconstruct, Evolve, and Average (REA):
n
Qn+1
= (1 − ν) Qn
i + ν Qi−1
i
2 Numerical update:
3 Numerical flux:
n+ 1
Fi− 12 = u Qn
i−1
2
Modified equation
q,t + uq,x =
1
∆x ν (1 − ν) q,xx + O(∆t2 + ∆x2 )
2
Local truncation error:
Stable if
τ = O(∆t + ∆x2 )
0≤ν≤1
Less diffusive than Lax-Friedrichs, still not least diffusive method
J.A. Rossmanith | RMMC 2010
17/39
Finite volume schemes
Linear advection
TVD Limiters
Nonlinear equations
Artificial viscosity
Lax-Richtmyer stability of the upwind method
Upwind method:
n
Qn+1
= (1 − ν) Qn
i + ν Qi−1
i
L1 -stability:
kQn+1 k1 := ∆x
X˛
˛
n ˛
˛(1 − ν) Qn
i + ν Qi−1
i
≤ ∆x (1 − ν)
X˛ n ˛
X ˛ n˛
˛Qi−1 ˛
˛Qi ˛ + ∆x ν
≤ ∆x (1 − ν)
X ˛ n˛
X ˛ n˛
˛Qi ˛ + ∆x ν
˛Qi ˛
i
i
i
i
X ˛ n˛
˛Qi ˛ =: kQn k1
≤ ∆x
i
L2 -stability:
Qn+1 = B Qn ,
n+1
kQ
J.A. Rossmanith | RMMC 2010
k2 = kB
n+1
B := circulant (ν, (1 − ν), 0)
“
”
k2 kQ0 k2 ,
ρ BT B ≤ 1
18/39
Finite volume schemes
Linear advection
TVD Limiters
Nonlinear equations
Artificial viscosity
Lax-Richtmyer stability of the upwind method
Upwind method:
n
Qn+1
= (1 − ν) Qn
i + ν Qi−1
i
L1 -stability:
kQn+1 k1 := ∆x
X˛
˛
n ˛
˛(1 − ν) Qn
i + ν Qi−1
i
≤ ∆x (1 − ν)
X˛ n ˛
X ˛ n˛
˛Qi−1 ˛
˛Qi ˛ + ∆x ν
≤ ∆x (1 − ν)
X ˛ n˛
X ˛ n˛
˛Qi ˛ + ∆x ν
˛Qi ˛
i
i
i
i
X ˛ n˛
˛Qi ˛ =: kQn k1
≤ ∆x
i
L2 -stability:
Qn+1 = B Qn ,
n+1
kQ
J.A. Rossmanith | RMMC 2010
k2 = kB
n+1
B := circulant (ν, (1 − ν), 0)
“
”
k2 kQ0 k2 ,
ρ BT B ≤ 1
18/39
Finite volume schemes
Linear advection
TVD Limiters
Nonlinear equations
Artificial viscosity
Lax-Richtmyer stability of the upwind method
Upwind method:
n
Qn+1
= (1 − ν) Qn
i + ν Qi−1
i
L1 -stability:
kQn+1 k1 := ∆x
X˛
˛
n ˛
˛(1 − ν) Qn
i + ν Qi−1
i
≤ ∆x (1 − ν)
X˛ n ˛
X ˛ n˛
˛Qi−1 ˛
˛Qi ˛ + ∆x ν
≤ ∆x (1 − ν)
X ˛ n˛
X ˛ n˛
˛Qi ˛ + ∆x ν
˛Qi ˛
i
i
i
i
X ˛ n˛
˛Qi ˛ =: kQn k1
≤ ∆x
i
L2 -stability:
Qn+1 = B Qn ,
n+1
kQ
J.A. Rossmanith | RMMC 2010
k2 = kB
n+1
B := circulant (ν, (1 − ν), 0)
“
”
k2 kQ0 k2 ,
ρ BT B ≤ 1
18/39
Finite volume schemes
Linear advection
TVD Limiters
Nonlinear equations
Artificial viscosity
Lax-Wendroff method
Derivation
1 2
∆t q,tt (t, x) + O(∆t3 )
2
u
n
q,t = −uq,x =⇒ q,t ≈ −
(Qn
i+1 − Qi−1 )
∆x
u2
n
n
(Qn
q,tt = u2 q,xx =⇒ q,tt ≈
i+1 − 2Qi + Qi−1 )
∆x2
1 2
n
n
n
n
Qn+1
= Qn
ν (Qn
i − ν (Qi+1 − Qi−1 ) +
i+1 − 2Qi + Qi−1 )
i
2
1
u2 ∆t
n+ 1
n
n
(Qn
Fi− 12 = (f (Qn
i ) + f (Qi−1 )) −
i − Qi−1 )
2
2∆x
2
q(t + ∆t, x) = q(t, x) + ∆t q,t (t, x) +
Modified equation
´
u∆x2 `
1 − ν 2 q,xxx + O(∆t3 + ∆x3 )
6
Local truncation error: τ = O(∆t2 + ∆x2 )
q,t + uq,x = −
Stable if
0≤ν≤1
Least diffusive method,
J.A. Rossmanith | RMMC 2010
ε=
u2 ∆t
2
19/39
Finite volume schemes
Linear advection
TVD Limiters
Nonlinear equations
Artificial viscosity
Lax-Wendroff method
Derivation
1 2
∆t q,tt (t, x) + O(∆t3 )
2
u
n
q,t = −uq,x =⇒ q,t ≈ −
(Qn
i+1 − Qi−1 )
∆x
u2
n
n
(Qn
q,tt = u2 q,xx =⇒ q,tt ≈
i+1 − 2Qi + Qi−1 )
∆x2
1 2
n
n
n
n
Qn+1
= Qn
ν (Qn
i − ν (Qi+1 − Qi−1 ) +
i+1 − 2Qi + Qi−1 )
i
2
1
u2 ∆t
n+ 1
n
n
(Qn
Fi− 12 = (f (Qn
i ) + f (Qi−1 )) −
i − Qi−1 )
2
2∆x
2
q(t + ∆t, x) = q(t, x) + ∆t q,t (t, x) +
Modified equation
´
u∆x2 `
1 − ν 2 q,xxx + O(∆t3 + ∆x3 )
6
Local truncation error: τ = O(∆t2 + ∆x2 )
q,t + uq,x = −
Stable if
0≤ν≤1
Least diffusive method,
J.A. Rossmanith | RMMC 2010
ε=
u2 ∆t
2
19/39
Finite volume schemes
Linear advection
TVD Limiters
Nonlinear equations
Two examples
Upwind and Lax-Wendroff
J.A. Rossmanith | RMMC 2010
20/39
Finite volume schemes
Linear advection
TVD Limiters
Nonlinear equations
Outline
1 Finite volume schemes
2 Linear advection
3 TVD Limiters
4 Nonlinear equations
J.A. Rossmanith | RMMC 2010
21/39
Finite volume schemes
Linear advection
TVD Limiters
Nonlinear equations
Harten’s theorem
Statement
Definition (Discrete total variation)
TV(Qn ) :=
∞
X
˛ n
˛
˛Qi − Qn
˛
i−1
i=−∞
Theorem (Harten, 1984)
Consider an explicit 1-step method with a 3-point spatial stencil of the form:
n
n
n
n
n
n
= Qn
Qn+1
i − Ci−1 (Qi − Qi−1 ) + Di (Qi+1 − Qi ) ,
i
n
where Ci−1
and Din may depend on Qn . Then
TV(Qn+1 ) ≤ TV(Qn )
(Total variation diminishing)
provided that
n
Ci−1
≥ 0,
J.A. Rossmanith | RMMC 2010
Din ≥ 0,
Cin + Din ≤ 1
∀i.
22/39
Finite volume schemes
Linear advection
TVD Limiters
Nonlinear equations
Harten’s theorem
Proof
Harten, 1984.
n
n
n
n
n
n
n
Qn+1
i+1 = Qi+1 − Ci (Qi+1 − Qi ) + Di+1 (Qi+2 − Qi+1 )
n
n
n
n
n
n
Qn+1
= Qn
i − Ci−1 (Qi − Qi−1 ) + Di (Qi+1 − Qi )
i
˛ n+1
˛
˛
n
n
n
n
˛Qi+1 − Qn+1
˛ = ˛(1 − Cin − Din )(Qn
i+1 − Qi ) + Di+1 (Qi+2 − Qi+1 )
i
˛
n
n
˛
+ Ci−1
(Qn
i − Qi−1 )
By assumption:
(1 − Cin − Din ) ≥ 0,
n
Di+1
≥ 0,
n
Ci−1
≥0
˛ n+1
˛
˛
˛
˛
˛
n˛
n ˛ n
n ˛
˛Qi
˛ ≤ (1 − Cin − Din )˛Qn
− Qn+1
i+1 − Qi + Di+1 Qi+2 − Qi+1
i
˛
˛
n ˛ n
˛
+ Ci−1
Qi − Qn
i−1
∴ TV(Qn+1 ) ≤ TV(Qn )
J.A. Rossmanith | RMMC 2010
23/39
Finite volume schemes
Linear advection
TVD Limiters
Nonlinear equations
Wave propagation formulation
Definition (LeVeque, 1997)
Qn+1
= Qn
i −
i
Speed:
Wave:
Fluctuations:
Conservation:
Flux correction:
Smoothness:
i ∆t h
i
∆t h −
A ∆Qi+ 1 + A+ ∆Qi− 1 −
F̃i+ 1 − F̃i− 1
2
2
2
2
∆x
∆x
si− 1 = u,
2
= max(si− 1 , 0),
s+
i− 1
= min(si− 1 , 0)
s−
i− 1
2
2
n
Wi− 1 := Qn
i − Qi−1
2
Wi− 1
A± ∆Qi− 1 := s±
i− 1
2
2
2
−
+
n
A ∆Qi− 1 + A ∆Qi− 1 = u (Qn
i − Qi−1 )
2
2
˛
˛
!
˛s 1 ˛ ∆t
“
”
˛
i− 2
1˛
F̃i− 1 := ˛si− 1 ˛ 1 −
Wi− 1 φ θi− 1
2
2
2
2
2
∆x
θi− 1 :=
2
Wi− 3
2
Wi− 1
2
Wave limiter:
2
2
φ = 0 (Upwind),
J.A. Rossmanith | RMMC 2010
or
Wi+ 1
2
Wi− 1
2
φ = 1 (Lax-Wendroff)
24/39
Finite volume schemes
Linear advection
TVD Limiters
Nonlinear equations
Wave limiters
Definition (Sweby, 1984)
Let ν = u∆t
, assume u > 0.
∆x
Write wave propagation method in Harten form:
Din
Need
≡ 0,
n
Ci−1
n
≤1
0 ≤ Ci−1
1
= ν − ν (1 − ν)
2
and
0 ≤ ν ≤ 1,
φ(θi+ 1 )
2
θi+ 1
!
”
“
− φ θi− 1
.
2
2
˛
˛
˛ 1
˛
˛≤2
∴ ˛˛ φ(θ
−
φ
(θ
)
2
θ1
˛
∀ θ1 , θ2 .
Want
1 φ(θ ≤ 0) = 0
(limit extrema),
2 φ(θ > 0) > 0,
(2nd order)

ff 
ff 
ff
φ(θ)
Sweby region:
0≤
≤ 2 ∩ 0 ≤ φ(θ) ≤ 2 ∩ φ(1) = 1
θ
3 φ(1) = 1
J.A. Rossmanith | RMMC 2010
25/39
Finite volume schemes
Linear advection
TVD Limiters
Nonlinear equations
Examples of limiters
Linear methods:
Upwind:
φ(θ) = 0
Lax-Wendroff:
φ(θ) = 1
Beam-Warming:
Fromm:
φ(θ) = θ
1
φ(θ) = (1 + θ)
2
Total variation diminishing limiters:
Minmod:
Superbee:
Monotonized Centered:
van Leer:
J.A. Rossmanith | RMMC 2010
φ(θ) = minmod(1, θ)
φ(θ) = max (0, min(1, 2θ), min(2, θ))
„
„
««
(1 + θ)
φ(θ) = max 0, min
, 2, 2θ
2
θ + |θ|
φ(θ) =
1 + |θ|
26/39
Finite volume schemes
Linear advection
TVD Limiters
Nonlinear equations
Sweby region
J.A. Rossmanith | RMMC 2010
27/39
Finite volume schemes
Linear advection
TVD Limiters
Nonlinear equations
A numerical example
J.A. Rossmanith | RMMC 2010
28/39
Finite volume schemes
Linear advection
TVD Limiters
Nonlinear equations
Outline
1 Finite volume schemes
2 Linear advection
3 TVD Limiters
4 Nonlinear equations
J.A. Rossmanith | RMMC 2010
29/39
Finite volume schemes
Linear advection
TVD Limiters
Nonlinear equations
Traffic flow
Cartoon
J.A. Rossmanith | RMMC 2010
30/39
Finite volume schemes
Linear advection
TVD Limiters
Nonlinear equations
Traffic flow
Basic equations
Scalar hyperbolic conservation law
f 0 (q) : R → R
q,t + f (q),x = 0,
Assume a convex flux:
f 00 (q) < 0
∀q
or
f 00 (q) > 0
∀q
Example: traffic flow
Flux function: f (q) = U (1 − q)q
1
0 ≤ q ≤ 1:
2
u(q) = U (1 − q):
density of cars on a single-lane road
car speed (u(1) = 0, u(0) = U )
Method of characteristics
dq
= 0,
dt
dx
= U (1−2q0 (ξ))
dt
=⇒
q = q(ξ),
ξ = x−U (1−2q0 (ξ))t
Gradient of solution:
q,x = q,ξ ξ,x ,
J.A. Rossmanith | RMMC 2010
ξ,x =
1
1 − 2U tq0,ξ
=⇒
tblowup =
1
2U max(q0,ξ )
31/39
Finite volume schemes
Linear advection
TVD Limiters
Nonlinear equations
Traffic flow
Basic equations
Scalar hyperbolic conservation law
f 0 (q) : R → R
q,t + f (q),x = 0,
Assume a convex flux:
f 00 (q) < 0
∀q
or
f 00 (q) > 0
∀q
Example: traffic flow
Flux function: f (q) = U (1 − q)q
1
0 ≤ q ≤ 1:
2
u(q) = U (1 − q):
density of cars on a single-lane road
car speed (u(1) = 0, u(0) = U )
Method of characteristics
dq
= 0,
dt
dx
= U (1−2q0 (ξ))
dt
=⇒
q = q(ξ),
ξ = x−U (1−2q0 (ξ))t
Gradient of solution:
q,x = q,ξ ξ,x ,
J.A. Rossmanith | RMMC 2010
ξ,x =
1
1 − 2U tq0,ξ
=⇒
tblowup =
1
2U max(q0,ξ )
31/39
Finite volume schemes
Linear advection
TVD Limiters
Nonlinear equations
Traffic flow
Basic equations
Scalar hyperbolic conservation law
f 0 (q) : R → R
q,t + f (q),x = 0,
Assume a convex flux:
f 00 (q) < 0
∀q
or
f 00 (q) > 0
∀q
Example: traffic flow
Flux function: f (q) = U (1 − q)q
1
0 ≤ q ≤ 1:
2
u(q) = U (1 − q):
density of cars on a single-lane road
car speed (u(1) = 0, u(0) = U )
Method of characteristics
dq
= 0,
dt
dx
= U (1−2q0 (ξ))
dt
=⇒
q = q(ξ),
ξ = x−U (1−2q0 (ξ))t
Gradient of solution:
q,x = q,ξ ξ,x ,
J.A. Rossmanith | RMMC 2010
ξ,x =
1
1 − 2U tq0,ξ
=⇒
tblowup =
1
2U max(q0,ξ )
31/39
Finite volume schemes
Linear advection
TVD Limiters
Nonlinear equations
Traffic flow
Basic equations
Scalar hyperbolic conservation law
f 0 (q) : R → R
q,t + f (q),x = 0,
Assume a convex flux:
f 00 (q) < 0
∀q
or
f 00 (q) > 0
∀q
Example: traffic flow
Flux function: f (q) = U (1 − q)q
1
0 ≤ q ≤ 1:
2
u(q) = U (1 − q):
density of cars on a single-lane road
car speed (u(1) = 0, u(0) = U )
Method of characteristics
dq
= 0,
dt
dx
= U (1−2q0 (ξ))
dt
=⇒
q = q(ξ),
ξ = x−U (1−2q0 (ξ))t
Gradient of solution:
q,x = q,ξ ξ,x ,
J.A. Rossmanith | RMMC 2010
ξ,x =
1
1 − 2U tq0,ξ
=⇒
tblowup =
1
2U max(q0,ξ )
31/39
Finite volume schemes
Linear advection
TVD Limiters
Nonlinear equations
Traffic flow
Shock formation
Example: Gaussian distribution of cars
Cars to the left of the peak are driving into congestion
Cars to the right are driving out of congestion
The congestion creates a traffic shock wave
Shock wave: |q,x (x, t)| → ∞ in finite time
J.A. Rossmanith | RMMC 2010
32/39
Finite volume schemes
Linear advection
TVD Limiters
Nonlinear equations
Rankine-Hugoniot conditions
Z
x+sh
x
t+h 
Z
t
ff
∂
∂
q+
f (q) dt dx = 0
∂t
∂x
sh(qr − q` ) − h (f (qr ) − f (q` )) = 0
s=
f (qr ) − f (q` )
qr − q`
Once |q,x (x, t)| → ∞, the differential equation is no longer valid
Must return to integral conservation law
Integrate around a small section of the shock in the space-time plane
Eqns that have the same smooth solns may not have same shock solns
„
«
„
«
` 2´
2 3
1 2
q,t +
q
=0
and
q ,t +
q
=0
2
3
,x
,x
=⇒
J.A. Rossmanith | RMMC 2010
q,t + q q,x = 0
33/39
Finite volume schemes
Linear advection
TVD Limiters
Nonlinear equations
Non-uniqueness & vanishing viscosity
Defn: The Riemann problem
(
q,t + f (q),x = 0
with
q(x, 0) =
q`
qr
x < x0
x > x0
In general, the solution to this problem is not unique
Can obtain a unique solution if we add viscosity and take ε → 0+ :
q,t + f (q),x = ε q,xx
For traffic flow:
J.A. Rossmanith | RMMC 2010
if q` < qr =⇒ shock,
if qr < q` =⇒ rarefaction
34/39
Finite volume schemes
Linear advection
TVD Limiters
Nonlinear equations
Godunov’s method
A generalization of the upwind scheme
Piecewise constant representation
Solve Riemann problem between neigh. states:
State at the interface, xi− 1 persists for ∆t ≤
2
Define interface flux as:
n+ 1
2
Fi− 1 =
2
Qn
i
and
Qn
i−1
Q?i− 1
∆x
:
smax
2
f (Q?i− 1 )
2
For linear advection with u > 0, this returns:
n+ 1
Fi− 12 = u Qn
i−1
2
For systems Riemann problem is expensive to solve (Newton iteration)
Not immediately obvious how to extend this to higher-order
J.A. Rossmanith | RMMC 2010
35/39
Finite volume schemes
Linear advection
TVD Limiters
Nonlinear equations
Roe’s method
Linearized Riemann problems
Piecewise constant representation
At each interface create a linearized Riemann problem:
q,t + f 0 (Q̄i− 1 ) q,x = 0
2
( n
Q
if x < xi− 1
i−1
2
q(tn , x) =
Qn
if
x > xi− 1
i
2
Definition (Roe’s method)
Qn+1
= Qn
i −
i
i
∆t h −
A ∆Qi+ 1 + A+ ∆Qi− 1
2
2
∆x
Speed:
Wave:
Fluctuations:
J.A. Rossmanith | RMMC 2010
si− 1 = f 0 (Q̄i− 1 )
2
2
n
Wi− 1 := Qn
i − Qi−1
2
A± ∆Qi− 1 := s±
Wi− 1
i− 1
2
2
2
36/39
Finite volume schemes
Linear advection
TVD Limiters
Nonlinear equations
Roe’s method
A note about conservation
Conservation requires that
n
A+ ∆Qi− 1 + A− ∆Qi− 1 = f (Qn
i ) − f (Qi−1 )
2
2
h
i
h
i
2
n 2
n
= U Qn
− U Qn
i − (Qi )
i−1 − (Qi−1 )
“
”
n
n
n
= U 1 − (Qn
i + Qi−1 ) (Qi − Qi−1 )
In the wave propagation method
“
”
n
n
n
A+ ∆Qi− 1 + A− ∆Qi− 1 = si− 1 (Qn
i − Qi−1 ) = U 1 − 2Q̄i− 1 (Qi − Qi−1 )
2
2
2
2
Therefore, we require:
Q̄i− 1 :=
2
1
n
(Qn
i + Qi−1 )
2
This choice is called the [Roe, 1981] average
Key point:
need to be careful about how si− 1 is defined
J.A. Rossmanith | RMMC 2010
2
37/39
Finite volume schemes
Linear advection
TVD Limiters
Nonlinear equations
Roe’s method
An entropy fix
Linearization works except in the case of a transonic rarefaction
At the sonic point, linearized wave speed is zero
To obtain correct entropy solution, need to split zero wave
„
«
1
1
F ? := f q =
= U
2
4
A− ∆Qi− 1 = F ? − f (Qn
i−1 )
2
?
A+ ∆Qi− 1 = f (Qn
i )−F
2
J.A. Rossmanith | RMMC 2010
38/39
Finite volume schemes
Linear advection
TVD Limiters
Nonlinear equations
Wave propagation method
Scalar conservation laws
Definition (LeVeque, 1997)
Qn+1
= Qn
i −
i
Speed:
Wave:
Fluctuations:
Flux correction:
Smoothness:
i ∆t h
i
∆t h −
A ∆Qi+ 1 + A+ ∆Qi− 1 −
F̃i+ 1 − F̃i− 1
2
2
2
2
∆x
∆x
si− 1 = U (1 − 2Q̄i− 1 ),
2
2
2
n
Wi− 1 := Qn
i − Qi−1
2
A± ∆Qi− 1 := s±
1 Wi− 1
i− 2
2
2
˛
˛
˛s 1 ˛ ∆t !
“
”
˛
˛
i− 2
1˛
F̃i− 1 := si− 1 ˛ 1 −
Wi− 1 φ θi− 1
2
2
2
2
2
∆x
θi− 1 :=
2
Wi− 3
2
Wi− 1
2
Wave limiter:
n
where Q̄i− 1 = Ave(Qn
i , Qi−1 )
φ = 0 (Upwind),
J.A. Rossmanith | RMMC 2010
or
Wi+ 1
2
Wi− 1
2
φ = 1 (Lax-Wendroff)
39/39
Download