Introduction To Finite Element Modelling In Geosciences

3y ago
38 Views
5 Downloads
1.08 MB
81 Pages
Last View : 2m ago
Last Download : 3m ago
Upload by : Samir Mcswain
Transcription

Introduction to Finite ElementModelling in GeosciencesDave A. May (dave.may@erdw.ethz.ch)Marcel Frehner (marcel.frehner@erdw.ethz.ch)Mike Afanasiev (ETH Zürich)Patrick Sanan (USI Lugano)651-4144-00L Introduction to Finite Element Modelling in GeosciencesETH Zürich, Sonneggstrasse 5, 8092 Zürich, SwitzerlandJuly 27 - 31, 2015

ContentsContentsi1 Preface12 Basic Principles2.1 Introduction . . . . . . . . . . . . . . . . . .2.2 The Finite Element Method . . . . . . . . .2.3 One-dimensional, time dependent diffusion2.4 Exercises . . . . . . . . . . . . . . . . . . .3344113 Time for Programming3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3.2 The FE procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3.3 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .131314174 Numerical Integration4.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4.2 Quadrature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4.3 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .191920235 The Diffusion Equation: From 1D to 2D5.1 Introduction . . . . . . . . . . . . . . .5.2 Derivation of the element matrices . .5.3 Integration of the element matrices . .5.4 Assembling the global stiffness matrix5.5 Exercises . . . . . . . . . . . . . . . .2525262931346 The Weak Form6.1 A prototype PDE . . . .6.2 The weak form . . . . .6.3 The discrete weak form6.4 Further reading . . . . .35353536377 Elasticity in Two Dimensions7.1 Introduction . . . . . . . .7.2 Governing equations . . .7.3 FE discretisation . . . . .7.4 Matrix assembly . . . . .3939394041i

CONTENTSii7.5 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .438 Stokes Flow in Two Dimensions8.1 Governing equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8.2 FE discretisation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8.3 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .454547499 Code Verification9.1 Introduction . . . . . . . . . . . . . . . . . . . .9.2 Taylor series approximations . . . . . . . . . .9.3 Errors and norms . . . . . . . . . . . . . . . . .9.4 Measuring the order of accuracy . . . . . . . .9.5 The Method of Manufactured Solutions (MMS)9.6 Exercises . . . . . . . . . . . . . . . . . . . . .51515151545558A MATLAB IntroductionA.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .A.2 Useful linear algebra . . . . . . . . . . . . . . . . . . . . . . . . . . . . .A.3 Exploring MATLAB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .61616162B Useful Formulae67C 1D Steady State Diffusion MATLAB Example69D MMS 1D Diffusion Example71E MMS Order of Accuracy Example75F MMS SymPy Example77.

1PrefaceObjectivesThe emphasis of this course is to learn the fundamentals of the Finite Element (FE)method, and as importantly, that you learn to write a FE code from scratch. We presentwhat we regard as the minimum amount of theory necessary to understand and implement the FE method. As such, this class is definitely a “hands-on” practical introductionto finite elements.We encourage people to work on the exercises provided in these notes at their ownspeed. It is common that not every one is able to complete all of the exercises withina one week (all day) time period. In the past, we have had students take the classtwo (or three) years in a row. Don’t be discouraged if your progress in completing theexercises diminishes after day three.PrerequisitesFor teaching purposes, we advocate using MATLAB to implement your first FE code. Ifyou are new to MATLAB, or have forgotten some of the essentials, in Appendix A youcan find a small MATLAB refresher tutorial.It is also highly advantageous if you already followed a class on programming thefinite difference method; e.g. 651-4273-00L: “Numerical Modelling in Fortran” (PaulTackley) or 651-4241-00L: “Numerical Modelling I and II: Theory and Applications”(Taras Gerya)Our rational to use MATLAB for teaching is based upon the following three facts:1. MATLAB provides users with a complete development environment including:(i) a text editor; (ii) run-time error checking of array indices; (iii) a powerful debugger.2. MATLAB contains a wide variety of visualisation routines.3. MATLAB contains data-structures to describe sparse matrices and includes efficient sparse-direct solvers.Further ReadingIn addition to these notes, we recommend the following textbooks: The Finite Element Method using MATLAB. Y. W. Kwon and H. Bang (1997), CRCPress.1

