Chapter 6. Finite Element Method. Literature: (tiny selection from an enormous number of publications)

Similar documents
Lecture 9 Approximations of Laplace s Equation, Finite Element Method. Mathématiques appliquées (MATH0504-1) B. Dewals, C.

Scientific Computing I

AMS 529: Finite Element Methods: Fundamentals, Applications, and New Trends

Numerical Solution Techniques in Mechanical and Aerospace Engineering

The Conjugate Gradient Method

Sparse Linear Systems. Iterative Methods for Sparse Linear Systems. Motivation for Studying Sparse Linear Systems. Partial Differential Equations

ME Computational Fluid Mechanics Lecture 5

Scientific Computing WS 2017/2018. Lecture 18. Jürgen Fuhrmann Lecture 18 Slide 1

FINITE ELEMENT SOLUTION OF POISSON S EQUATION IN A HOMOGENEOUS MEDIUM

Chapter 9 Implicit integration, incompressible flows

Algebraic Multigrid as Solvers and as Preconditioner

Lehrstuhl Informatik V. Lehrstuhl Informatik V. 1. solve weak form of PDE to reduce regularity properties. Lehrstuhl Informatik V

FEM Convergence for PDEs with Point Sources in 2-D and 3-D

AMS 529: Finite Element Methods: Fundamentals, Applications, and New Trends

AMS526: Numerical Analysis I (Numerical Linear Algebra)

Divergence Formulation of Source Term

Numerical Analysis Comprehensive Exam Questions

Computation Fluid Dynamics

AMS526: Numerical Analysis I (Numerical Linear Algebra for Computational and Data Sciences)

The Discontinuous Galerkin Finite Element Method

Chapter Two: Numerical Methods for Elliptic PDEs. 1 Finite Difference Methods for Elliptic PDEs

Boundary Value Problems - Solving 3-D Finite-Difference problems Jacob White

Algorithms for Scientific Computing

Partial Differential Equations

Introduction to Heat and Mass Transfer. Week 7

Chapter 1: The Finite Element Method

FEniCS Course. Lecture 0: Introduction to FEM. Contributors Anders Logg, Kent-Andre Mardal

Solution of the Two-Dimensional Steady State Heat Conduction using the Finite Volume Method

Poisson Equation in 2D

Conservation Laws & Applications

Lecture 18 Classical Iterative Methods

A Hybrid Method for the Wave Equation. beilina

A High-Order Galerkin Solver for the Poisson Problem on the Surface of the Cubed Sphere

Introduction to Heat and Mass Transfer. Week 9

A simple FEM solver and its data parallelism

Numerical Methods of Applied Mathematics -- II Spring 2009

Notes for CS542G (Iterative Solvers for Linear Systems)

NUMERICAL COMPUTATION IN SCIENCE AND ENGINEERING

Finite Element Solver for Flux-Source Equations

Lecture 10b: iterative and direct linear solvers

INTRODUCTION TO FINITE ELEMENT METHODS ON ELLIPTIC EQUATIONS LONG CHEN

A Sobolev trust-region method for numerical solution of the Ginz

FINITE ELEMENT APPROXIMATION OF STOKES-LIKE SYSTEMS WITH IMPLICIT CONSTITUTIVE RELATION

The Plane Stress Problem

Elliptic Problems / Multigrid. PHY 604: Computational Methods for Physics and Astrophysics II

Stabilization and Acceleration of Algebraic Multigrid Method

The Finite Element Method

Galerkin Finite Element Model for Heat Transfer

MASSACHUSETTS INSTITUTE OF TECHNOLOGY DEPARTMENT OF MECHANICAL ENGINEERING CAMBRIDGE, MASSACHUSETTS NUMERICAL FLUID MECHANICS FALL 2011

Scientific Computing: An Introductory Survey

Solving PDEs with freefem++

Computational Methods for Engineering Applications II. Homework Problem Sheet 4

6. Iterative Methods for Linear Systems. The stepwise approach to the solution...

Middle East Technical University Department of Mechanical Engineering ME 413 Introduction to Finite Element Analysis. Chapter 2 Introduction to FEM

Nonparametric density estimation for elliptic problems with random perturbations

Department of Mathematics California State University, Los Angeles Master s Degree Comprehensive Examination in. NUMERICAL ANALYSIS Spring 2015

Numerical Optimization of Partial Differential Equations

LEAST-SQUARES FINITE ELEMENT MODELS

Multiphysics Modeling

Applied Numerical Analysis

