numerical solutions to partial differential equations
play

Numerical Solutions to Partial Differential Equations Zhiping Li - PowerPoint PPT Presentation

Numerical Solutions to Partial Differential Equations Zhiping Li LMAM and School of Mathematical Sciences Peking University Variational Problems of the Dirichlet BVP of the Poisson Equation 1 For the homogeneous Dirichlet BVP of the Poisson


  1. Numerical Solutions to Partial Differential Equations Zhiping Li LMAM and School of Mathematical Sciences Peking University

  2. Variational Problems of the Dirichlet BVP of the Poisson Equation 1 For the homogeneous Dirichlet BVP of the Poisson equation � −△ u = f , x ∈ Ω , u = 0 , x ∈ ∂ Ω , 2 The weak form w.r.t. the virtual work principle: � Find u ∈ H 1 0 (Ω) , such that ∀ v ∈ H 1 a ( u , v ) = ( f , v ) , 0 (Ω) , � � where a ( u , v ) = Ω ∇ u · ∇ v dx , ( f , v ) = Ω fv dx . 3 The weak form w.r.t. the minimum potential energy principle: � Find u ∈ H 1 0 (Ω) , such that J ( u ) = min v ∈ H 1 0 (Ω) J ( v ) , where J ( v ) = 1 2 a ( v , v ) − ( f , v ).

  3. Use Finite Dimensional Trial, Test and Admissible Function Spaces 1 Replace the trial and test function spaces by appropriate finite dimensional subspaces, say V h (0) ⊂ H 1 0 (Ω), we are led to the discrete problem: � Find u h ∈ V h (0) such that a ( u h , v h ) = ( f , v h ) , ∀ v h ∈ V h (0) , Such an approach is called the Galerkin method. 2 Replace the admissible function space by an appropriate finite dimensional subspace, say V h (0) ⊂ H 1 0 (Ω), we are led to the discrete problem: � Find u h ∈ V h (0) such that J ( u h ) = min v h ∈ V h (0) J ( v h ) . Such an approach is called the Ritz method. 3 The two methods lead to an equivalent system of linear algebraic equations.

  4. Finite Element Methods for Elliptic Problems Galerkin Method and Ritz Method Algebraic Equations of the Galerkin and Ritz Methods Derivation of Algebraic Equations of the Galerkin Method Let { ϕ i } N h i =1 be a set of basis functions of V h (0), let N h N h � � u h = u j ϕ j , v h = v i ϕ i , j =1 i =1 then, the Galerkin method leads to Find u h = ( u 1 , . . . , u N h ) T ∈ R N h such that � � N h i , j =1 a ( ϕ j , ϕ i ) u j v i = � N h i =1 ( f , ϕ i ) v i , ∀ v h = ( v 1 , . . . , v N h ) T ∈ R N h , which is equivalent to � N h j =1 a ( ϕ j , ϕ i ) u j = ( f , ϕ i ), i = 1 , 2 , · · · , N h . The stiffness matrix: K = ( k ij ) = ( a ( ϕ j , ϕ i )); the external load vector: f h = ( f i ) = (( f , ϕ i )); the displacement vector: u h ; the linear algebraic equation: K u h = f h . 4 / 34

  5. Finite Element Methods for Elliptic Problems Galerkin Method and Ritz Method Algebraic Equations of the Galerkin and Ritz Methods Derivation of Algebraic Equations of the Ritz Method 1 The Ritz method leads to a finite dimensional minimization problem, whose stationary points satisfy the equation given by the Galerkin method, and vice versa. 2 It follows from the symmetry of a ( · , · ) and the Poincar´ e- Friedrichs inequality (see Theorem 5.4) that stiffness matrix K is a symmetric positive definite matrix, and thus the linear system has a unique solution, which is a minima of the Ritz problem. 3 So, the Ritz method also leads to K u h = f h . 5 / 34

  6. The Key Is to Construct Finite Dimensional Subspaces There are many ways to construct finite dimensional subspaces for the Galerkin method and Ritz method. For example 1 For Ω = (0 , 1) × (0 , 1), the functions ϕ mn ( x , y ) = sin( m π x ) sin( n π y ) , m , n ≥ 1 , which are the complete family of the eigenfunctions { ϕ i } ∞ i =1 of the corresponding eigenvalue problem � −△ u = λ u , x ∈ Ω , u = 0 , x ∈ ∂ Ω , and form a set of basis of H 1 0 (Ω). 2 Define V N = span { ϕ mn : m ≤ N , n ≤ N } , the corresponding numerical method is called the spectral method. 3 Finite element method is a systematic way to construct subspaces for more general domains.

  7. Finite Element Methods for Elliptic Problems Finite Element Methods A Typical Example of the Finite Element Method Construction of a Finite Element Function Space for H 1 0 ([0 , 1] 2 ) 1 The Dirichlet boundary value problem of the Poisson equation −△ u = f , ∀ x ∈ Ω = (0 , 1) 2 , u = 0 , ∀ x ∈ ∂ Ω . 2 We need to construct a finite element subspace of H 1 0 ((0 , 1) 2 ). 3 Firstly, introduce a triangulation T h (Ω) on the domain Ω: 16 17 18 19 20 Triangular element { T i } M i =1 ; ◦ ◦ T 17 T 19 T 21 T 23 T i ∩ T j = ∅ , 1 ≤ i � = j ≤ M ; T 18 T 20 T 22 T 24 12 13 14 If T i ∩ T j � = ∅ : it must be 11 15 a common edge or vertex; T 9 T 11 T 13 T 15 T 10 T 12 T 14 T 16 h = max i diam ( T i ); 7 8 9 6 10 Nodes { A i } N i =1 , which is T 1 T 3 T 5 T 7 globally numbered. T 2 T 4 T 6 T 8 1 2 3 4 5 7 / 34

  8. Finite Element Methods for Elliptic Problems Finite Element Methods A Typical Example of the Finite Element Method Construction of a Finite Element Function Space for H 1 0 ((0 , 1) 2 ) 4 Secondly, define a finite element function space, which is a subspace of H 1 ((0 , 1) 2 ), on the triangulation T h (Ω): V h = { u ∈ C (Ω) : u | T i ∈ P 1 ( T i ) , ∀ T i ∈ T h (Ω) } . 5 Then, define finite element trial and test function spaces, which are subspaces of H 1 0 ((0 , 1) 2 ): V h (0) = { u ∈ V h : u ( A i ) = 0 , ∀ A i ∈ ∂ Ω } . 6 A function u ∈ V h is uniquely determined by { u ( A i ) } N i =1 . 7 Basis { ϕ i } N i =1 of V h : ϕ i ( A j ) = δ ij , i = 1 , 2 , . . . , N . 8 k ij = a ( ϕ j , ϕ i ) � = 0, iff A i ∪ A j ⊂ T e for some 1 ≤ e ≤ M . 9 supp ( ϕ i ) is small ⇒ the stiffness matrix K is sparse. 8 / 34

  9. Finite Element Methods for Elliptic Problems Finite Element Methods A Typical Example of the Finite Element Method Assemble the Global Stiffness Matrix K from the Element One K e 1 Denote a e ( u , v ) = � T e ∇ u · ∇ v dx , by the definition, then, k ij = a ( ϕ j , ϕ i ) = � M e =1 a e ( ϕ j , ϕ i ) = � M e =1 k e ij . 2 k e ij = a e ( ϕ j , ϕ i ) � = 0, iff A i ∪ A j ⊂ T e . For most e , k e ij = 0. 3 It is inefficient to calculate k ij by scanning i , j node by node. 4 Element T e with nodes { A e α } 3 α =1 ⇔ the global nodes A en ( α, e ) . 3 ( A )) T for A ∈ T e , 5 Area coordinates λ e ( A ) = ( λ e 1 ( A ) , λ e 2 ( A ) , λ e λ e α ( A ) = |△ AA e β A e γ | / |△ A e α A e β A e γ | ∈ P 1 ( T e ), λ e α ( A e β ) = δ αβ . 6 ϕ en ( α, e ) | T e ( A ) = λ e α ( A ), ∀ A ∈ T e . 9 / 34

  10. Finite Element Methods for Elliptic Problems Finite Element Methods A Typical Example of the Finite Element Method The Algorithm for Assembling Global K and f h 7 Define the element stiffness matrix � K e = ( k e k e αβ � a e ( λ e α , λ e ∇ λ e α · ∇ λ e αβ ) , β ) = β dx , T e � k e 8 Then, k ij = αβ can be assembled element wise. en ( α, e )= i ∈ T e en ( β, e )= j ∈ T e 9 The external load vector f h = ( f i ) can also be assembled by scanning through elements � � � f λ e f e f i = α dx = α . T e en ( α, e )= i ∈ T e en ( α, e )= i ∈ T e 10 / 34

  11. Finite Element Methods for Elliptic Problems Finite Element Methods A Typical Example of the Finite Element Method The Algorithm for Assembling Global K and f h Algorithm 6.1 : K = ( k ( i , j )) := 0; f = ( f ( i )) := 0; for e = 1 : M K e = ( k e ( α, β )); % calculate the element stiffness matrix f e = ( f e ( α )); % calculate the element external load vector k ( en ( α, e ) , en ( β, e )) := k ( en ( α, e ) , en ( β, e )) + k e ( α, β ); f ( en ( α, e )) := f ( en ( α, e )) + f e ( α ); end 11 / 34

  12. Finite Element Methods for Elliptic Problems Finite Element Methods A Typical Example of the Finite Element Method Calculations of K e and f e Are Carried Out on a Reference Element 1 The standard reference triangle x 2 ) ∈ R 2 : ˆ T s = { ˆ x 1 ≥ 0 , ˆ x 2 ≥ 0 and ˆ x 2 ≤ 1 } , x = (ˆ x 1 , ˆ x 1 + ˆ 2 = (1 , 0) T and A s with A s 1 = (0 , 0) T , A s 3 = (0 , 1) T . 2 For T e with A e 1 = ( x 1 1 , x 1 2 ) T , A e 2 = ( x 2 1 , x 2 2 ) T , A e 3 = ( x 3 1 , x 3 2 ) T , define A e = ( A e 2 − A e 1 , A e 3 − A e 1 ), a e = A e 1 . 3 x = L e (ˆ x ) := A e ˆ x + a e : T s → T e is an affine map. α ( L − 1 4 The area coordinates of T e : λ e α ( x ) = λ s e ( x )), since it is an affine function of x , and λ s α ( L − 1 e ( A e β )) = λ s α ( A s β ) = δ αβ . x ) ∇ L − 1 x ) A − 1 5 ∇ λ e ( x ) = ∇ λ s (ˆ e ( x ) = ∇ λ s (ˆ e . 12 / 34

  13. Finite Element Methods for Elliptic Problems Finite Element Methods A Typical Example of the Finite Element Method Calculations of K e and f e Are Carried Out on a Reference Element x = L − 1 e ( x ) := A − 1 e x − A − 1 6 Change of integral variable ˆ e A e 1 , � � K e = ∇ λ e ( x ) ( ∇ λ e ( x )) T dx = ∇ λ s (ˆ x ) A − 1 e ( ∇ λ s (ˆ x ) A − 1 e ) T det A e d ˆ x , T e T s � � f e = f ( x ) λ e ( x ) dx = det A e x )) λ s (ˆ f ( L e (ˆ x ) d ˆ x . T e T s 7 λ s x 2 , λ s x 1 , λ s 1 (ˆ x 1 , ˆ x 2 ) = 1 − ˆ x 1 − ˆ 2 (ˆ x 1 , ˆ x 2 ) = ˆ 3 (ˆ x 1 , ˆ x 2 ) = ˆ x 2 , so   − 1 − 1 � x 3 2 − x 1 x 1 1 − x 3 1 �  , A − 1 ∇ λ s (ˆ 2 1 x ) = 1 0 = . x 1 2 − x 2 x 2 1 − x 1  e det A e 2 1 0 1 13 / 34

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend