You are on page 1of 23

Analysis of numerical dissipation and dispersion

Modified equation method: the exact solution of the discretized equations


satisfies a PDE which is generally different from the one to be solved
Original PDE
u
+ Lu = 0
t

Modified equation

Aun+1 = Bun

X
u
2p+1 u
2p u X
+ Lu =
2p+1 2p+1
2p 2p +
t
x
x
p=1
p=1

Motivation: PDEs are difficult or impossible to solve analytically but their


qualitative behavior is easier to predict than that of discretized equations
Expand all nodal values in the difference scheme in a double Taylor series
about a single point (xi , tn ) of the space-time mesh to obtain a PDE
Express high-order time derivatives as well as mixed derivatives in terms
of space derivatives using this PDE to transform it into the desired form

Derivation of the modified equation


Example. Pure convection equation

u
t

+ v u
x = 0,

v>0

uni uni1
un+1
uni
i
+v
= 0 (upwind)
t
x

BDS in space, FE in time:

Taylor series expansions about the point (xi , tn )


un+1
i
uni1

uni

uni

+ t
x


u n
t i


u n
x i

(t)2
2

(x)2
2

2u
t2

n

2u
x2

i
n
i

(t)3
6

(x)3
6

3u
t3

n
i

3u
x3

+ ...

n
i

+ ...

Substitution into the difference scheme yields



 3 n

 3 n
n
n


(t)2
v(x)2
vx 2 u
t 2 u
u n
u
u
u n
6
+ 2
6
+...
t i + v x i = 2
t2
t3
x2
x3
i

original PDE

O[t, x]

truncation error

Next step: replace both time derivatives in the RHS by space derivatives

()

Derivation of the modified equation


Differentiate () with respect to t
2u
t2

u
u
+ v xt
= t
2 t3

(t)2 4 u
6
t4

vx 3 u
2 x2 t

v(x)2 4 u
6
x3 t

+ ...

(1)

Differentiate () with respect to x and multiply by v


2

u
u
+ v 2 xu2 = vt
v tx
2 t2 x

v(t)2 4 u
6
t3 x

v 2 x 3 u
2 x3

v 2 (x)2 4 u
6
x4

+ ...

Subtract (2) from (1) and drop high-order terms


h 3
h 3
i
i
2
3
3

u
t
2u

u
x

u
2
v x2 t v 2 x3 + O(x)
t2 = v x2 + 2 t3 + v t2 x + O(t) + 2
Differentiate formula (3) with respect to t

3u
t3

Differentiate formula (2) with respect to x

3u
x2 t

= v xu3 + O[t, x]

Differentiate formula (3) with respect to x

3u
t2 x

= v 2 xu3 + O[t, x]

u
= v 2 x
2 t + O[t, x]
3

(2)

(3)
(4)
(5)
(6)

Derivation of the modified equation


Equations (4) and (5) imply that
Plug (5)(7) into (3)

2u
t2

3u
t3
2

= v 3 xu3 + O[t, x]
3

= v 2 xu2 + v 2 (vt x) xu3 + O[t, x]

(7)
(8)

Substitute (7) and (8) into () to obtain the modified equation


h
i
v 3 (t)2 3 u
v(x)2 3 u
u
v 2 t 2 u
3u
vx 2 u
u
+
+
v
=

+
(vt

x)
+

t
x
2
x2
x3
6
x3
2 x2
6
x3 + . . .
t
which can be rewritten in terms of the Courant number = v x
as follows

