Upload
mirko-pesce
View
216
Download
0
Tags:
Embed Size (px)
DESCRIPTION
cdd
Citation preview
1
CHAPTER 11
Numerical Schemes for Hyperbolic PDEs
-------------------------------------------------------------------------------------------------------
Copyright © 2015 by R.M. Barron. All rights reserved. No part of these notes may be reproduced or distributed
in any form or by any means, mechanical or electronic, including but not limited to photocopying, recording,
storage or retrieval system, without prior written permission from the author.
0; ccuu xt
])1(2)1([2
1)( 11
iiiixix uuu
xuu
1. Model Hyperbolic Equation (Linear Case)
The space derivative can be approximated by either 1st – order one-sided
differencing, or by 2nd – order central differencing (see Ch. 9, Slide 2)
Note: β = 0 → central
β = 1 → backward; leads to inherently unstable ODEs if c < 0
β = -1 → forward; leads to inherently unstable ODEs if c > 0
Since c > 0, we consider only central and backward differencing.
(11.1)
(11.2)
2
A. Explicit Schemes
(i) Explicit Euler (for time march)
For β = 0 (see FTCS; Ch. 5, Slide 8)
• O(∆t, ∆x2)
• unconditionally unstable
)(2
)(2
11111
1 ni
ni
ni
ni
ni uu
x
tcuuu
• O(∆t, ∆x2)
• conditionally stable; Courant number =
• 1-step method
])1(2)1([2
11
1ni
ni
ni
ni
ni uuu
x
c
t
uu
Lax Method: average in FTCSniu
1
x
tcC
(11.3; HC:6-6)
3
• conditionally stable;
• 1-step method
)( 11 n
ini
ni
ni uu
x
tcuu
For β = 1 (FTBS)
• O(∆t, ∆x)
• σ - λ relationship for Explicit Euler is σ = 1 +λΔt
• from Ch. 9, Slide 4:
M
mi
M
m
x
cm
2sin
2cos1
1
x
tcC
(11.4; HC:6-4)
4
(ii) β = 0, Leapfrog (for time march)
• see Ch. 5, Slides 9,10,14-28
• O(∆t2, ∆x2)
• conditionally stable;
• 2-step method
1
x
tcC
)( 1111 n
ini
ni
ni uu
x
tcuu
(11.5; HC:6-7)
5
(iii) Lax-Wendroff Method
• see Ch. 8, Slide 5 (for 2D)
• O(∆t2, ∆x2)
• conditionally stable;
• 1-step method
1
x
tcC
)2(2
)(2
112
22
111 n
ini
ni
ni
ni
ni
ni uuu
x
tcuu
x
tcuu
(11.6; HC:6-11)
Note: Before applying central space differencing, the Lax-Wendroff
technique leads to the equation
n
i
n
i
ni
ni
x
utc
x
uc
t
uu
2
221
2
artificial dissipation ↑
6
B. Implicit Schemes
(i) Implicit Euler (for time march)
])1(2)1([2
11
111
1
ni
ni
ni
ni
ni uuu
x
c
t
uu
For β = 0 (see BTCS; Ch. 6, Slide 1)
• O(∆t, ∆x2)
• unconditionally stable
• 1-step method, using tridiagonal solver
)(2
11
11
1
n
ini
ni
ni uu
x
tcuu (11.7; HC:6-12)
7
For β = 1 (BTBS)
• O(∆t, ∆x)
• σ - λ relationship for Implicit Euler is σ = (1 – λΔt)-1
• from Ch. 9, Slide 4:
M
mi
M
m
x
cm
2sin
2cos1
• unconditionally stable
• 1-step method, using tridiagonal solver
)( 11
11
n
ini
ni
ni uu
x
tcuu (11.8; HC:6-13)
8
(ii) Crank-Nicolson, with β = 0
• see Ch. 6, Slide 2
• O(∆t2, ∆x2)
• unconditionally stable
• 1-step method, using tridiagonal solver
)(4
111
11
11 n
ini
ni
ni
ni
ni uuuu
x
tcuu
(11.9; HC:6-15)
9
C. Splitting Methods
• for multidimensional problems
• Approximate Factorization – see, eg.,
Lax-Wendroff for 2D (Ch. 8, Slides 5-8)
C-N:
Factored form (Ch. 8, Slides 15,16)
Factored delta form (Ch. 8, Slides 17,18)
ADI (Ch. 8, Slide 19)
ADI (Ch. 7, Slides 12-14,16,17)
Fractional Step (Ch. 7, Slides 15,18)
10
D. Multi-Step Methods
• better suited for nonlinear problems
(i) Richtmyer/Lax-Wendroff (2-step)
Richtmyer:
• apply equations at i
• O(∆t2, ∆x2)
• conditionally stable;
• see equations in H&C: 6-17, 6-18
Step 1: n → n + ½; use Lax method
Step 2: n + ½ → n + 1; use Leapfrog method
2
x
tcC
11
Lax-Wendroff:
• apply equations at i + ½
• O(∆t2, ∆x2)
• conditionally stable;
• see equations in H&C: 6-19, 6-20
1
x
tcC
(ii) MacCormack Method
• see Ch. 5, Slides 3,4
• O(∆t2, ∆x2)
• conditionally stable;
• see equations in H&C: 6-22, 6-23
1
x
tcC
See Hoffmann & Chiang, p. 191-206 for a computational example
and comparison of methods (linear problem).
12
2. Model Hyperbolic Equation (Nonlinear Case)
x
uu
t
u
(11.10)
x
E
t
u
where E = u2/2or (11.11)
• this are referred to as the “inviscid Burgers equation”
• wave propagates with different velocity at each point
• may eventually form a discontinuity - similar to shock wave formation
from a series of compression waves
13
A. Explicit Schemes
(i) Lax Method
Applying Explicit Euler and central space differencing to (11.11):
)(2
111 n
ini
ni
ni EE
x
tuu
Stability is improved by averaging to give niu
)(2
)(2
11111
1 ni
ni
ni
ni
ni EE
x
tuuu
or, in terms of u,
14
• explicit method
• nonlinear terms appear at level n on RHS; no linearization needed
• O(Δt, Δx2)
• conditionally stable: Courant number =
• O(Δt) implies dissipative errors may occur – initial discontinuity
smeared over several grid points
• see H&C, p. 208, Fig. 6-20
1max
x
tuC
))()((4
)(2
1 2
1
2
111
1 n
i
n
i
n
i
n
i
n
i uux
tuuu
(11.12; HC:6-34)
15
(ii) Lax-Wendroff Method (see Chapter 8)
Expand in Taylor series about , and replace time
derivatives using the PDE.
Note that E = E(u) so, for example,
niu1n
iu
x
EA
x
E
u
E
t
u
u
E
t
E
where Jacobian
u
EA
Since E = u2/2, we get A = u, so the above becomes
x
Eu
t
E
Then, one can show that
x
Eu
xx
EA
xt
u2
2
16
Substituting into the Taylor series gives
)(2
21
tOt
x
EA
xx
E
t
uu ni
ni
↑ like an error term in modified PDE
Central space differencing and some averaging leads to
)(2
111 n
ini
ni
ni EE
x
tuu
)])(())([()(4
)(11112
2ni
ni
ni
ni
ni
ni
ni
ni EEuuEEuu
x
t
(11.13; HC:6-39)
- see H&C for derivation, page 210.
17
• explicit method
• nonlinear terms appear at level n on RHS; no linearization needed
• O(Δt2, Δx2)
• conditionally stable: Courant number =
• O(Δt2) implies dispersion errors may occur – oscillations near
the discontinuity
• see H&C, p. 211-212, Figs. 6-22, 6-23
1max
x
tuC
18
(iii) MacCormack Method
• predictor-corrector or multi-level type scheme
• explicit method; no linearization needed
• O(Δt2, Δx2)
• conditionally stable: Courant number =
• well-behaved; no oscillations and very little smearing when
C = 1, due to the splitting which applies a forward, then a
backward difference for the space derivative
1max
x
tuC
)( 1* n
ini
nii EE
x
tuu
)(2
1 *1
**1iii
ni
ni EE
x
tuuu (11.14; HC:6-40,6-41)
• see H&C, p. 212-213, Figs. 6-24, 6-25
19
(iv) FTBS
Applying Explicit Euler and backward space differencing to (11.11):
)( 11 n
ini
ni
ni EE
x
tuu
(11.15; HC:6-49)
• explicit method
• nonlinear terms appear at level n on RHS; no linearization needed
• O(Δt, Δx)
• conditionally stable: Courant number =
• O(Δt) implies dissipative errors may occur – initial discontinuity
smeared over several grid points; but O(Δx) upwinding introduces
artificial viscosity which may suppress these errors
• see H&C, p. 219, Fig. 6-29
1max
x
tuC
20
(i) Beam and Warming Method
• implicit method; use tridiagonal solver
• FDE is nonlinear; linearized by lagging the Jacobian
• O(Δt2, Δx2)
• unconditionally stable
• O(Δt2) implies dispersion error (very large); add 4th order
damping term (like adding artificial viscosity). Since 4th
order, it doesn’t affect the O(Δx2) accuracy.
• advantages of implicit scheme (stable, larger Δt) is lost due
to dispersion errors (large oscillations)
B. Implicit Schemes
21
4
44
111111 )(44
)(2 x
uxuA
x
tuA
x
tEE
x
tu e
ni
ni
ni
ni
ni
ni
ni
1
1111
1144
ni
ni
ni
ni
ni uA
x
tuuA
x
t
(11.16; HC:6-47,6-48)
• for stability, we must choose 0 < εe ≤ 0.125
• the damping term can be approximated by
)464()( 21124
44 n
ini
ni
ni
niee uuuuu
x
ux
• see H&C, p. 216-218, Figs. 6-26, 6-27, 6-28
22
(ii) BTBS
Applying Implicit Euler and backward space differencing to (11.11):
)( 11
11
n
ini
ni
ni EE
x
tuu
• nonlinear terms appear at level n+1 on RHS
• linearization needed – lag the value of u, i.e., write
1211
2
1)(
2
1 nnnn uuuE
23
• implicit method
• use bidiagonal solver (lower bidiagonal matrix – forward sweep)
• O(Δt, Δx)
• unconditionally stable
• see H&C, p. 220, Fig. 6-30
(11.17; HC:6-51)
This scheme can be expressed in the bidiagonal form
ni
ni
ni
ni
ni uuu
x
tuu
x
t
1111
21
2
24
C. RK Schemes
• popular explicit methods for solving ODEs; easy to program
• uses weighted average of several solutions over time interval
Δt – improves accuracy
• RK2 or 2-stage RK method – 2nd order accurate
• RK4 or 4-stage RK method – 4th order accurate; most commonly
used RK method
• Modified RK methods – reduces storage requirements
• better stability than comparable explicit schemes
• requires significantly more computations per time step
• difficult to estimate errors
• see H&C, p. 219-227.
25
D. Other Schemes
• Flux Corrected Transport
• Total Variation Diminishing (TVD) Schemes
- 1st order TVD – monotone schemes
- 2nd order TVD
- often use “flux limiters”: Harten-Yee upwind limiter,
Roe-Sweby upwind limiter, Davis-Yee symmetric
limiter
• Essentially Non-Oscillatory (ENO) Schemes
• Weighted ENO (WENO) Schemes
• Compact Schemes
• see H&C, p. 233-252.