An Introduction to the Finite Element Analysis Presented by Niko Manopulo Agenda PART I Introduction and Basic Concepts 1.0 Computational Methods 1.1 1.2 1.3 2.0 The Finite Elements Method 2.1 2.2 3.0 Idealization Discretization Solution FEM Notation Element Types Mechanichal Approach 3.1 3.2 3.3 3.4 The Problem Setup Strain Energy External Energy The Potential Energy Functional Joint Advanced Student School St.Petersburg 2005 Agenda PART II Mathematical Formulation 4.0 The Mathematics Behind the Method 4.1 4.2 4.3 4.4 4.5 4.6 4.7 4.8 Weighted Residual Methods Approxiamting Functions The Residual Galerkin’s Method The Weak Form Solution Space Linear System of Equations Connection to the physical system Joint Advanced Student School St.Petersburg 2005 Agenda PART III Finite Element Discretization 5.0 Finite Element Discretization 4.1 4.2 4.3 4.4 4.5 4.6 4.7 6.0 7.0 The Trial Basis Matrix Form of the Problem Element Stiffness Matrix Element Mass Matrix External Work Integral Assembling Linear System of Equations References Question and Answers Joint Advanced Student School St.Petersburg 2005 PART I Introduction and Basic Concepts 1.0 Computational Methods Joint Advanced Student School St.Petersburg 2005 1.1 Idealization • Mathematical Models • “A model is a symbolic device built to simulate and predict aspects of behavior of a system.” • Abstraction of physical reality • Implicit vs. Explicit Modelling • Implicit modelling consists of using existent pieces of abstraction and fitting them into the particular situation (e.g. Using general purpose FEM programs) • Explicit modelling consists of building the model from scratch Joint Advanced Student School St.Petersburg 2005 1.2 Dicretization 1. Finite Difference Discretization • • • The solution is discretized Stability Problems Loss of physical meaning 2. Finite Element Discretization • • • The problem is discretized Physical meaning is conserved on elements Interpretation and Control is easier Joint Advanced Student School St.Petersburg 2005 1.3 Solution 1. Linear System Solution Algorithms • • • Gaussian Elimination Fast Fourier Transform Relaxation Techniques 2. Error Estimation and Convergence Analysis Joint Advanced Student School St.Petersburg 2005 2.0 Finite Element Method • Two interpretations 1. Physical Interpretation: The continous physical model is divided into finite pieces called elements and laws of nature are applied on the generic element. The results are then recombined to represent the continuum. 2. Mathematical Interpretation: The differetional equation reppresenting the system is converted into a variational form, which is approximated by the linear combination of a finite set of trial functions. Joint Advanced Student School St.Petersburg 2005 2.1 FEM Notation Elements are defined by the following properties: 1. Dimensionality 2. Nodal Points 3. Geometry 4. Degrees of Freedom 5. Nodal Forces (Non homogeneous RHS of the DE) Joint Advanced Student School St.Petersburg 2005 2.2 Element Types Joint Advanced Student School St.Petersburg 2005 3.0 Mechanical Approach • • • • Simple mechanical problem Introduction of basic mechanical concepts Introduction of governing equations Mechanical concepts used in mathematical derivation Joint Advanced Student School St.Petersburg 2005 3.1 The Problem Setup Joint Advanced Student School St.Petersburg 2005 3.2 Strain Energy • Hooke’s Law: ( x ) E ( x ) where du ( x) dx • Strain Energy Density: 1 ( x) ( x) 2 Joint Advanced Student School St.Petersburg 2005 3.2 Strain Energy (cont’d) • Integrating over the Volume of the Bar: 1 1 L 1 L U dV p dx ( EAu' )u ' dx 2 V 2 0 2 0 1 L U u ' EAu' dx 2 0 • All quantities may depend on x. Joint Advanced Student School St.Petersburg 2005 3.3 External Energy • Due to applied external loads 1. The distributed load q(x) 2. The point end load P. This can be included in q. • External Energy: L W qu dx 0 Joint Advanced Student School St.Petersburg 2005 3.4 The Total Potential Energy Functional • The unknown strain Function u is found by minimizing the TPE functional described below: U W or [u ( x)] U [u ( x)] W [u ( x)] Joint Advanced Student School St.Petersburg 2005 PART II Mathematical Formulation 4.0 Historical Background • Hrennikof and McHenry formulated a 2D structural problem as an assembly of bars and beams • Courant used a variational formulation to approximate PDE’s by linear interpolation over triangular elements • Turner wrote a seminal paper on how to solve one and two dimensional problems using structural elements or triangular and rectangular elements of continuum. Joint Advanced Student School St.Petersburg 2005 4.1 Weighted Residual Methods The class of differential equations containing also the one dimensional bar described above can be described as follows : L[u ] d du ( p ( x) ) z ( x)u q( x), dx dx u (0) u (1) 0. Joint Advanced Student School St.Petersburg 2005 0 x 1 (1) 4.1 Weighted Residual Methods It follows that: L[u ] q 0 Multiplying this by a weight function v and integrating over the whole domain we obtain: 1 (L[u] q)v dx (v, L[u] q) 0 0 (2) For the inner product to exist v must be “square integrable” Therefore: v L2 (0,1) Equation (2) is called variational form Joint Advanced Student School St.Petersburg 2005 4.2 Approximating Function • We can replace u and v in the formula with their approximation function i.e. N u ( x ) U ( x ) c jf j ( x ) j 1 N v( x) V ( x) d jy j ( x) j 1 • The functions fj and yj are of our choice and are meant to be suitable to the particular problem. For example the choice of sine and cosine functions satisfy boundary conditions hence it could be a good choice. Joint Advanced Student School St.Petersburg 2005 4.2 Approximating Function • U is called trial function and V is called test function • As the differential operator L[u] is second order u C 2 (0,1) U C 2 (0,1) • Therefore we can see U as element of a finite-diemnsional subspace of the infinite-dimensional function space C2(0,1) U S N (0 ,1) C 2 (0 ,1) • The same way V Sˆ N (0 ,1) L2 (0 ,1) Joint Advanced Student School St.Petersburg 2005 4.3 The Residual • Replacing v and u with respectively V and U (2) becomes (V , r ) 0, r ( x) L[U ] q • • V Sˆ N r(x) is called the residual (as the name of the method suggests) The vanishing inner product shows that the residual is orthogonal to all functions V in the test space. Joint Advanced Student School St.Petersburg 2005 4.3 The Residual • Substituting V ( x) N d y j 1 j j ( x) into (V , L[U ] q ) 0 and exchanging summations and integrals we obtain N d j 1 j (y j , L[U ] q) 0 d j , j 1, 2 , ... , N • As the inner product equation is satisfied for all choices of V in SN the above equation has to be valid for all choices of dj which implies that (y j , L[U ] q) 0 j 1, 2 , ... , N Joint Advanced Student School St.Petersburg 2005 4.4 Galerkin’s Method • One obvious choice of y j would be taking it equal to f j • This Choice leads to the Galerkin’s Method (f j , L[U ] q) 0 j 1, 2 , ... , N • This form of the problem is called the strong form of the problem. Because the so chosen test space has more continuity than necessary. • Therefore it is worthwile for this and other reasons to convert the problem into a more symmetrical form • This can be acheived by integrating by parts the initial strong form of the problem. Joint Advanced Student School St.Petersburg 2005 4.5 The Weak Form • Let us remember the initial form of the problem L[u ] d du ( p ( x) ) z ( x)u q ( x), dx dx 0 x 1 u (0) u (1) 0. 1 (v, L[u ] q) v [( pu ' )' zu q] dx 0 • Integrating by parts 1 1 v [( pu' )' zu q] dx (v' pu'vzu vq) dx vpu' 0 0 Joint Advanced Student School St.Petersburg 2005 1 0 0 4.5 The Weak Form • The problem can be rewritten as A(v , u ) (v , q) 0 where 1 A(v , u ) (v' pu 'vzu) dx 0 • The integration by parts eliminated the second derivatives from the problem making it possible less continouity than the previous form. This is why this form is called weak form of the problem. • A(v,u) is called Strain Energy. Joint Advanced Student School St.Petersburg 2005 4.6 Solution Space • Now that derivative of v comes into the picture v needs to have more continoutiy than those in L2. As we want to keep symmetry its appropriate to choose functions that produce bounded values of 1 A(u , u ) ( p(u ' ) 2 zu 2 ) dx • 0 As p and z are necessarily smooth functions the following restriction is sufficient 1 2 2 ( u ' ) u dx 0 • Functions obeying this rule belong to the so called Sobolev Space and they are denoted by H1. We require v and u to satisfy boundary 1 conditions so we denote the resulting space as H 0 Joint Advanced Student School St.Petersburg 2005 4.7 Linear System of Equations • The solution now takes the form A(v , u ) (v , q) v H 01 • Substituting the approximate solutions obtained earlier in the more general WRM we obtain U ,V S0N H 01 A(V ,U ) (V , q) V S0N • More explicitly substituting U and V (remember we chose them to have the same base) and swapping summations and integrals we obtain N c A(f k 1 k j , fk ) (f j , q) , Joint Advanced Student School St.Petersburg 2005 j 1, 2 , ... , N 4.8 Connection to the Physical System Mechanical Formulation Mathematical Formulation 1 1 L U u ' EAu' dx 2 0 L A(v , u ) (v' pu 'vzu) dx 0 W qu dx (v , q ) U W 0 A(v , u ) (v , q) 0 0 Joint Advanced Student School St.Petersburg 2005 PART III Finite Element Discretization 5.0 Finite Element Discretization • Let us take the initial value problem with constant coefficients pu ' ' zu q( x), 0 x 1 p, z 0 u (0) u (1) 0. • As a first step let us divide the domain in N subintervals with the following mesh 0 x0 x1 ... xN 1 • Each subinterval ( x j 1 , x j ), j 1 : N is called finite element. Joint Advanced Student School St.Petersburg 2005 5.1 The Trial Basis • Next we select as a basis the so called “hat function”. x x j 1 x j x j 1 x x f j ( x) j 1 x j 1 x j 0 x j 1 x x j x j x x j 1 otherwise Joint Advanced Student School St.Petersburg 2005 5.1 The Trial Basis • With the basis in the previous slide we construct our approximate solution U(x) • It is interesting to note that the coefficients correspond to the values of U at the interior nodes Joint Advanced Student School St.Petersburg 2005 5.1 The Trial Basis • The problem at this point can be easily solved using the previously derived Galerkin’s Method N c A(f k 1 k j , fk ) (f j , q) , j 1, 2 , ... , N • A little more work is needed to convert this problem into matrix notation Joint Advanced Student School St.Petersburg 2005 5.2 Matrix Form of the Problem • Restricting U over the typical finite element we can write U ( x) c j 1f j 1 ( x) c jf j ( x) x [ x j 1 , x j ] • Which in turn can be written as U ( x) [c j 1 f j 1 ( x) c j 1 c j ] [f j 1 ( x) f j ( x)] f j ( x) cj x [ x j 1 , x j ] in the same way V ( x) [d j 1 f j 1 ( x) d j 1 d j ] [f j 1 ( x) f j ( x)] d f ( x ) j j Joint Advanced Student School St.Petersburg 2005 x [ x j 1 , x j ] 5.2 Matrix Form of the Problem • Taking the derivative U ' ( x) [c j 1 1 / h j c j 1 c j ] [1 / h j 1 / h j ] c 1 / h j j h j x j x j 1 x [ x j 1 , x j ] • Derivative of V is analogus V ' ( x) [d j 1 1 / h j d j 1 d j ] [1 / h j 1 / h j ] 1 / h d j j Joint Advanced Student School St.Petersburg 2005 x [ x j 1 , x j ] 5.2 Matrix Form of the Problem • The variational formula can be elementwise defined as follows: N [ A (V ,U ) (V , q) j 1 j j ]0 A j (V , U ) A Sj (V , U ) A Mj (V , U ) A (V , U ) S j xj x j 1 A (V , U ) M j xj x j 1 pV 'U ' dx zVU dx xj (V , q ) Vq dx x j 1 Joint Advanced Student School St.Petersburg 2005 4.3 The Element Stiffnes Matrix • Substituting U,V,U’ and V’ into these formulae we obtain A (V , U ) [d j 1 S j A (V ,U ) [d j 1 S j xj d j ] x j1 xj p d j ] x j1 h 2 j c j 1 1 / h j p [1 / h j 1 / h j ] dx cj 1/ hj c j 1 1 1 c j 1 1 1 dx c [d j 1 d j ]K j c j j p Kj hj 1 1 1 1 Joint Advanced Student School St.Petersburg 2005 4.4 The Element Mass Matrix • The same way x j f j 1 c j 1 A (V , U ) [d j 1 d j ] z [f j 1 f j ] dx x j1 f j cj c j 1 S A j (V , U ) [d j 1 d j ]M j cj M j zh j 2 1 Mj 6 1 2 Joint Advanced Student School St.Petersburg 2005 4.5 External Work Integral • The external work integral cannot be evaluated for every function q(x) xj (V , q) Vq dx x j 1 • We can consider a linear interpolant of q(x) for simplicity. q( x) q j 1f j 1 ( x) q jf j ( x), x [ x j 1 , x j ] • Substituting and evaluating the integral f j 1 q j 1 (V , q) j [d j 1 , d j ] [f j 1 , f j ] dx [d j 1 , d j ] l j x j 1 fj qj h j 2q j 1 q j lj Element load vector 6 q j 1 2q j xj Joint Advanced Student School St.Petersburg 2005 4.6 Assembling • Now the task is to assemble the elements into the whole system in fact we have to sum each integral over all the elements • For doing so we can extend the dimension of each element matrix to N and then put the 2x2 matrix at the appropriate position inside it • With all matrices and vectors having the same dimension the summation looks like N j 1 c1 c S T A j d Kc c 2 ... c N 1 d1 d d 2 ... d N 1 Joint Advanced Student School St.Petersburg 2005 2 1 1 2 1 1 2 1 p K ... ... ... h 1 2 1 1 2 4.6 Assembling • Doing the same for the Mass Matrix and for the Load Vector N M T A d Mc j j 1 N T ( V , q ) d l j j 1 4 1 1 4 1 zh 1 4 1 M ... ... ... 6 1 4 1 1 4 q0 4q1 q2 h q1 4q2 q3 l ... 6 q 4 q q N 1 N N 2 Joint Advanced Student School St.Petersburg 2005 4.7 Linear System of Equations • Substituting this Matrix form of the expressions in N [ A (V ,U ) (V , q) j 1 j j ]0 we obtain the following set of linear equations d T [(K M)c l] 0 • This has to be satisfied for all choices of d therefore (K M )c l 0 Joint Advanced Student School St.Petersburg 2005 References • Carlos Felippa http://caswww.colorado.edu/courses.d/IFEM.d/IFE M.Ch06.d/IFEM.Ch06.pdf • Joseph E Flaherty,Amos Eaton Professor http://www.cs.rpi.edu/~flaherje/FEM/fem1.ps • Gilbert Strang, George J. Fix An Analysis of the Finite Element Method Prentice-Hall,1973 Joint Advanced Student School St.Petersburg 2005