CHAPTER 1. PREFACE2 The Finite Element Method, Vol. 1. O. C. Zienkiewicz and R. L. Taylor (2000),McGraw-Hill. Programming the Finite Element Method. I. M. Smith and D. V. Griffiths (1998),John Wiley & Sons. The Finite Element Method. T. J. R. Hughes (2000), Prentice-Hall. Finite Elements and Fast Iterative Solvers. H. C. Elman, D. J. Silvester & A.Wathan (2005), Oxford University Press. The Mathematical Theory of Finite Element Methods. S. C. Brenner & L. R. Scott(2005), Springer. Computational Techniques for Fluid Dynamics, Vol. 1. C. A. J. Fletcher (2000),Springer.More background on finite elements and there application in computational geodynamics, can be found in these references: Computational Geodyamics. A. Ismail-Zadeh and P. J. Tackley (2010), Cambridge University Press. Numerical Modeling of Earth Systems: An introduction to computational methodswith focus on solid Earth applications of continuum mechanics. Lecture notes,University of SouthernCalifornia, Becker and Kaus (2014). Available at http://geodynamics.usc.edu/ becker/preprints/Geodynamics557.pdf Finite Element block course: “Introduction to Finite Element Modelling in Geosciences” - ETH Zürich. Lecture notes, available at http://jupiter.ethz.ch/ iences.htmlAcknowledgementsThis class is built upon previous finite element classes taught at ETH which were established by Guy Simpson (now at University of Geneva), Boris Kaus (now at JohannesGutenberg University Mainz) and Stefan Schmalholz (now at University of Lausanne).

2Basic Principles2.1IntroductionThe purpose of this course is to learn how to solve differential equations with the FiniteElement Method (FEM). For the most part we assume that the equations governing theprocesses of interest are known and given. We will focus on the practical process ofhow one goes from the equation, to obtaining an approximate (numerical) solution. Although there are a variety of numerical techniques that one can use to obtain numericalsolutions, here we will focus solely on the FEM.The process of obtaining a computational solution consists of two stages shownschematically in Figure 2.1. The first stage converts the continuous partial differentialequation (PDE) and auxiliary (boundary and initial) conditions into a discrete systemof algebraic equations. This first stage is called discretisation. The second stageinvolves solving the system of algebraic equations to obtain an approximate solutionto the original partial differential equation. The solution is approximate since errorsare introduced by the replacement of continuous differential terms in the governingpartial differential equation by algebraic expressions connecting nodal values on a finitegrid. Errors are also introduced during the solution stage but these tend to be small incomparison to discretisation errors, unless the method failed to converge.To convert the governing partial differential equation to a system of algebraic equations (or ordinary differential equations) a number of choices are available. The mostcommon are the finite difference, finite element, finite volume and spectral methods.In principle, the solution does not depend on the method chosen. Each method hasits own advantages and disadvantages. The best approach is to choose the methodwhich best suits the problem being investigated. This course will only deal with thefinite element method, which is widely used in practice and is extremely powerful. Thetechnique is slightly harder to learn than, for example, the finite difference technique.However, as you will see, the effort invested in initially learning the FEM pays of due tothe wide range of problems that the method is capable of solving. The FEM is especially well suited (though not restricted) to solving mechanical problems and problemswith domains which are geometrically complex. Another advantage of programmingin the finite element method is that the main structure of the code remains the same,even when the method is applied to different physical problems. Thus, once you learnthis basic structure, you can modify it to solve a variety of problems with minimal effort.3