Basic Aspects of Discretization

Moving interface problems. for elliptic systems. John Strain Mathematics Department UC Berkeley June 2010

Introduction. J.M. Burgers Center Graduate Course CFD I January Least-Squares Spectral Element Methods

A STUDY OF MULTIGRID SMOOTHERS USED IN COMPRESSIBLE CFD BASED ON THE CONVECTION DIFFUSION EQUATION

Lab 1: Iterative Methods for Solving Linear Systems

APPLIED NUMERICAL LINEAR ALGEBRA

ACM/CMS 107 Linear Analysis & Applications Fall 2017 Assignment 2: PDEs and Finite Element Methods Due: 7th November 2017

Solution Methods. Steady State Diffusion Equation. Lecture 04

Inverse Heat Flux Evaluation using Conjugate Gradient Methods from Infrared Imaging

2.29 Numerical Fluid Mechanics Spring 2015 Lecture 9

Non-Conforming Finite Element Methods for Nonmatching Grids in Three Dimensions

Continuous adjoint based error estimation and r-refinement for the active-flux method

9. Iterative Methods for Large Linear Systems

arxiv: v1 [physics.comp-ph] 27 Nov 2018

AIMS Exercise Set # 1

Discrete Projection Methods for Incompressible Fluid Flow Problems and Application to a Fluid-Structure Interaction

Discretization of PDEs and Tools for the Parallel Solution of the Resulting Systems

Linear Algebra. PHY 604: Computational Methods in Physics and Astrophysics II

Parallel Discontinuous Galerkin Method

Adaptive Finite Element Methods Lecture Notes Winter Term 2017/18. R. Verfürth. Fakultät für Mathematik, Ruhr-Universität Bochum

NUMERICAL METHODS FOR ENGINEERING APPLICATION

FINITE ELEMENT ANALYSIS USING THE TANGENT STIFFNESS MATRIX FOR TRANSIENT NON-LINEAR HEAT TRANSFER IN A BODY

Game Physics. Game and Media Technology Master Program - Utrecht University. Dr. Nicolas Pronost

Chapter 1. Introduction and Background. 1.1 Introduction

Introduction to Heat and Mass Transfer. Week 8

Kasetsart University Workshop. Multigrid methods: An introduction

Finite Elements. Colin Cotter. January 15, Colin Cotter FEM

Numerical Programming I (for CSE)

Classical iterative methods for linear systems

Course Notes: Week 1

A High-Order Discontinuous Galerkin Method for the Unsteady Incompressible Navier-Stokes Equations

Is My CFD Mesh Adequate? A Quantitative Answer

Lecture 17: Iterative Methods and Sparse Linear Algebra

Content. Department of Mathematics University of Oslo

An Introduction to Algebraic Multigrid (AMG) Algorithms Derrick Cerwinsky and Craig C. Douglas 1/84

Introduction to Scientific Computing

Math 411 Preliminaries

Part I. Discrete Models. Part I: Discrete Models. Scientific Computing I. Motivation: Heat Transfer. A Wiremesh Model (2) A Wiremesh Model

Implicit Solution of Viscous Aerodynamic Flows using the Discontinuous Galerkin Method

Numerical Solution I

Transcription:

Chapter 6 Finite Element Method Literature: (tiny selection from an enormous number of publications) K.J. Bathe, Finite Element procedures, 2nd edition, Pearson 2014 (1043 pages, comprehensive). Available as pdf at www.mit.edu. Aurélien Larcher, Niyazi Cem Degirmenci, Lecture Notes: The Finite Element Method, 2013. Concise and readable mathematical treatment, 40pp. Pdf available as course literature at www.kth.se/social/course/sf2561. Multiphysics cyclopedia, The Finite Element Method (FEM). https://www.comsol.de/multiphysics/finite-element-method. The present chapter including figures is mostly based on this exposition. The Finite Element Method (FEM) is an efficient approach to discretizing and numerically solving partial differential equations (PDEs) for some quantity u(x, t) (static or time dependent), which may describe quantities like the temperature distribution of a complex body, or mechanical shifts, electric currents, fluid flow, etc.. The method and its many variations have been developed since about the 1960s, with first beginnings much earlier. It is very widely applied especially in engineering, and many softwarepackages are available. The present chapter provides a brief introduction. Discretization and basis functions A basic ingredient of the Finite Element Method is the approximation of the desired solution u(x, t) of the PDEs as a linear combination of a carefully chosen finite set of basis functions ψ i (x) (also called shape functions). u(x, t) u h (x, t) := i u i (x, t) ψ i (x). (6.1) 118

