Professional Documents
Culture Documents
Chapter5.08a PDF
Chapter5.08a PDF
Gustaf Soderlind
and Carmen Arevalo
Numerical Analysis, Lund University
Textbooks: A First Course in the Numerical Analysis of Differential Equations, by Arieh Iserles
and Introduction to Mathematical Modelling with Differential Equations, by Lennart Edsberg
c Gustaf Soderlind,
Numerical Analysis, Mathematical Sciences, Lund University, 2008-09
+ BC
Parabolic
ut = u
+ BC & IC
utt = u
+ BC & IC
Hyperbolic
ut + a(u)ux = 0
+ BC & IC
Classification of PDEs
Linear PDE with two independent variables
Auxx + 2Buxy + Cuyy + L(ux , uy , u, x, y) = 0
with L linear in ux , uy , u. Study
A B
= AC B 2
:= det
B C
Elliptic > 0
Parabolic = 0
Hyperbolic < 0
>0
=0
<0
Elliptic PDE
Laplace equation
uxx + uyy = 0
A = C = 1; B = 0
Parabolic PDE
Diffusion equation
ut = uxx
A = 1; B = C = 0
Hyperbolic PDEs
Wave equation
utt = uxx
A = 1; B = 0; C = 1
FDM
FEM
FVM
BEM
Simple geometry
Complex geometry
FEM
Special problems
FVM or BEM
Simple geometry
Complex geometry
FEM
Stiffness
Always use Astable time-stepping methods
Need Newton-type solvers for large sparse systems
Shocks
Solutions may be discontinuous example: sonic boom
Turbulence
Multiscale phenomena
2
2
2
=
+ 2+ 2
2
x
y
z
Laplace equation
u = 0
with boundary conditions u = u0 (x, y, z)
Poisson equation
u = f
with boundary conditions u = u0 (x, y, z)
x, y, z
x, y, z
Equidistant mesh x = y
ui1,j + ui,j1 4ui,j + ui,j+1 + ui+1,j
= f (xi , yj )
2
x
Participating approximations and mesh points
yj+1
yj
yj1
xi1
xi
xi+1
Numerical Methods for Differential Equations p. 12/50
Five-point operator
1
Numerical Methods for Differential Equations p. 13/50
0 ...
2
x
...
u,1
u,2
u,3
.
..
..
. I
I
u,N
f (x , y1 )
f (x , y2 )
f (x , y3 )
=
..
.
f (x , yN )
1)
Lu = 0
P
u=
ci i
hi , Lui = 0
Lu =
ci Li
u = 0 on
Take v with v = 0 on
Z
Z
u v =
f v
u v
Weak form of u = f
Define inner product
hv, ui =
vu d
as
a(v, u) = hv, f i
Numerical Methods for Differential Equations p. 18/50
{i }
P
u = cj j
R
P R
cj i j = f i
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
4. Parabolic problems
The prototypical equation is the
Diffusion equation ut = u
Nonlinear diffusion
ut = div (k(u)gradu)
ut = d uxx
Chemical reactions
Reactiondiffusion
ut = d uxx + f (u)
Convectiondiffusion
ut = ux +
1
u
Pe xx
ut = uxx
u(x, 0) = g(x)
u(0, t) = u(1, t) = 0
T = Ce
uxx = X T
X
T
=
=:
T
X
X = A sin x + B cos x
2 sin kx
Initial values
Fourier expansion g(x) =
P
1
(k)2 t
Tk (t) = e
ck 2 sin kx
X
(k)2 t
ck e
sin kx
u(x, t) = 2
k=1
x2
1
1 1 2
u
u =
...
x2
1 2
Numerical Methods for Differential Equations p. 25/50
ui,j u(i x, j t)
Numerical Methods for Differential Equations p. 27/50
xi
xi+1
1
Courant number = t/x2
21
0.5
Im
4t
2
t k
,
t
2
x
0.5
1.5
2.5
1.5
1
Re
0.5
0.5
2
x
2
0.8
0.6
0.4
0.2
0
1
0.8
0.1
0.6
0.08
0.06
0.4
0.04
0.2
0.02
0
1
0.8
0.6
0.4
0.2
0
0.2
0.4
1
0.8
0.1
0.6
0.08
0.06
0.4
0.04
0.2
0.02
0
more work/step
no restriction on t
CrankNicolson method. . .
Courant number = t/x2
recursion
(I T )u,j+1 = (I + T )u,j
2
2
with Toeplitz matrix T = tridiag(1 2 1)
Tridiagonal structure low complexity
Refactorize only if Courant number = t/x2 changes
Local error
Taylor expansion
li,j
t
x2
= ut uxx +
utt +
uxxxx + O(t2 , x4 )
2
12
Therefore
li,j
t
x2
=
utt +
uxxxx + O(t2 , x4 )
2
12
li,j 0
CFL condition
ei,j 0
as t, x 0
t/x2 1/2
as t, x 0
t
x2
=
utt +
uxxxx = O(t, x2 )
2
12
Suppose
order of SD scheme for spatial variables is p1
order of ODE time discretization is p2
Theorem If t = x2 the FD order of convergence is
p = min{p1 , 2p2 }
uji
t
j+1
j+1
j+1
j
j
j
+
u
+
2u
)
+
(u
+
u
2u
[(u
i+1 )]
i
i1
i+1
i
i1
2
2x
j+1
j+1 j
j
j+1
j
ui1 + (1 + )ui ui+1 = ui1 + (1 )ui + ui+1
2
2
2
2
Same order p = min{2, 4} = 2 as with Explicit Euler
tj+1
tj
xi1
xi
xi+1
Numerical Methods for Differential Equations p. 40/50
CrankNicolson. Stability
1
0.8
0.6
0.4
0.2
0
1
0.8
0.1
0.6
0.08
0.06
0.4
0.04
0.2
0.02
0
1. Basis functions
u(t, x) =
2. Approximate
3. Determine cj from
Note hi , ut i =
cj (t)j (x)
hi , ut i + a(i , u) = 0
cj hi , j i and a(i , u) =
cj hi , j i
Galerkin method
Simplest case
Piecewise linear basis functions on equidistant grid
Stiffness matrix elements kij = hi , j i
Kx
1
=
tridiag(1 2 1)
x
x
=
tridiag(1 4
6
1)
8. Well-posedness
Linear partial differential equation
ut = Lu + f , 0 x 1,
u(0, t) = 0 (t),
Suppose
u(1, t) = 1 (t)
wt = Lw + f,
vt
= Lv + f,
t 0,
u(x, 0) = h(x),
w(x, 0) = h(x)
v(x, 0) = h(x) + g(x)
u(x, 0) = g(x),
0 (t) 0,
1 (t) 0
Numerical Methods for Differential Equations p. 48/50
X
(k)2 t
u(x, t) = 2
ck e
sin kx
k=1
kE(t)gk22 =
= 2
1
0
|u(x, t)|2 dx
ck cj e
(k2 +j 2 ) 2 t
k=1 j=1
X
k=1
2 2(k)2 t
ck e
X
k=1
sin kx sin jx dx
0
c2k = kgk22