CHAPTER 2. BASIC PRINCIPLES4Figure 2.1: Overview of the computational solution technique.2.2The Finite Element MethodThe finite element method is a technique for solving partial differential equations. Usually, only the spatial derivatives are discretised with the finite element method whereasfinite differences are used to discretise time derivatives. Spatial discretisation is carriedout locally over small regions of simple but arbitrary shaped elements (the finite elements). This discretisation process results in matrix equations relating the loads (input)at specified points in the element (called nodes) to the displacements (output) at thesesame points. In order to solve equations over larger regions, one sums node-by-nodethe matrix equations for the smaller sub-regions (elements) resulting in a global matrixequation. This system of equations can then be solved simultaneously by standardlinear algebra techniques to yield nodal displacements. This last step completes thenumerical solution of the differential equation.2.3One-dimensional, time dependent diffusionThe various steps involved in performing the finite element method are best illustratedwith a simple example. Consider the following partial differential equation T T κ(x) s(x),(2.1) t x xwhich governs transient heat conduction in one dimension with a source term s(x).The dependent variable in this equation is the temperature T (x, t), the independentvariables are time t, distance x, κ(x) the thermal diffusivity and s(x) the source. Weare interested in computing the temperature function T (x, t) which satisfies Equation(2.1) (i.e., the solution) over the domain Ω [xA , xB ] subject to either (i) Dirichletboundary conditions of the formT (xA , t) TAT (xB , t) TB ,(2.2)where TA , TB are prescribed temperatures, or (ii) Neumann boundary conditions of theform T qAκ x x xA ,t(2.3) Tκ qB , x x xB ,twhere qA , qB are prescribed fluxes, or (iii) some mixture of Dirichlet and Neumannconditions. We also require an initial conditionT (x, t 0) T0 (x).(2.4)

2.3. ONE-DIMENSIONAL, TIME DEPENDENT DIFFUSION5The first step of the finite element method involves choosing an element type whichdefines where and how the discretisation is carried out. The simplest element for onedimensional problems is a 2-node element (Figure 2.2a). As we will see, one canuse more nodes per element which will have the effect of increasing accuracy, butalso increasing the amount of equations and thus the cost of obtaining the numericalsolution.The second step of the finite element method involves approximating the continuous variable T in terms of nodal variables Ti using simple functions Ni (x) called shapefunctions. If one focuses on one element (which contains 2 nodes), and one assumesthat temperature varies linearly between two nodes, one can writeT (x) N1 (x)T1 N2 (x)T2 ,(2.5) T1T (x) N1 (x) N2 (x) NT.T2(2.6)or, using matrix notation In these equations, T is the continuous variable which we are approximating withinany given element in terms of the temperatures at the two nodes T1 and T2 . Since wemade the choice that temperature varies linearly between two nodes, we have to usethe following shape functions,N1 (x) 1 x,LN2 (x) x,L(2.7)where L is the length of the element and x is the spatial variable which varies from 0at node 1 to L at node 2 (Figure 2.2b). Note the following important properties of theshape functions N1 1 at node 1 while N1 0 at node 2. N2 0 at node 1 while N2 1 at node 2. N1 (x) N2 (x) 1 (over the entire element). The functions are only local (i.e., they only connect adjacent nodes).Note that the shape functions are simply interpolating functions (i.e., they are usedto interpolate the solution over a finite element). Also, as will become clear in thefollowing lectures, the choice of the shape functions is directly related to the choice ofan element type. For example in one-dimension, variation in a 2-node element cannotbe uniquely described by a function with an order greater than linear (two parametermodel), variation in a 3-node element cannot be uniquely described by a function withan order greater than quadratic (three parameter model), etc.The next step of the finite element method is to substitute our approximation for thecontinuous variable into the governing differential equation. Thus, substituting Equation(2.6) into Equation (2.1) leads to T1 T1 N1 (x) N2 (x)N1 (x) N2 (x) κ(x) s(x) R, (2.8)T2T2 t x xwhere R (the residual) is a measure of the error introduced during discretisation. Notethat the original partial differential equation has now been replaced by an equation in

CHAPTER 2. BASIC PRINCIPLES6node 1a)1-D elementnode 2dxx 0b)N(x)x dxN1N2node 1node 2x 0x dxc)node 1node 2element 1x 0node 3element 2node 4element 3node 5element 4x LxFigure 2.2: a) a 2-node, one dimensional finite element with b) linear shape functions,and c) a small one dimensional mesh consisting of four elements and a total of fivenodes. See text for discussion.the discretised (nodal) variables T1 and T2 . Thus, we now have one equation for twounknowns, which obviously cannot be solved. The problem now reduces to findingvalues for T1 and T2 such that the residual is minimized (ideally R is zero as in theoriginal equation). However to do so, we have to generate a system of equationswhere the number of equations equals the number of unknowns.In the finite element method, the unknown coefficients Ti are determined by requiring that the integral of the weighted residual is zero on an element basis. To achievethis step practically, one must multiply (or “weight”) the residual in Equation (2.8) by aset of weighting functions (each in turn), integrate over the element volume and equateto zero. Many methods (e.g., collocation, least squares and Galerkin) can be usedto achieve this process, the difference between which depends on the choice of theweighting functions. In this course we will only consider the Galerkin method. In theGalerkin method, the weighting functions are chosen to be identical to the shape func-

2.3. ONE-DIMENSIONAL, TIME DEPENDENT DIFFUSION7tions N . By carrying out the steps just described one obtainsL T1N1 N1 N2dxT2N2 t0 Z L Z L T1 N1 N10N1 N2s(x) dx . (2.9) dx κ(x)NN0T x x22200ZNote that in this example where the shape functions are linear, double differentiation of these functions would cause them to vanish (obviously not very desirable).This difficulty is resolved by applying Green’s theorem (integration by parts). In onedimension, applied over the volume Ω [xA , xB ] this yieldsZ Ni xΩ Z Nj Nj Ni Njκ(x)dx κ(x)dx κ(x)Ni x x x xΩxB.(2.10)xAWe note that the final term in the above expression which is evaluated at the endpoints of the domain corresponds to a discrete flux. By invoking Green’s theorem, wehave implicitly introduced the Neumann boundary condition (see Equation (2.3)) intoour discretisation. We will assume that κ(x) and s(x) are constant over each elementvolume [xA , xB ] and the constant values are denoted by κ̄ and s̄ respectively. Notethat these choices do not preclude using a spatially dependent value for κ or s overthe entire model domain, it only places a restriction on how these coefficients may varywithin an element. Under these assumptions and using Equation (2.10), we can writeEquation (2.9) as ZLZL N1 N1 dxN1 N2 dx T1 Z0 L0 ZL t T2N2 N1 dxN2 N2 dx00 Z L Z L N1 N1 N1 N2dxdx x x x x 00 T1Z L κ̄ Z L N2 N1 N2 N2 T2dxdx x x x x0 0Z L NqNdx1 1 A xA 0 0Z. (2.11) s̄ L 0N2 qBN2 dxxB0Note that one now has two equations for the two unknowns T1 and T2 as desired. Onevaluating the integrals (using N defined in Equation (2.7)), Equation (2.11) becomes"L3L6L6L3#" #" 1 T1 κ̄ L1 t T2 L L11L# "L# " N1 qAT1 s̄ L2 T2N2 qB2which can be simplified using matrix notation to the following TMM KM T F, t#xAxB 0 ,0(2.12)(2.13)

CHAPTER 2. BASIC PRINCIPLES8where L L MM 3 6 ,L L6 3 11 L ,KM κ̄ L1 1 LL LN q 1 A xA F s̄ 2 ,LN2 qBxB2 (2.14)(2.15)(2.16)and TT 1 .T2(2.17)Remark: We note that our notation for matrices is somewhat unconventional inthat two letters are used to define a matrix. This notation style is purely historical.Please do not ever assume that MM implies raising the matrix M to the power 2,e.g. it does not mean M2 .The next step we perform is to discretise the time derivative. Here this is achievedusing a finite difference approximation. Assuming an implicit time discretisation, oneapproximates Equation (2.13) as MMTn 1 Tn t KM Tn 1 F,(2.18)where Tn 1 is the future temperature at the nodes (i.e., the unknowns) and Tn is thevector of old (i.e., known) temperatures. Rearranging, one can write this as 11MM KM Tn 1 MM Tn F,(2.19) t tor more compactly asKL Tn 1 KR Tn F,(2.20)whereLκ̄ KL 3 t LLκ̄ 6 t L Lκ̄ 6 t L Lκ̄ 3 t L(2.21) L6 t L3 t(2.22)andL KR 3 tL6 t

