You are on page 1of 25

CHAPTER 11

Numerical Schemes for Hyperbolic PDEs


1. Model Hyperbolic Equation (Linear Case)

ut cux ;

c0

(11.1)

The space derivative can be approximated by either 1st order one-sided


differencing, or by 2nd order central differencing (see Ch. 9, Slide 2)

1
u x i ( x u ) i
[(1 ) ui 1 2 ui (1 ) ui 1 ]
2x
Note: = 0 central

(11.2)

= 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.
------------------------------------------------------------------------------------------------------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.

A. Explicit Schemes
(i) Explicit Euler (for time march)

uin 1 uin
c

[(1 ) uin1 2 uin (1 ) uin1 ]


t
2x
For = 0 (see FTCS; Ch. 5, Slide 8)

O(t, x2)

unconditionally unstable

Lax Method: average


O(t, x2)

uin 1

u in

in FTCS

conditionally stable; Courant number = C

1-step method

ct
1
x

1
ct
n
n
(ui 1 ui 1 )
(uin1 uin1 )
2
2x

(11.3; HC:6-6)
2

For = 1 (FTBS)

O(t, x)

- relationship for Explicit Euler is = 1 +t

from Ch. 9, Slide 4:

c
2 m
2 m
m 1 cos
i sin

x
M
M

conditionally stable; C

1-step method

uin 1

uin

ct
1
x

ct

(uin uin1 )
x

(11.4; HC:6-4)
3

(ii) = 0, Leapfrog (for time march)

see Ch. 5, Slides 9,10,14-28

O(t2, x2)

conditionally stable;

2-step method

uin1

uin1

ct
C
1
x

ct n

(ui 1 uin1 )
x

(11.5; HC:6-7)

(iii) Lax-Wendroff Method

uin 1

see Ch. 8, Slide 5 (for 2D)

O(t2, x2)

conditionally stable;

1-step method

ct
C
1
x

2
2
c

t
c

t
n
n
n
uin
(uin1 uin1 )
(
u

2
u

u
i 1
i
i 1 )
2
2x
2x

(11.6; HC:6-11)
Note: Before applying central space differencing, the Lax-Wendroff
technique leads to the equation

uin 1

uin

c t
u
c

2
x i
2

x 2

i
2

artificial dissipation

B. Implicit Schemes
(i) Implicit Euler (for time march)

uin 1 uin
c

[(1 ) uin11 2 uin1 (1 ) uin11 ]


t
2x
For = 0 (see BTCS; Ch. 6, Slide 1)

O(t, x2)

unconditionally stable

1-step method, using tridiagonal solver

uin 1

uin

ct

(uin11 uin11 )
2x

(11.7; HC:6-12)
6

For = 1 (BTBS)

O(t, x)

- relationship for Implicit Euler is = (1 t)-1

from Ch. 9, Slide 4:

c
2 m
2 m
m 1 cos
i sin

x
M
M

unconditionally stable

1-step method, using tridiagonal solver

uin 1

uin

ct

(uin 1 uin11 )
x

(11.8; HC:6-13)

(ii) Crank-Nicolson, with = 0

uin 1

see Ch. 6, Slide 2

O(t2, x2)

unconditionally stable

1-step method, using tridiagonal solver

uin

ct

(uin11 uin11 uin1 uin1 )


4x
(11.9; HC:6-15)

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)

D. Multi-Step Methods

better suited for nonlinear problems

(i) Richtmyer/Lax-Wendroff (2-step)


Step 1: n n + ; use Lax method

Step 2: n + n + 1; use Leapfrog method


Richtmyer:
apply equations at i

O(t2, x2)
conditionally stable;

ct
C
2
x

see equations in H&C: 6-17, 6-18


10

Lax-Wendroff:
apply equations at i +

O(t2, x2)

ct
conditionally stable; C
1
x
see equations in H&C: 6-19, 6-20
(ii) MacCormack Method

see Ch. 5, Slides 3,4

O(t2, x2)

conditionally stable;

see equations in H&C: 6-22, 6-23

ct
C
1
x

See Hoffmann & Chiang, p. 191-206 for a computational example

and comparison of methods (linear problem).

11

2. Model Hyperbolic Equation (Nonlinear Case)

u
u
u
t
x
or

u
E

t
x