Figure 6.1: Example for a set of local linear basis functions in one spatial dimension, and the corresponding approximation (thin red lines) of a function u(x) (blue line) as a linear combination of these basis functions. Left: equally spaced nodes x i. Right: adaptive discretization. An example is provided in Fig. 6.1. The finite number of coefficients makes the problem variational. FEM is related to the Ritz variational approach. In order to obtain suitable basis functions, space is divided into small elements, for example line segments in 1d, triangles in 2d, or tetraedra in 3d. The corner points of these elements are called nodes. The basis functions are usually chosen to have support only on a single or a few spatial elements, i.e. to be very local in space, and each even to be zero at the position of all nodes except one. Examples with linear basis functions on a triangular grid are provided in Fig. 6.2. Differential equation: example As an example we will look at the temperature T (x, t) in a solid. The relevant equation is ρ C p T + q = g(t, x, t), (6.2) where ρ is the density, C p the heat capacity, q(x, t) is the heat flux, and g(t, t, x) is a heat source, which might vary with temperature and time. The heat flux itself depends on temperature as q = k T, where k is the thermal conductivity, so that the differential equation for T (x, t) reads ρ C p T + ( k T ) = g(t, x, t). (6.3) 119

Figure 6.2: Example for a set of local linear basis functions on a 2 dimensional triangular grid. There is one basis function for each node. Left: Basis functions for nearest neighbor nodes have a non-zero overlap. Right: Basis functions for nodes at farther distances do not overlap. The temperature is further determined by the initial condition T (x, t 0 ) and by boundary conditions. We will now specifically look at a steady state, i.e. a time-independent situation. Then T = 0 and (6.3) becomes ( k T ) = g(t, x) in Ω, (6.4) where Ω is the spatial domain of the body which we want to describe. Typical boundary conditions are: (1) the temperature on some boundary Ω 1 : T (x) = T 0 (x) on Ω 1, (6.5) (2) the heat flux normal to some surface Ω 2 might be determined by an ambient temperature T amb, or it might be zero on some surface Ω 3 : ( k T ) n = h(t T amb ) on Ω 2, (6.6) ( k T ) n = 0 on Ω 3. (6.7) Here n is a unit vector normal to the respective boundary. Integral weak form of the differential equations The original physical problem is in continuous space and the differential equations have to be satisfied at every point x. When the solution is approximated by basis functions on discrete finite elements, derivatives become problematic. 120

