Professional Documents
Culture Documents
Lecture9 PDF
Lecture9 PDF
2. Stability
3. Convergence
4. Conservation
5. Boundedness
These properties must be verified for each (component of the) numerical scheme
Consistency
Relationship:
discretized equation
differential equation
Truncation errors should vanish as the mesh size and time step tend to zero
Example. Pure convection equation
u
t
+ v u
x = 0 discretized by
uni+1 uni1
un+1
uni
i
+v
= O[(t)q , (x)p ]
CDS in space, FE in time:
t
2x
2 n
(t)2
n+1
u
u n
n
+ ...
Taylor series expansions: ui
= ui + t t i + 2
t2
i
2 n
3 n
3
2
n
(x)
(x)
u
u
u
uni1 = uni x x i + 2
+ ...
2
x
6
x3
i
Hence,
un+1
un
i
i
t
n
un
i+1 ui1
v 2x
n
+ v u
where
x i + = 0
n
n
(x)2 3 u
t 2 u
v
+ O[(t)2 , (x)4 ]
=
2
3
2
t i
6
x i
+
u
t
Stability
numerical solution of
discretized equations
Relationship:
exact solution of
discretized equations
Definition 1
Definition 2
Stability analysis: can only be performed for a very limited range problems
Matrix method:
Aun+1 = Bun
u
n+1 = C u
n
en+1 = Cen
un+1 = Cun = . . . = C n u0 ,
en+1 = Cen = . . . = C n e0
i.e., the error evolves in the same way as the solution and is bounded by
||e|| ||C||n ||e0 ||,
spectral radius of C
Unstable schemes: if (C) > 1 then ||C|| 1 and the errors may grow
Example. Convection-diffusion equation
CDS in space, FE in time:
or
un+1
= uni
i
un+1
un
i
i
t
u
t
u
+ v u
=
d
x
x2 discretized by
n
un
i+1 ui1
v 2x
n
n
un
i1 2ui +ui+1
d
(x)2
n
(ui+1 uni1 ) + (uni1 2uni + uni+1 )
2
t
t
where = v x
is the Courant number, = d (x)
2 is the diffusion number
a b c
C=
a b c
a b c
Eigenvectors
Eigenvalues
(m)
a=+
b = 1 2
c=
m=N
(m)
(m)
(m)
(m)
+ cj1 = m j
m = 1 + 2(cos m 1) + i2 sin m ,
,
m = m N
i2 = 1
(m)
divide by j
= eim j
m = 1, . . . , N
Stability condition
pure convection:
m=0
aj+1 + bj
=0
pure diffusion: = 0
|m | 1
|m | 1 if
1
2
conditionally stable
i2 = 1,
lmax = 2L
lmin = 2x
x =
L
N
km = m L
=
0
x0
m
N x ,
L
xi1 xi xi+1
xN
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
Due to linearity, the error satisfies the discretized equation and so does each
harmonic. Hence, it suffices to check stability for enj = anm eim j , m
Amplification factor
Gm
an+1
= mn = m
am
Stability condition
|Gm | 1,
u
t
+ v u
x = 0 be discretized by CDS in space, FE in time
un+1
unj
unj+1 unj1
j
+v
=0
t
2x
n i(j+1)
a (e
ei(j1) ) = 0,
2
an+1 = an 2 an (ei ei )
=v
t
x
G=
|G|2 = 1 + 2 sin2 1
an+1
an
= 1 i sin
u
t
+ v u
x = 0 be discretized by BDS in space, FE in time
un+1
unj
unj unj1
j
+v
=0
t
x
which yields
Im(G) = sin
01
x
v
v>0
v<0
i sin
Im(G)
region of
instability
1
region of
stability
Re(G)
dx
dt
n+1
u
t
dx
dt
=v
00000000000
11111111111
11111111111
00000000000
00000000000
11111111111
00000000000
11111111111
00000000000
11111111111
00000000000
11111111111
00000000000
11111111111
00000000000
11111111111
00000000000
11111111111
00000000000
11111111111
00000000000
11111111111
00000000000
11111111111
00000000000
11111111111
00000000000
11111111111
00000000000
11111111111
00000000000
11111111111
n
xi
t
x
xi
v
t
x
xi+1
+ v u
x = 0 be discretized by CDS in space, BE in time
n+1
un+1
unj
un+1
j
j+1 uj1
+v
=0
t
2x
=
|G|2 = G G
1
sin2
1+ 2
G=
1
1+i sin
unconditional stability
u
t
u
+ v u
x = d x2
Exact solution:
convection-diffusion equation
u(x, t) = eik(xvt)k
dt
= a(t)eikx ,
a(t) = eikvtk
dt
Gex =
a(tn+1 )
a(tn )
= k 2 dt,
=
|Gnum |
|Gex |
e(ikv+k d)(n+1)t
e(ikv+k2 d)nt
= e(+i)
= kvt = arg(Gex )
= |Gnum |e
numerical damping
arg(Gnum )
arg(G )
=
= vv numerical dispersion
= arg(Gnum
ex )
arg(Gnum )
where v = kt
is the numerical propagation speed
Phase error
Convergence
Relationship:
numerical solution of
discretized equations
p
p
p p
log 2
u4h u2h e(u)h (1 2 )2
Conservation
Physical principles should apply at the discrete level: if mass, momentum
and energy are conserved, they can only be distributed improperly
Integral form of a generic conservation law
Z
Z
Z
u dV +
f n dS =
q dV,
f = vu du
t V
S
V
accumulation
influx source/sink
flux function
Discrete conservation
1. Any finite volume scheme is conservative by construction both locally
(for every single control volume) and globally (for the whole domain)
2. A finite difference scheme is conservative if it can be written in the form
fi+1/2 fi1/2
un+1
uni
i
+
=q
t
x
which is equivalent to a vertex-centered finite volume discretization
3. Any finite element scheme is conservative, at least globally
Z
N
X
uh
i 1,
i
+ fh qh dV = 0, i = 1, . . . , N
t
V
i=1
Summation over i yields a discrete counterpart of the integral conservation law
R uh
V
+ fh qh dV = 0
uh dV +
f n dS =
S h
qh dV
Boundedness
Convection-dominated / hyperbolic PDEs
P e 1,
Re 1
low-order
0.8
0.8
0.6
0.6
0.4
0.4
0.2
0.2
high-order
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
Idea: make sure that important properties of the exact solution (monotonicity,
positivity, nonincreasing total variation) are inherited by the numerical one
Monotone methods
H(un ; i)
0,
unj
Example.
Let
u
t
i, j
f
x
Then
vin uni ,
such that
vin+1 un+1
,
i
+ v u
x = 0 be discretized by UDS in space, FE in time
uni uni1
un+1
uni
i
+v
= 0,
t
x
Derivatives
un+1
= H(un ; i)
i
=0
H(un ;i)
un
i
= 1 ,
H(un ; i) = uni v
H(un ;i)
un
i1
= ,
where
t n
(ui uni1 )
x
t
= v x
Monotonicity-preserving methods
u0i u0i+1 ,
uni uni+1 ,
i, n
R u
dx
T V (u) =
x
is a
monotone
(monotone if linear)
X
n
where T V (u ) =
|uni uni1 |
i
TVD
monotonicity-preserving
un+1
uni
i
= ci1/2 (uni1 uni ) + ci+1/2 (uni+1 uni )
t
is total variation diminishing (TVD) provided that the coefficients satisfy
ci1/2 0,
Semi-discrete problem
ci+1/2 0,
dui
dt
fi+1/2 fi1/2
x
ci1/2 + ci+1/2 1
=0
conservation form
u
t
+ v u
x = 0,
H
= v ui+12+ui
fi+1/2
central difference
Hartens coefficients
ri =
ui ui1
ui+1 ui
f = vu
Smoothness indicator
L
= vui
fi+1/2
v > 0,
(r) =
r+|r|
1+|r|
Van Leer
minmod
ci+1/2 = 0
1D stencil
ui
u i+1
u i1
MC
superbee
x i1
xi
x i+1