2.3. ONE-DIMENSIONAL, TIME DEPENDENT DIFFUSION9and the F vector is 1" #qA 2 .F s̄L 1qB2In Equation (2.20), everything appearing on the right hand side is known (and itcombines to form a vector). The matrix KL is referred to as the element stiffness matrixwhereas T is the unknown element vector (and the subscript n 1 has been dropped forclarity). For the purposes of following discussions we introduce the following notation: KL11 KL12KL .KL21 KL22LThus, for example, the term KL11 has the value 3 t Lκ̄ . Similar notation is assumedfor KR.Remember that so far we have only carried out discretisation for a single element,whereas we generally want to divide the solution domain into many elements so asto obtain an accurate solution. Accordingly, let us consider a small one-dimensionalmesh, consisting of four elements (once you get the idea you can easily consider moreelements). This situation is depicted in Figure 2.2c. Now, instead of having just twounknowns, we have five, related to the five nodes in the mesh. One now generatesa global matrix equation by summing node-by-node the matrix equation derived fora single element (i.e., Equation (2.12)). Thus, for example, note that whereas node1 contains a contribution only from element 1, node 2 has contributions from bothelements 1 and 2 (Figure 2.2c). Performing this process (using the notation introducedabove and assuming that each element matrix is the same) leads to n 1KL11KL12000T1 KL21 KL22 KL11 KL0012 T2 0 KL21KL22 KL11KL120 T3 00KL21KL22 KL11 KL12 T4 000KL21KL22T5 nT1KR11KR12000 KR21 KR22 KR11 KR0012 T2 KR21KR22 KR11K

Introduction to Finite Element Modelling in Geosciences Dave A. May (dave.may@erdw.ethz.ch) Marcel Frehner (marcel.frehner@erdw.ethz.ch) Mike Afanasiev (ETH Zurich) Patrick Sanan (USI Lugano) 651-4144-00L Introduction to Finite Element Modelling in Geosciences ETH Zurich, Sonneggstrasse 5, 8092 Z urich, Switzerland July 27 - 31, 2015

Related Documents:

Finite element analysis DNV GL AS 1.7 Finite element types All calculation methods described in this class guideline are based on linear finite element analysis of three dimensional structural models. The general types of finite elements to be used in the finite element analysis are given in Table 2. Table 2 Types of finite element Type of .

Finite Element Method Partial Differential Equations arise in the mathematical modelling of many engineering problems Analytical solution or exact solution is very complicated Alternative: Numerical Solution – Finite element method, finite difference method, finite volume method, boundary element method, discrete element method, etc. 9

2.7 The solution of the finite element equation 35 2.8 Time for solution 37 2.9 The finite element software systems 37 2.9.1 Selection of the finite element softwaresystem 38 2.9.2 Training 38 2.9.3 LUSAS finite element system 39 CHAPTER 3: THEORETICAL PREDICTION OF THE DESIGN ANALYSIS OF THE HYDRAULIC PRESS MACHINE 3.1 Introduction 52

Chapter 2: Finite Element Analysis 17 2.1 Introduction 18 2.2 Steps Required 20 Chapter 3: Literature Review 22 Chapter 4: Experimental Setup 26 . Chapter 5: Finite Element Modelling and Analysis 33 5.1 Distribution of temperature of workpiece 34 5.2 Modelling of Chip Tool Interface 43 Chapter 6: Results and Discussions 48 .

1 Overview of Finite Element Method 3 1.1 Basic Concept 3 1.2 Historical Background 3 1.3 General Applicability of the Method 7 1.4 Engineering Applications of the Finite Element Method 10 1.5 General Description of the Finite Element Method 10 1.6 Comparison of Finite Element Method with Other Methods of Analysis

3.2 Finite Element Equations 23 3.3 Stiffness Matrix of a Triangular Element 26 3.4 Assembly of the Global Equation System 27 3.5 Example of the Global Matrix Assembly 29 Problems 30 4 Finite Element Program 33 4.1 Object-oriented Approach to Finite Element Programming 33 4.2 Requirements for the Finite Element Application 34 4.2.1 Overall .

Figure 3.5. Baseline finite element mesh for C-141 analysis 3-8 Figure 3.6. Baseline finite element mesh for B-727 analysis 3-9 Figure 3.7. Baseline finite element mesh for F-15 analysis 3-9 Figure 3.8. Uniform bias finite element mesh for C-141 analysis 3-14 Figure 3.9. Uniform bias finite element mesh for B-727 analysis 3-15 Figure 3.10.

한국어 Korean (language) 머리 head 다리 leg 손가락 finger 귀 ear 팔 arm 눈 eye 입 mouth 배 stomach 버스 bus 배 boat 우리 we/us Adverbs: 싸다 아주 very 매우 very 너무 too (often used to mean ‘very’) Verbs: 먹다 to eat 가다 to go 만나다 to meet 닫다 to close 열다 to open 원하다 to want (an object) 만들다 .