u
vx
2 u v(x)2
3u
u
2
+v
=
(1 ) 2 +
(3 2 1) 3 + . . .
t
x | 2
x
6
x }
{z
} |
{z
numerical diffusion

numerical dispersion

Remark. The CFL stability condition 1 must be satisfied for the discrete
problem to be well-posed. In the case > 1, the numerical diffusion coefficient
vx
2 (1 ) is negative, which corresponds to a backward heat equation

Significance of terms in the modified equation


Exact solution of the discretized equations
Au

n+1

= Bu

X
2p u X
2p+1 u
u
+ Lu =
2p 2p +
2p+1 2p+1
t
x
x
p=1
p=1

2p

2p+1

Even-order derivatives x2pu


cause numerical dissipation

Odd-order derivatives x2p+1u


cause numerical dispersion

0.8

0.8

u
t

0.6

0.4

+ v u
x = 0

0.6

0.4

0.2

0.2

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

smearing (amplitude errors)

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

wiggles (phase errors)

Qualitative analysis: the numerical behavior of the discretization scheme largely


depends on the relative importance of dispersive and dissipative effects

Stabilization by means of artificial diffusion


Stability condition

(necessary but not sufficient)

The coefficients of the even-order derivatives in the modified equation must


have alternating signs, the one for the second-order term being positive
If this condition is violated, it can be enforced by adding artificial diffusion:
Stabilized methods

+(v )2 u

streamline diffusion

Nonoscillatory methods

+(v )2 u + (u)u

shock-capturing viscosity

Remark. In the one-dimensional case both terms are proportional to


Free parameters

c h
1+|v| ,

(u) = c h2 R(u)

2u
x2

where h is the mesh size


and R(u) is the residual

Problem: how to determine proper values of the constants c and c ???


Alternative: use a high-order time-stepping method or flux/slope limiters

Lax-Wendroff time-stepping
Consider a time-dependent PDE

u
t

+ Lu = 0

in (0, T )

1. Discretize it in time by means of the Taylor series expansion


 n
 2 n
2
u
u
(t)
+ O(t)3
un+1 = un + t
+
2
t
2
t
2. Transform time derivatives into space derivatives using the PDE
 
u

u
2u
u
2
=
=
= Lu,
(Lu)
=
L
=
L
u
t
t2
t t
t
t
3. Substitute the resulting expressions into the Taylor series
u

n+1

(t)2 2 n
= u tLu +
L u + O(t)3
2
n

4. Perform space discretization using finite differences/volumes/elements

Lax-Wendroff scheme for pure convection


Example. Pure convection equation
Time derivatives
Semi-discrete scheme

L = v x

u
t
u
t

+ v u
x = 0
= v u
x ,

un+1 = un vt


u n
x

Central difference approximation in space


 2 

ui+1 ui1
u
u
2
=
+ O(x) ,
x i =
2x
x2
i

Fully discrete scheme

(1D case)
2u
t2
(vt)2
2

= v 2 xu2


u
x2

ui+1 2ui +ui1


(x)2

n

+ O(t)3

+ O(x)2

(second order in space and time)

uni+1 uni1
un+1
uni
v 2 t uni+1 2uni + uni1
2
2
i
+
O[(t)
,
(x)
]
+v
=
t
2x
2
(x)2
Remark. LW/CDS is equivalent to FE/CDS stabilized by numerical dissipation
due to the second-order term in the Taylor series (no adjustable parameter)

Forward Euler vs. Lax-Wendroff (CDS)


Modified equation for the FE/CDS scheme
u
t

vx u
+ v u
x = 2 x2

v(x)2
(1
6

+ 2 2 ) xu3 + . . .

where

t
= v x

v t
unconditionally unstable since the coefficient vx
is negative
2 = 2

Modified equation for the LW/CDS scheme


u
u
t +v x

2
4 u
= v(x)
(1 2 ) xu3 v(x)
(1 2 ) xu4 v(x)
6
8
120 (1+5 6 ) x5 +. . .

conditionally stable for 2 1 in 1D, 2

1
8

in 2D, 2

1
27

in 3D

the second-order derivative (leading dissipation error) has been eliminated


the negative dispersion coefficient corresponds to a lagging phase error i. e.
harmonics travel too slow, spurious oscillations occur behind steep fronts
the leading truncation error vanishes for 2 = 1 (unit CFL property)

Forward Euler vs. Lax-Wendroff (FEM)


Galerkin FEM

u
t i

un+1
un
i
M t i ,

where

Mui =

ui+1 +4ui +ui1


6

where

t
= v x

Modified equation for the FE/FEM scheme


u
t

vx u
+ v u
x = 2 x2

v(x)2 2 3 u
x3
3

+ ...

unconditionally unstable since the numerical diffusion coefficient is negative


the leading dispersion error due to space discretization has been eliminated
Modified equation for the LW/FEM scheme
u
t

+ v u
x =

v(x)2 2 3 u
x3
6

v(x)
15 2
2 u
4 u
v(x)
+
(1

3
)
4
24
x
180 (1 2 + 9 ) x5 + . . .

conditionally stable for 2

1
3

in 1D, 2

1
24

in 2D, 2

1
81

in 3D

the positive dispersion coefficient corresponds to a leading phase error i. e.


harmonics travel too fast, spurious oscillations occur ahead of steep fronts
the truncation error does not vanish for 2 = 1 (no unit CFL property)

Lax-Wendroff FEM in multidimensions


Pure convection equation
Boundary conditions
Time derivatives
2u
t2

= (v )2 u

Semi-discrete scheme

u
t

u=g
L=v

+ v u = 0 in (0, T )
on in = {x : v n < 0}

u
t

= v u

v = v(x)
inflow boundary

streamline derivative

streamline diffusion (second derivative in the flow direction)


un+1 = un t v un +

(t)2
2 (v

)2 un + O(t)3

Weak formulation for the Galerkin method


Z
Z
2 Z
(t)
w(un+1 un ) dx = t
w v un dx +
w(v )2 un dx
2

Integration by parts using the identity (ab) = a b + b a yields


R
R
R
wv

u
dx
=

(wv)
v

u
dx
+
wv n v u ds

out
R
R
R
= v w v u dx w v v u dx + out wv n v u ds

Taylor-Galerkin methods
Donea (1984) introduced a family of high-order time-stepping schemes which
stabilize the convective terms by means of intrinsic streamline diffusion
Convection-dominated PDE

u
t

+ Lu = 0

in (0, T )

Taylor series expansion up to the third order


 n
 2 n
 3 n
3
2
u

u
u
(t)
(t)
un+1 = un + t
+
+ O(t)4
+
2
3
t
2
t
6
t


u
2u

u
2
Time derivatives u
=
Lu,
=
t
t2
t t = t (Lu) = L t = L u
3u
t3

2u
= L2 u
=
L
t

Substitution

n+1

n+1

un
t

+ O(t)

to avoid third-order space derivatives

(t)2 2 n (t)2 2 n+1 n


= u tLu +
L u +
L (u
u )+O(t)4
2
6
n

Remark. The Lax-Wendroff scheme is recovered for un+1 = un (steady state)

Euler Taylor-Galerkin scheme


Semi-discrete FE/TG scheme

(t)2 2
6 L

un+1 un
t

= Lun +

t 2 n
2 L u

Space discretization: Galerkin FEM (finite differences/volumes also feasible)


The third-order term results in a modification of the consistent mass matrix
Example. Pure convection in 1D

u
t

+ v u
x = 0,

Modified equation for the FE/TG scheme

L = v x

(Galerkin FEM, linear elements)

4
5
u
v(x)3
v(x)4
u
2 u
2
4 u
+v
=
(1 ) 4 +
(1 5 + 4 ) 5 + . . .
t
x
24
x
180
x

conditionally stable for 2 1 in 1D, 2

1
8

in 2D, 2

1
27

in 3D

the leading dispersion error is of higher order than that for LW/FEM
the leading truncation error vanishes for 2 = 1 (unit CFL property)

Leapfrog Taylor-Galerkin scheme


Taylor series

It follows that

n1

Time derivatives

= u t

n+1
u
t

n1


u n
t

= 2t
3u
t3

= Lu,

Semi-discrete LF/TG scheme

(t)2
2


u n
t

(t)3
3

(t)2 2
6 L

LF/CDS

u
t

v(x)
+ v u
=

(1 2 ) xu3 +
x
6

LF/FEM

u
t

+ v u
x =

LF/TG

u
t

v u
x

n


2u
= L2 u
t = L

Modified equations for leapfrog schemes with

v(x)2 2 3 u
x3
6
v(x)4
360 (2

2u
t2

(t)3
6

3u
t3

n+1

n

3u
t3

n

+ O(t)4

+ O(t)4

un
t

un+1 un1
2t

+ O(t)
= Lun

L = v x
v(x)4
120 (1

v(x)4
360 (2

10 2 + 9 4 ) xu5 + . . .
5

27 4 ) xu5 + . . .

+ 5 2 7 4 ) xu5 + . . .

fourth-order accurate, non-dissipative and conditionally stable for 2 1


the truncation error shrinks as compared to that for 2nd-order LF schemes
the unit CFL property is satisfied for phase angles in the range 0

Crank-Nicolson Taylor-Galerkin scheme


Taylor series expansions up to the fourth order
 2 n
 3 n

(t)2
(t)3
u n
u
u
n+1
n
u
= u + t t + 2
+ 6
+ O(t)4
t2
t3
n

u =u

n+1


u n+1
t

n+1

(t)2
2

t
2

2u
t2


u n
t

It follows that u
=u +

n  2 n+1 
2
2
u
+ (t)
+
t2u
4
t2

(t)
12

n+1

(t)3
6


u n+1
t

+


u
t3

n

i
+

n+1

+ O(t)4

n+1 

+ O(t)4

3u
t3

u
t3


u

2u

u
2
Time derivatives u
=
Lu,
=
t
t2
t t = t (Lu) = L t = L u
i
h
 3 n  3 n+1


u n+1
u n
u
u
2 un+1 un
2
+
=
2L
+ O(t)
+
=
L
t3
t3
t
t
t
Fourth-order accurate Crank-Nicolson time-stepping
u

n+1

=u

t
n
2 L(u

+u

n+1

)+

(t)2 2 n
4 L (u

n+1

)+

(t)2 2 n+1
6 L (u

un )

Crank-Nicolson Taylor-Galerkin scheme


h

Semi-discrete CN/TG scheme

I+

t
2 L

(t)2 2
12 L

un+1 un
t

= Lun

Modified equations for Crank-Nicolson schemes with L = v x



 3
v(x)4
v(x)2
2
u
u
3 4 5u
u
2
1
+
+
+
v
=

(1
+
5
+
CN/CDS
t
x
6
2
x3
120
2 ) x5 + . . .
2

CN/FEM

u
t

v(x)
2 u
+ v u
x = 12 x3 + . . .

CN/TG

u
t

+ v u
x =

v(x)4
720 (4

5 2 + 4 ) xu5 + . . .

fourth-order accurate, non-dissipative and unconditionally stable


cannot be operated at 2 > 1 since the matrix becomes singular
the phase response is far superior to that for 2nd-order CN schemes
the leading truncation error vanishes for 2 = 1 (unit CFL property)
Remark. Both LF/TG and CN/TG degenerate into the unstable Galerkin
discretization if the solution reaches a steady state so that un+1 = un

Multistep Taylor-Galerkin schemes


Fractional step algorithms of predictor-corrector type lend themselves to the
treatment of (nonlinear) problems described by PDEs of complex structure
Purpose: to avoid a repeated application of spatial differential operators to
the governing equation and/or enhance the accuracy of time discretization
Taylor series

Factorization

n+1

I+

Richtmyer scheme

= u + t

t t

(t)2 2
2 t2

(t)2
2

=I+

2u
t2

t t

n


I+

+ O(t)3
t
2 t

(two-step Lax-Wendroff method)

un+1/2 = un +
n+1


u n
t

t
2

= u + t

u n
t

u n+1/2
t

un+1/2 = un

t
n
2 Lu

un+1 = un tLun+1/2

second-order RK method (forward Euler predictor + midpoint rule corrector)


stability and phase characteristics as for the single-step Lax-Wendroff scheme

Multistep Taylor-Galerkin schemes


Taylor series
Factorization

n+1

= u + t

t t

(t)2 2
2 t2

+


= I + t t I +
I+


u n
t

t
2 t

Three-step Taylor-Galerkin method



u n
t

u n+1/3
un+1/2 = un + t
2
t

u n+1/2
n+1
n
u
= u + t t
un+1/3 = un +

(t)2
2

(t)3 3
6 t3

2u
t2

n

(t)3
6

t t

3u
t3

n

+ O(t)4

t
2 t

(t)2 2
6 t2

I+
=I+
+

t
I + 3 t
no high-order derivatives

(Jiang and Kawahara, 1993)

t
3

un+1/3 = un

t
n
3 Lu

un+1/2 = un

t
n+1/3
2 Lu

un+1 = un tLun+1/2

third-order time-stepping method, conditionally stable for 2 1 (optimal)


no improvement in phase accuracy as compared to the two-step TG algorithm
lagging phase error at intermediate and short wavelengths, unit CFL property

High-order Taylor-Galerkin schemes


Multistep TG methods involving second time derivatives offer high accuracy
and an isotropic stability domain for nonlinear multidimensional problems
Two-step third-order TG scheme

(Selmin, 1987)

n

t u n
2 2u
n+1/2
n
u
= u + 3 t + (t) t2
 2 n+1/2

2
n
(t)
u
u
un+1 = un + t t + 2
t2

predictor
corrector

is chosen so as to obtain the desired stability/accuracy characteristics


excellent phase response of the FE/TG method is reproduced for =
stable for 2

3
4

1
9

in 1D/2D/3D (no loss of stability in multidimensions)

Underlying factorization vs. Taylor series expansion

I + t t

(t)2 2
2
t2

I+

t
3 t

2
(t)2 t
2

+ (t)
= I + t t
2

2
t2

+ (t)
6

3
t3

+ (t)
2

Remark. A fourth-order accurate time-stepping method is recovered for =

1
12

4
t4

Two-step fourth-order TG schemes


TTG-4A scheme

(Selmin and Quartapelle, 1993)

un+1/2 = un

t
n
3 Lu

(t)2 2 n
12 L u

predictor

(t)2 2 n+1/2
2 L u

corrector

un+1 = un tLun +

fourth-order accurate in time, isotropic stability condition 2 1


poor phase response at intermediate and short wavelengths as || 1
TTG-4B scheme

0.1409714,

0.1160538,

0.3590284

un+1/2 = un tLun + (t)2 L2 un

predictor

un+1 = un tLun+1/2 + (t)2 L2 un+1/2

corrector

fourth-order accurate in time, isotropic stability condition 2 0.718


excellent phase response in the whole range of Courant numbers

Semi-implicit Taylor-Galerkin schemes


Problem: fully explicit schemes are doomed to be conditionally stable
Semi-implicit Lax-Wendroff method
u

n+1

(Hassan et al., 1989)

(t)2 2 n+1
= u tLu +
L u
+ O(t)3
2
n

unconditionally stable

High-order multistep TG schemes


(Safjan and Oden, 1993)
i1
X
2 2 n+i
n
[I (t) L ]u
=u +
[ij tL + ij (t)2 L2 ]un+j ,

i = 1, . . . , s

j=0

Here 0 = 0 . . . s = 1, the free parameter is to be chosen from stability


considerations and the coefficients i , ij , ij must satisfy the order conditions

i0 , i = 1
s
i = 1, . . . , s
P
k1
k2
k
[ij j + ij (k 1)j ] =
i k
2i0 , i = 2

j=1
k = 1, . . . , p

0,
otherwise

for an s-step scheme to be of pth order (p = 2s is the highest possible accuracy)

Pad
e approximations
Taylor series expansion
(Donea et al., 1998)




3
2
2
3

(t)

(t)

un+1 = 1 + t +
un
+
+ . . . un = exp t
2
3
t
2 t
6 t
t

of order p = m + n to the exponential of x = t t

Pade approximations
Rn,m (x) :=

Pn (x)
exp(x)
Qm (x)

Example. R2,0 = 1 + x +
u

n+1

= 1+x 1+

where

x
2



x2
2

multistage Taylor-Galerkin methods

(second order)
n

u = u + t

un+1/2 = un +

t
2


u n
t


u n+1/2
t

R2,0 Richtmyer scheme


R3,0 Jiang-Kawahara
R1,1 Crank-Nicolson
R2,2 CNTG scheme

Pad
e approximations
m, n

1+x

1 + x + 21 x2

1 + x + 12 x2 + 61 x3

1
1x

1+ 21 x
1 12 x

1+ 32 x+ 16 x2
1 13 x

1 3
1+ 43 x+ 14 x2 + 24
x
1
1 4 x

1
1x+ 12 x2

1+ 31 x
1 23 x+ 16 x2

1 2
1+ 21 x+ 12
x
1
1 2
1 2 x+ 12 x

3 2
1 3
1+ 53 x+ 20
x + 60
x
2
1 2
1 5 x+ 20 x

1
1x+ 12 x2 61 x3

1+ 41 x
1 3
1 34 x+ 14 x2 24
x

1 2
1+ 32 x+ 20
x
3
3 2
1 3
1 5 x+ 20 x + 60
x

1 2
1
1+ 21 x+ 10
x + 120
x3
1 2
1
1 21 x+ 10
x 120
x3

m=0

explicit TG schemes,

m>0

implicit TG schemes

You might also like