For example, the first derivative of u(x) in Fig. 6.1 is discontinuous, so that the second derivative is defined only in the sense of a distribution. Such problems can be avoided by multiplying the PDE by a test-function ϕ(x) and integrating over space. Eq. (6.4) becomes ( k T ) ϕ dv = g(t ) ϕ dv (6.8) Ω This relation has to hold for any test function from a suitable Hilbert space. The solution T (x) is also assumed to belong to such a Hilbert space. This is the so-called weak formulation of the PDEs, which needs to hold only in an integral sense instead of a every point x. When the solution is differentiable enough, then together with the boundary conditions, eq (6.9) can be shown to be equivalent to the original PDE (6.4) (see e.g. Larcher et al.). Galerkin approach In the Galerkin approach, the test functions are taken from the same Hilbert space as the solution function. Eq (6.8) can be integrated by parts (Green s first identity) to obtain (k T ) ϕ dv + ( k T ) n ϕ ds = g(t ) ϕ dv. (6.9) Ω Ω We now approximate the solution as a linear combination of a finite number of basis functions ψ i like in eq. (6.1: Ω Ω T (x) T h (x) := i T i (x) ψ i (x). (6.10) These basis functions span our Hilbert space. Eq. (6.9 has to hold for every test function, which in the Galerkin approach are taken from the same Hilbert space. Thus it is sufficient if eq. (6.9 holds for every basis function ψ j as a test function. We then obtain the discretized form of eq. (6.9: T i (k ψ i ) ψ j dv + ( kt i ψ i ) n ψ j ds = g( T i ψ i ) ψ j dv. i Ω i Ω Ω i (6.11) (Note that on the right hand side, i T iψ i is not a factor, but the argument T of g(t ). If there are N basis functions ψ j, then eq. 6.11 is a system of N equations for N unknowns T i, which is now suitable for numerical treatment. Often, the source term g(t ) is a linear function of T. Then eq. 6.11 is linear in T i and can be written as a set of linear equations (!): A T h = b, (6.12) 121

for which many numerical approaches are available, for example Gauss elimination, Jacobi, Gauss-Seidel, or Conjugate Gradient methods. Here, T h is the vector of unknown coefficients T i. The matrix A is called system matrix or stiffness matrix (referring to early applications in structural mechanics). In FEM, it is usually not symmetric. When the source function is nonlinear, then one can write a similar equation, but with the vector b now a nonlinear function of the unknown coefficients T i, and more expensive non-linear numerical solvers like e.g. the Newton method need to be employed. It is very beneficial to use basis functions ψ i that are very local in space, like in figure 6.2. Then the integrals in eq. 6.11 are non-zero only for (e.g.) basis functions on nearest-neighbor nodes (!). Therefore the matrix A becomes sparse (namely almost diagonal) and thus much easier to solve. Time dependence In time-dependent cases, the time derivative in (6.3) needs to be included. In discretized form, we then get, similar to (6.11), T i ρ C p ψ i ψ j dv + T i (k ψ i ) ψ j dv (6.13) i Ω i Ω + ( kt i ψ i ) n ψ j ds = g( T ψ i ) ψ j dv, i Ω Ω i where now the coefficients T i are time-dependent, while the basis functions in this equation are still taken to be time-independent. One could generalize FEM to 3+1 dimensional elements, which is however computationally very demanding. Instead, time is treated separately, with two different approaches, both involving finite time steps t. One can approximate the time derivative as T i,t T i,t+ t T i,t. (6.14) t Let us assume that we already know the coefficients T i,t at time t and want to obtain T i,t+ t. The first approach is similar to Molecular Dynamics. Equation (6.13) is written for the coefficients T i,t at time t. Then T i,t+ t only occurs in the time derivative and can be directly computed. This is called an explicit time integration scheme and requires very small time steps t for stability and accuracy. In the second approach, Equation (6.13) is instead written for the coefficients T i,t+ t at time t + t. Now the known coefficients T i,t only appear in the time derivative and we get a linear system of equations for T i,t+ t, which needs to be solved at every time step. This implicit method allows for larger time steps, but each step is more expensive. 122

In practice, FEM routines switch between these approaches automatically, and also employ higher order polynomial expressions for the time derivative instead of the simple difference equation (6.13). Error estimates One way to estimate the reliability of an FEM solver for a specific problem is the method of manufactured solutions, in which a related problem with exactly known solution is treated by the solver. The output can then be compared to the known exact solution. Example: suppose we have a solver for the Poisson equation with boundary conditions 2 u(x) = g(x) in Ω (6.15) u(x) = 0 on Ω. (6.16) We now take a freely chosen function v(x) (for example the output of the solver for our actual problem) for which v(x) = 0 on Ω, take g(x) = 2 v(x), and compute an approximate solution v h (x) to (6.15) with our solver. We know that the exact solution to this problem is v(x) and we can now examine the difference to v h (x). Note that when we take v(x) to be a previous output from our solver and and use the same discretization and basis functions for the error estimate, then this method does not provide information about any features lost by the discretization. Formally exact error bounds for specific quantities can sometimes be obtained a posteriori (see Larcher et al.). However, they involve bounds on matrix elements of the inverse of the adjoint of the matrix A, which are very difficult to obtain reliably in a numerical calculations, so that an actual bound may become too large to be useful. Other error estimates may be obtained from the (potentially misleading) convergence of results when using smaller and smaller elements. Basis function refinements and mesh adaptations The basis functions need not be linear functions on their elements like in Figs. 6.1 and 6.2. In figure 6.3, first and second order Lagrange elements are shown, on square spatial elements. Higher order basis functions have the advantage of better approximating the true solution u(x) on a given discrete mesh. On the other hand, there are more higher order basis functions, so that the computational effort increases. Alternatively, one can therefore use simple basis functions on a finer mesh. 123

Figure 6.3: The shape functions (basis functions) for a first-order (left) and second order (right) square Lagrange element. The corresponding 1d functions would be Lagrange polynomials. Figure 6.4: Temperature around a heated cylinder subject to a flow, computed without (top) and with (bottom) mesh refinement. 124

The spatial discretization elements can and should of course be adapted to the problem. One can for example use spatial elements with curved boundaries to better represent a given body. The adaptions can also be done iteratively according to a first approximate solution, e.g. by using a finer grid where more precision is needed, for example because of large gradients. An example is shown in figure 6.4. 125