Chapter 2Finite Element Method2.1 IntroductionWhen dealing with partial differential equations, we need to have a tool which will allow us tosolve them or at least to get an approximation of the solution. In this chapter we will presenta famous method called Finite Element Method, which let us create an approximation of thePDE we are dealing with, which preserves complex geometries and is quite easy to understand.FEM method is used all over the world in thousands of application.We will illustrate the Finite Element method with the solution of a Poisson equation withDirichlet boundary condition, where Ω is a bounded open domain in R 2 and Γ is its boundary.−∆u = f (2.1)2.2 Variational EquationTo solve this problem approximately, we will need to extract a system of algebraic equationswhich will yield the solution. To do that, we will use a common approach, namely the weakformulation of the problem. Denote:∫a(u,u) = < ∇u|∇u > dx∫Ω(f,v) = fv dxIt is easy to show, that a is bilinear. Now, from Green’s formula we get:Ωa(u,v) = −(∆u,v) = (∇u,∇v)Hence, now we can reformulate the problem into following oneFind u ∈ V such that ∀v ∈ V : a(u,v) = (f,v) (2.2)where V ⊂ L 2 is the subspace of all functions whose derivatives up to first order are in L 2 andwhich have zeros on Γ. The resulting space is called H0 1 (Ω). The above condition is called aVariational Equation.9
2.3 Galerkin EquationsLet Ω h denote an approximation of the domain Ω by the union of the m triangles K i , whichcome from the triangulation of Ω. Now, we can replace the space V with a finite dimensionalspace V h , which is defined as the space of all functions which are piecewise linear and continuouson the polygonal region Ω h , and which vanish on the boundary Γ. To be more precise:V h = {φ : φ |Ωh - continuous, φ IΓh = 0, φ |Kj - linear for all j} (2.3)If x j , where j ∈ {1, ...,n} are the nodes of the triangulation, then a function φ j in V h , can beactually associated with each of them, so that it satisfies the following condition:{ 1, if xi = xφ j (x i ) = j. (2.4)0, if x i ≠ x jThe above condition makes φ i ,i = 1,...,n defined uniquely. Also the φ i ’s form a basis of thespace V h , so each function now can be represented as a linear combination of them:∀u ∈ V h : u(x) =n∑ξ i φ i (x) (2.5)i=1If we now recall the variational equation, and write it for the V h space, then we will get:Find u ∈ V h such that ∀v ∈ V h : a(u,v) = (f,v) (2.6)by the linearity of a with respect to v, one can impose the condition a(u,φ i ) = (f,φ i ), fori = 1,...,n. But from (2.5), we know that u can be represented as the linear combination ofthe basis function. If we combine those two facts, we will get:n∑α ij ξ j = β j , for all i = 1,...n. (2.7)i=1where α ij = a(φ i ,φ j ) and β i = (f,φ i ).The above equation allows us to formulate a linear system:with A = [α ij ] n×n and b = [β 1 ... β n ] TAx = b (2.8)The matrices generated by this method have some nice properties. The most important arethe facts, that A is Symmetric Positive Definite and sparse. Knowing this, we may now useone of the CG variants for solving these linear systems.10