Professional Documents
Culture Documents
These properties must be verified for each (component of the) numerical scheme
Consistency
Truncation errors should vanish as the mesh size and time step tend to zero
∂u
Example. Pure convection equation ∂t + v ∂u
∂x = 0 discretized by
un+1 −un un n
i+1 −ui−1
n
∂u
Hence, i
∆t
i
+ v 2∆x + v ∂u
− ∂x i + ǫτ = 0
∂t where
n n
∆t ∂ 2 u (∆x)2 ∂ 3 u
ǫτ = − 2
−v 3
+ O[(∆t)2 , (∆x)4 ]
2 ∂t i 6 ∂x i
residual of the difference scheme for the exact nodal values um
j = u(j∆x, m∆t)
Stability
Stability analysis: can only be performed for a very limited range problems
i.e., the error evolves in the same way as the solution and is bounded by
||e|| ≤ ||C||n ||e0 ||, ||C|| ≥ ρ(C) = maxi |λi | spectral radius of C
Unstable schemes: if ρ(C) > 1 then ||C|| ≥ 1 and the errors may grow
2
∂u
Example. Convection-diffusion equation ∂t + v ∂u
∂x = d ∂ u
∂x2 discretized by
un+1 −un un n
i+1 −ui−1 un n n
i−1 −2ui +ui+1
CDS in space, FE in time: i
∆t
i
+ v 2∆x = d (∆x)2
ν n
or un+1
i = uni − (ui+1 − uni−1 ) + δ(uni−1 − 2uni + uni+1 )
2
∆t ∆t
where ν = v ∆x is the Courant number, δ = d (∆x) 2 is the diffusion number
Matrix method for stability analysis
· · · a=δ+ ν high frequen
ies low frequen
ies
a b c 2
C=
a b c
b = 1 − 2δ
a b c ν m=N m=0
· · · c=δ− 2 0
(m) π
Eigenvectors ϕj = cos θm j + i sin θm j = eiθm j , θm = m N , i2 = −1
lmin = 2∆x
L π mπ π
Discretization ∆x = N ⇒ km = m L = N ∆x , θm = km ∆x = m N
Here θm is the phase angle, m is the number of waves fitted into the interval
(−L, L) and ∆x determines the highest frequency resolvable on the mesh
Von Neumann’s stability analysis
Due to linearity, the error satisfies the discretized equation and so does each
harmonic. Hence, it suffices to check stability for enj = anm eiθm j , ∀m
an+1 |Gm | ≤ 1, ∀m
Gm = mn = λm
am
the enhancement of the m−th guarantees that the error component
harmonic during one time step enj = (Gm )n e0j remains bounded
un+1
j − unj unj+1 − unj−1
+v =0 and substitute enj = an eiθj
∆t 2∆x
an+1
Amplification factor G= an = 1 − iν sin θ is responsible for stability
un+1
j − unj unj − unj−1
+v =0 and substitute enj = an eiθj
∆t ∆x
∆t
which yields (an+1 − an )eiθj + νan (eiθj − eiθ(j−1) ) = 0, ν = v ∆x
n+1 00000000000
11111111111
t 11111111111
00000000000
• on the other hand, for ν < 1 some grid points in- 00000000000
11111111111
00000000000
11111111111
00000000000
11111111111
00000000000
11111111111
00000000000
11111111111
00000000000
11111111111
00000000000
11111111111
00000000000
11111111111
fluence the solution although they should not 00000000000
11111111111
00000000000
11111111111
00000000000
11111111111
00000000000
11111111111
00000000000
11111111111
n 00000000000
11111111111
t x
xi 1 xi xi+1
• for accuracy reasons it is desirable to have ν ≈ 1; v t v t
x x
some schemes are exact for ν = 1 (unit CFL property)
∂u
3. Let ∂t + v ∂u
∂x = 0 be discretized by CDS in space, BE in time
un+1
j − unj un+1 n+1
j+1 − uj−1
+v =0 and substitute enj = an eiθj
∆t 2∆x
1
It follows that |G|2 = G · Ḡ = 1+ν 2sin2 θ
≤1 unconditional stability
Spectral analysis of numerical errors
2
∂u
Consider ∂t + v ∂u ∂ u
∂x = d ∂x2 convection-diffusion equation
2 2
Exact solution: u(x, t) = eik(x−vt)−k dt
= a(t)eikx , a(t) = e−ikvt−k dt
2
a(tn+1 ) e−(ikv+k d)(n+1)∆t
Amplification factor Gex = a(tn ) = e−(ikv+k2 d)n∆t
= e−(δ+iω)
1 1
low-order →
0.8 0.8
0.6 0.6
0.4 0.4
0.2 0.2
0
← high-order 0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Idea: make sure that important properties of the exact solution (monotonicity,
positivity, nonincreasing total variation) are inherited by the numerical one
Design of nonoscillatory methods
∂f
Monotone methods ∂u
∂t + ∂x =0 → un+1
i = H(un ; i) such that
∂H(un ; i)
≥ 0, ∀i, j Then vin ≥ uni , ∀i ⇒ vin+1 ≥ un+1
i , ∀i
∂unj
∂u
Example. Let ∂t + v ∂u
∂x = 0 be discretized by UDS in space, FE in time
r+|r|
1D stencil
Standard flux limiters: Φ(r) = 1+|r| Van Leer ui
1+r
Φ(r) = max{0, min 2 , 2, 2r } MC
Φ(r) = max{0, min{1, 2r}, min{2, r}} superbee
x i−1 xi x i+1