Introduction FEM, D-Example /home/lehre/vl-mhs-/inhalt/cover_sheet.tex. p./22
Table of contents D Example - Finite Element Method. D Setup Geometry 2. Governing equation 3. General Derivation of Finite Element Method 4. Shape functions 5. Assembling the matrix 6. Calculation of the matrix entries 7. Solving the set of equations /home/lehre/vl-mhs-/inhalt/toc_fem_intro.tex. p.2/22
D-Example: Finite Element Method Given : H left. Geometry x = m cements 4 m 2 3 4 5 Q x 2. 3. 4. Permeability k f = 0 5 m/s Boundary conditions Q = 0 4 m 3 /s H left = 50 m Notation denotes node denotes element 2 3 4 x x x x /home/lehre/vl-mhs-/inhalt/d_setup_fem.tex. p.3/22
Governing Equations (FEM D) Continuity equation v q = 0 Momentum equation (Darcy equation) v = k f h ( k f h) q = 0 D ( k f Assumption: No sinks or sources h ) q = 0 k f 2 h 2 = 0 (Laplace-Equation) /home/lehre/vl-mhs-/inhalt/gov_eqn_fem.tex. p.4/22
Introducing shape functions (FEM D) We now introduce an approximate function h(x) where ĥj is the piezometric head at the nodes and N j (x) is called shape function n h(x) = ĥ j N j (x). j= Inserting this approximation into the Laplace equation yields a residuum (error) ε: (k f h) q = ε We introduce a weighting function W. The differentiation is transformed making use of the product rule and the integral rule of Gauss. Then we make use of the boundary condition [v o = (k f h) n] and get the weak formulation: /home/lehre/vl-mhs-/inhalt/starting_equ.tex. p.5/22
Starting equation II (FEM D) [ W ] k f [ h]dx = W v o dx W qdx D G G W k f h dx = Γ Γ W v o dx G G W qdx The standard Galerkin method uses the shape functions N as weighting functions W. W i = N i ; h(x) = n j= ĥ j N j (x) /home/lehre/vl-mhs-/inhalt/starting_equ2.tex. p.6/22
Equation in matrix from (FEM D) Ni k f ( n ) j= ĥj N j (x) dx = N i v o dx }{{} F lux over boundary N i qdx }{{} Sources/Sinks ĥ j does not depend on x. ĥj Ni k f N j(x) dx }{{} A ij = N i v o dx N i qdx } {{ } b i /home/lehre/vl-mhs-/inhalt/stiffnessmat.tex n ĥ j A ij = b i A ĥ = b j=. p.7/22
Shape functions (FEM D) ements Construction of the local shape functions N and N 2. We can use linear functions, as we have only first order derivatives in the weak approximation. x Element : ĥ ĥ 2 N 2 x=0 x= x = m x () N () 2 y= y= 2 x=0 x= x = m x N () = x N () 2 = x : Element,2 : nodes /home/lehre/vl-mhs-/inhalt/shape_funct.tex. p.8/22
Shape functions II (FEM D) Construction of the local shape functions N and N 2, which are also called trial functions, interpolation functions or basis functions. We can use linear functions, as we have only first order derivatives in the weak approximation. These shape functions need to be adjusted for the other elements. The slope remains the same but the y-intercept changes. Element 2 for example has the following shape functions N (2) = 2 x N (2) 2 = x. /home/lehre/vl-mhs-/inhalt/shape_funct2.tex. p.9/22
Shape functions III (FEM D) By adding the products of piezometric head at the nodes ĥj and the local ansatz functions N j one gets an approximate solution h(x) between the nodes Element : h i (x) = n PSfrag ĥ j Nj(x) i replacements j= ĥ h () ĥ2 h () (x) = h ( x) + h 2 x h () (x) = h + (h 2 h )x 2 x=0 x= x In this case we have a linear interpolation. x x = m /home/lehre/vl-mhs-/inhalt/shape_funct3.tex. p.0/22
K () K () K () 2 K () System of equations (FEM D) 2 0 0 0 22 + K (2) 22 K (2) 23 0 0 0 K (2) 32 K (2) 33 + K (3) 33 K (3) 34 0 0 0 K (3) 34 K (3) 44 + K (4) 44 K (4) 45 0 0 0 K (4) 54 K (4) 55 h is known (Dirichlet boundary conditions). Delete the corresponding row and column. K () 22 + K (2) 22 K (2) 23 0 0 K (2) 32 K (2) 33 + K (3) 33 K (3) 34 0 0 K (3) 34 K (3) 44 + K (4) 44 K (4) 45 0 0 K (4) 54 K (4) 55 h 2 h 3 h 4 h 5 = h h 2 h 3 h 4 h 5 = Q Q 2 Q 3 Q 4 Q 5 Q 2 h K () 2 Q 3 Q 4 Q 5 /home/lehre/vl-mhs-/inhalt/set_of_eqn.tex. p./22
Calculating matrix entries (FEM D) Example : Calculation of the matrix entry A 23 (weighting function of node 2, shape function of node 3). The stiffness integral can be divided into different parts. At each element of A 23, except for element 2, the shape function or the weighting function equals zero. A 23 = K () 23 + K (2) 23 + K (3) 23 K () 23 = K (3) 23 = 0 = A 23 = K (2) 23 A 23 = K (2) 23 = /home/lehre/vl-mhs-/inhalt/matr_entr_23a.tex.tex 2 N (2) k f N (2) 2 dx. p.2/22
Calculating matrix entries II (FEM D) A 23 = K (2) 23 = 2 (2 x) k f (x ) dx A 23 = K (2) 23 = 2 k f dx = k f [ x] 2 A 23 = K (2) 23 = k f [ (2 )] = k f /home/lehre/vl-mhs-/inhalt/matr_entr_23b.tex. p.3/22
Calculating matrix entries III (FEM D) Example 2: Calculation of the matrix entry A 55. The stiffness integral can be divided into different parts. A 55 = K () 55 + K (2) 55 + K (3) 55 + K (4) 55 K () 55 = K (2) 55 + K (3) 55 = 0 = A 55 = K (4) 55 A 55 = K (4) 55 = 4 3 N (4) 2 k f N (4) 2 dx /home/lehre/vl-mhs-/inhalt/matr_entr_55a.tex. p.4/22
Calculating matrix entries IV (FEM D) A 55 = K (4) 55 = 4 3 (x 3) k f (x 3) dx A 55 = K (4) 55 = 4 3 k f dx = k f [x] 4 3 A 55 = K (4) 55 = k f [(4 3)] = k f /home/lehre/vl-mhs-/inhalt/matr_entr_55b.tex. p.5/22
Calculating matrix entries V (FEM D) Example 3: Calculation of the matrix entry A 22. The stiffness integral can be divided into different parts. In this case, only the weighting function and the shape function in element 3 and 4 equal zero. A 22 = K () 22 + K (2) 22 + K (3) 22 + K (4) 22 K (3) 22 = K (4) 22 = 0 = A 22 = K () 22 + K (2) 22 K () 22 = 0 K () 22 = N () k f 0 N () k f dx dx /home/lehre/vl-mhs-/inhalt/matr_entr_22a.tex. p.6/22
Calculating matrix entries VI (FEM D) K () 22 = 0 k f dx = k f [x] 0 K () 22 = k f [ 0] = k f K (2) 22 = K (2) 22 = 2 2 N (2) k f (2 x) k f N (2) dx (2 x) dx /home/lehre/vl-mhs-/inhalt/matr_entr_22b.tex. p.7/22
Calculating matrix entries VII (FEM D) K (2) 22 = 2 k f dx = k f [x] 2 K (2) 22 = k f [(2 )] = k f A 22 = K () 22 + K (2) 22 = 2k f All other matrix entries can be calculated analogously. A 32 = A 34 = A 43 = A 45 = A 54 = k f A 33 = A 44 = 2k f A 2 = A 2 = k f ; A = k f /home/lehre/vl-mhs-/inhalt/matr_entr_22c.tex. p.8/22
Inserting values in matrix (FEM D) Inserting these values one obtains the following system of equations: k f 2 0 0 2 0 0 2 0 0 h 2 h 3 h 4 h 5 = Q 2 + h k f Q 3 Q 4 Q 5 Q 2 = Q 3 = Q 4 equal zero, as there are no sinks and sources in the domain. Q 5 is the known Neumann boundary condition. /home/lehre/vl-mhs-/inhalt/values_matrix.tex. p.9/22
Solving the set of equations (FEM D) By transforming the vector representation one obtains a linear system of equations. Inserting the boundary conditions we have four equations for four unknowns. 2h 2 h 3 = 50 h 2 + 2h 3 h 4 = 0 h 3 + 2h 4 h 5 = 0 h 4 + h 5 = 04 k f /home/lehre/vl-mhs-/inhalt/lgse.tex. p.20/22
Solving the set of equations (FEM D) With k f = 0 5 and using the Thomas algorithm, we express our unknown in terms of one other unknown and the left boundary condition. h 2 = 50 2 + 2 h 3 h 3 = 50 3 + 2 3 h 4 h 5 = 4 h 4 = 25 2 + 3 4 h 5 [ 0 4 0 5 + 25 2 ]. Substituting back yields the following result h = 50m ; h 2 = 40m ; h 3 = 30m ; h 4 = 20m ; h 5 = 0m. /home/lehre/vl-mhs-/inhalt/lgse2.tex. p.2/22
Test of the solution (FEM D) Test: Q + Q 5 = 0 has to be fulfilled. h A () + h 2 A () 2 = Q 50 k f + 40 k f = Q = Q = 0 4 m/s = Q + Q 5 = 0 /home/lehre/vl-mhs-/inhalt/lgse2a.tex. p.22/22