PDE Project Course

1. Adaptive finite element methods
Anders Logg
logg@math.chalmers.se

Department of Computational Mathematics

PDE Project Course 03/04 – p. 1

Lecture plan

Introduction to FEM FEM for Poisson’s equation Adaptivity for Poisson’s equation FEM for u ˙ =f Adaptivity for u ˙ =f

• •

• •

PDE Project Course 03/04 – p. 2

Introduction to FEM PDE Project Course 03/04 – p. 3 .

where A is a differential operator. also known as Galerkin’s method. 4 . f is a given force term and u is the solution. is a general method for solving PDEs (or ODEs) of the form A(u) = f. PDE Project Course 03/04 – p.A method for solving PDEs The finite element method (FEM).

5 . we can obtain solutions to general problems with complex geometries: u ˙ + u · ∇u − ν ∆u + ∇p = f ∇·u = 0 PDE Project Course 03/04 – p.Solving PDEs • Analytic solutions can be obtained only for simple geometries in special cases: −∆u = 0 PSfrag replacements • Using the computer.

The finite element method Find an approximate solution U of the form N U (x) = j =1 ξj ϕj (x). PDE Project Course 03/04 – p. Here U is linear linear combination of (a finite number of) basis functions with local support: {ϕ j } N j =1 . 6 .

w) = Ω v (x)w(x) dx • L2 (Ω)-norm of a function v : 1/2 v L2 (Ω) = Ω v 2 dx = (v. 7 . v ) PDE Project Course 03/04 – p. w: (v.Some notation from functional analysis • Scalar product for functions v.

w)| ≤ v w • v and w are orthogonal iff (v.Some notation from functional analysis • Cauchy’s inequality: |(v. w) = 0 w PSfrag replacements v PDE Project Course 03/04 – p. 8 .

v ) = 0 ∀v ∈ V PDE Project Course 03/04 – p.Galerkin’s method The finite element method is based on Galerkin’s method: • • • Let Vh denote a finite dimensional trial space. ˆh denote a finite dimensional test space. 9 . Let V Find U ∈ Vh such that the residual ˆh : R(U ) = A(U ) − f is orthogonal to V ˆh . (R(U ).

Galerkin’s method ˆh = span{ϕj }N we have For A linear with Vh = V j =1 (R(U ). . . ϕ ˆi ). ϕ ˆi ). 0. (f. ∀v ∈ V ˆh . where Ah = (A(ϕj ). N. . ∀v ∈ V i = 1. b = (f. v ) N ˆi ) j =1 ξj (A(ϕj ). (f. ϕ or Ah ξ = b. v ). ϕ ˆ i ). ˆh . . ∀v ∈ V ˆh . v ) (A( N j =1 ξj ϕj ). . 10 = = = = 0. PDE Project Course 03/04 – p. v ) (A(U ) − f.

Galerkin’s method It is often advisable to rewrite the differential equation A(u) = f from operator form to variational form: a(u. PDE Project Course 03/04 – p. v ) ∀v ∈ V. where a(·. ·) is a bilinear form. ·) = (A(·). and V is a suitable function space. v ) = (f. 11 .

. . a(U. . v ) = ( f. ϕ ˆi ). . ∀v ∈ V ˆh . PDE Project Course 03/04 – p. b = (f.Galerkin’s method Starting from the variational formulation. i = 1. v ) = 0. a( N ξ ϕ . v ) . we have ˆh . where Ah = a(ϕj . ∀ v ∈ V j j j =1 N ˆi ) = (f. j =1 ξj a(ϕj . ϕ ˆi ). v ) − (f. 12 . ϕ ˆ i ). N. ϕ or Ah ξ = b.

FEM for Poisson’s equation PDE Project Course 03/04 – p. 13 .

Poisson in three different forms • Equation: −∆u = f Variational formulation: ∇u · ∇v dx = Ω Ω • f v dx ∀v ∈ V • Linear system: Ah = Ω ∇ϕj · ∇ϕ ˆi dx. 14 . b= Ω fϕ ˆi dx PDE Project Course 03/04 – p.

PDE Project Course 03/04 – p...Details Let’s do this on the black board. 15 .

Adaptivity for Poisson PDE Project Course 03/04 – p. 16 .

This can increase the dimension N of Vh and V be done in different ways: • • • h-adaptivity: decrease the mesh size h p-adaptivity: increase the polynomial order p hp-adaptivity: a combination of the h and p methods We will only consider h-adaptivity. 17 .How large is the error? We expect the error e = U − u to decrease if we ˆh . PDE Project Course 03/04 – p.

2 S ⊂∂K PDE Project Course 03/04 – p. 18 .An a posteriori error estimate Let · E denote the energy-norm given by v E = ∇v . Then the (piecewise linear) finite element solution U = U (x) satisfies the error estimate e E = U −u E ≤ C h(R1 (U ) + R2 (U )) . where R1 (U ) = |f + ∆U | = |f | and 1 1 R2 (U ) = max h− K |[∂S U ]|.

given by a triangulation Th .Adaptive error control Find Vh . where TOL is a given tolerance for the error. such that e E ≤ TOL. PDE Project Course 03/04 – p. This is satisfied if C h(R1 (U ) + R2 (U )) ≤ TOL. 19 .

20 . PDE Project Course 03/04 – p. R2 .An adaptive algorithm 1. Compute the residuals R1 . and the error estimate. Compute the solution U on the current triangulation. Choose an initial triangulation Th0 . we refine the elements where R1 + R2 is large and start again at 2. 4. 3. 2. Otherwise. If the error estimate is below the tolerance we stop.

FEM for u ˙ =f PDE Project Course 03/04 – p. 21 .

t) dt PDE Project Course 03/04 – p. t) Variational formulation: tn tn • (u. 22 . ˙ v ) dt = tn−1 • tn−1 (f. v ) dt ∀v ∈ V Step method: tn u(tn ) = u(tn−1 ) + tn−1 f (u(t).u ˙ = f in three different forms • Equation: u ˙ (t) = f (u(t).

Details Let’s do this on the black board. PDE Project Course 03/04 – p. 23 ...

24 .Adaptivity for u ˙ =f PDE Project Course 03/04 – p.

[0. t) } . 25 . The (piecewise linear) finite element solution U = U (t) satisfies the a posteriori error estimate e(T ) = S (T ) max {k (t) R(U. t) is the residual. R(U.An a posteriori error estimate We expect the error to decrease if we decrease the time step k .T ] where S (T ) is a stability factor and ˙ (t) − f (U (t). t) = U PDE Project Course 03/04 – p.

An adaptive algorithm 1. (See Chapter 9 in CDE. PDE Project Course 03/04 – p.) 4. Compute the solution U with time steps based on the error estimate. Make a preliminary estimate of S (T ). Compute the dual solution φ. Otherwise start again at 2. 2. If the error estimate is below the tolerance we stop. 3. 26 . Compute an error estimate. 5.

Sign up to vote on this title
UsefulNot useful