Numerical Methods for Differential Equations

263 downloads 175 Views 745KB Size Report
Textbooks: A First Course in the Numerical Analysis of Differential Equations, ... cO Gustaf S¨oderlind, Numerical Analysis, Mathematical Sciences, Lund ...
Numerical Methods for Differential Equations Chapter 5: Partial differential equations – elliptic and parabolic ¨ ´ 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

Numerical Methods for Differential Equations – p. 1/50

1. Brief overview of PDE problems Classification: Three basic types, four prototype equations ◮ Elliptic ∆u = 0

+ BC

◮ Parabolic ut = ∆u

+ BC & IC

utt = ∆u

+ BC & IC

◮ Hyperbolic

ut + a(u)ux = 0

+ BC & IC

Numerical Methods for Differential Equations – p. 2/50

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

Numerical Methods for Differential Equations – p. 3/50

Standard PDEs. Prototypical problems

δ>0

δ=0

δ 0 Theorem Crank–Nicolson is unconditionally stable

Numerical Methods for Differential Equations – p. 41/50

Experimental stability investigation N = 30 internal pts in [0, 1], M = 30 time steps on [0, 0.1] Stable solution at CFL = 3.2

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

0

Numerical Methods for Differential Equations – p. 42/50

7. Parabolic problems. FEM Consider diffusion problem in strong form ut − uxx = 0 with Dirichlet boundary conditions Multiply by test function v and integrate by parts Z 1 Z 1 vut dx + v ′ u′ dx = 0 0

0

In terms of inner product and energy norm – Weak form hv, ut i + a(v, u) = 0 for all v with v(0) = v(1) = 0

Numerical Methods for Differential Equations – p. 43/50

Galerkin method (Finite Element Method) {ϕi }

1. Basis functions

u(t, x) =

2. Approximate 3. Determine cj from Note hϕi , ut i =

P

P

cj (t)ϕj (x)

hϕi , ut i + a(ϕi , u) = 0

c˙j hϕi , ϕj i and a(ϕi , u) =

P

cj hϕ′i , ϕ′j i

We get an initial value problem B∆x c˙ + K∆x c = 0 for the determination of the coefficients cj (t) with c(0) determined by the initial condition Numerical Methods for Differential Equations – p. 44/50

Galerkin method Simplest case Piecewise linear basis functions on equidistant grid Stiffness matrix elements kij = hϕ′i , ϕ′j i K∆x

1 = tridiag(−1 2 −1) ∆x

and mass matrix elements bij = hϕi , ϕj i B∆x

∆x = tridiag(1 4 6

1)

Numerical Methods for Differential Equations – p. 45/50

Simplest Galerkin FEM. . . Note that in the initial value problem B∆x c˙ + K∆x c = 0 the matrix B∆x is tridiagonal ⇒ no advantage from explicit time stepping methods Explicit Euler B∆x (cn+1 − cn ) = −∆t · K∆x cn requires the solution of a tridiagonal system on every step

Numerical Methods for Differential Equations – p. 46/50

Simplest Galerkin FEM. . . As the system is stiff, consider implicit A-stable method ∆t B∆x (cn+1 − cn ) = − · K∆x (cn + cn+1 ) 2 and solve tridiagonal system ∆t ∆t (B∆x + K∆x )cn+1 = (B∆x − K∆x )cn 2 2 on every step Trapezoidal rule has same cost, but better stability Numerical Methods for Differential Equations – p. 47/50

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)

Subtract to get homogeneous Dirichlet problem ut = Lu,

u(x, 0) = g(x),

φ0 (t) ≡ 0,

φ1 (t) ≡ 0 Numerical Methods for Differential Equations – p. 48/50

Well-posedness. Time evolution Suppose time evolution u(x, t) = E(t)g(x) Definition The equation is well-posed if for every t∗ > 0 there is a constant 0 < C(t∗ ) < ∞ such that kE(t)k ≤ C(t∗ ) for all 0 ≤ t ≤ t∗ Theorem A well-posed equation has a solution that ◮ depends continuously on the initial value (the “data”) ◮ is uniformly bounded in any compact interval

Numerical Methods for Differential Equations – p. 49/50

ut = uxx is well posed √ P∞ Fourier series expansion g(x) = 2 1 ck sin kπx implies ∞ √ X −(kπ)2 t u(x, t) = 2 ck e sin kπx k=1

kE(t)gk22 =

Z

= 2

1 0

|u(x, t)|2 dx

∞ X ∞ X

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

Hence kE(t)k2 ≤ 1 for every t ≥ 0

Z

1

sin kπx sin jπx dx 0

c2k = kgk22

Numerical Methods for Differential Equations – p. 50/50