(11.10)

where E = u2/2

(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
12

A. Explicit Schemes

(i) Lax Method


Applying Explicit Euler and central space differencing to (11.11):

uin 1

uin

( Ein1 Ein1 )
2x

Stability is improved by averaging

uin1

u in

to give

1 n
t
n
(ui 1 ui 1 )
( Ein1 Ein1 )
2
2x

or, in terms of u,

13

n 1
i

1 n
t
n
(ui 1 ui 1 )
((uin1 ) 2 (uin1 ) 2 )
2
4x
(11.12; HC:6-34)

explicit method
nonlinear terms appear at level n on RHS; no linearization needed
O(t, x2)
conditionally stable: Courant number =

C umax

t
1
x

O(t) implies dissipative errors may occur initial discontinuity

smeared over several grid points


see H&C, p. 208, Fig. 6-20

14

(ii) Lax-Wendroff Method (see Chapter 8)

Expand

uin 1 in Taylor series about uin , and replace time

derivatives using the PDE.


Note that E = E(u) so, for example,

E E u
E E
E

A
t u t
u x
x

E
where A
Jacobian
u

Since E = u2/2, we get A = u, so the above becomes

E
E
u
t
x
Then, one can show that

2u E E
A u

2
x x x x
t

15

Substituting into the Taylor series gives


n 1
ui

n
ui

E E t

A O(t 2 )
x x x 2
like an error term in modified PDE

Central space differencing and some averaging leads to

uin1

uin

( Ein1 Ein1 )
2x

(t ) 2
n
n
n
n
n
n
n
n

[(
u

u
)(
E

E
)

(
u

u
)(
E

E
i 1
i
i 1
i
i
i 1
i
i 1 )]
2
4(x)
(11.13; HC:6-39)
- see H&C for derivation, page 210.
16

explicit method
nonlinear terms appear at level n on RHS; no linearization needed
O(t2, x2)
conditionally stable: Courant number =

C umax

t
1
x

O(t2) implies dispersion errors may occur oscillations near


the discontinuity

see H&C, p. 211-212, Figs. 6-22, 6-23

17

(iii) MacCormack Method


predictor-corrector or multi-level type scheme
explicit method; no linearization needed
O(t2, x2)

conditionally stable: Courant number = C u max

t
1
x

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

t n

( Ei 1 Ein )
x
1 n
t *

n 1
*
ui ui ui
( Ei Ei*1 )
2
x

ui*

uin

see H&C, p. 212-213, Figs. 6-24, 6-25

(11.14; HC:6-40,6-41)
18

(iv) FTBS

Applying Explicit Euler and backward space differencing to (11.11):

uin 1

uin

( Ein Ein1 )
x

(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 =

C umax

t
1
x

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

19

B. Implicit Schemes
(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 doesnt affect the O(x2) accuracy.
advantages of implicit scheme (stable, larger t) is lost due
to dispersion errors (large oscillations)

20

t
t
n
n 1
n 1

Ai 1ui 1 ui
Ain1uin11
4x
4x
4

u
n
n
n
n
n
n
n
4
ui
( Ei 1 Ei 1 )
Ai 1ui 1
Ai 1ui 1 e (x)
2x
4x
4x
x 4
(11.16; HC:6-47,6-48)
for stability, we must choose 0 < e 0.125
the damping term can be approximated by
4

u
4
n
n
n
n
n
e (x)

(
u

4
u

6
u

4
u

u
e
i2
i 1
i
i 1
i 2 )
4
x

see H&C, p. 216-218, Figs. 6-26, 6-27, 6-28


21

(ii) BTBS
Applying Implicit Euler and backward space differencing to (11.11):

uin 1

uin

( Ein 1 Ein11 )
x

nonlinear terms appear at level n+1 on RHS


linearization needed lag the value of u, i.e., write

n 1

1
1 n n 1
n 1 2
(u ) u u
2
2

22

This scheme can be expressed in the bidiagonal form

t n n 1
t n n 1
ui 1 ui 1 1
ui ui uin

2x

2x

(11.17; HC:6-51)

implicit method
use bidiagonal solver (lower bidiagonal matrix forward sweep)
O(t, x)
unconditionally stable

see H&C, p. 220, Fig. 6-30


23

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.

24

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.

25

You might also like