Finite Difference, Finite Element And Finite Volume .

3y ago
14 Views
2 Downloads
1.71 MB
148 Pages
Last View : 19d ago
Last Download : 3m ago
Upload by : Grant Gall
Transcription

Finite Difference, Finite Element and FiniteVolume Methods for the Numerical Solution ofPDEsVrushali A. Bokilbokilv@math.oregonstate.eduandNathan L. Gibsongibsonn@math.oregonstate.eduDepartment of MathematicsOregon State UniversityCorvallis, ORDOE Multiscale Summer SchoolJune 30, 2007Multiscale Summer School – p. 1

Math Modeling and Simulation of Physical Processes Define the physical problemMultiscale Summer School – p. 2

Math Modeling and Simulation of Physical Processes Define the physical problem Create a mathematical (PDE) model Systems of PDEs, ODEs, algebraic equationsDefine Initial and or boundary conditions to get awell-posed problemMultiscale Summer School – p. 2

Math Modeling and Simulation of Physical Processes Define the physical problem Create a mathematical (PDE) model Systems of PDEs, ODEs, algebraic equationsDefine Initial and or boundary conditions to get awell-posed problemCreate a Discrete (Numerical) Model Discretize the domain generate the grid obtaindiscrete modelSolve the discrete systemMultiscale Summer School – p. 2

Math Modeling and Simulation of Physical Processes Define the physical problem Create a mathematical (PDE) model Define Initial and or boundary conditions to get awell-posed problemCreate a Discrete (Numerical) Model Systems of PDEs, ODEs, algebraic equationsDiscretize the domain generate the grid obtaindiscrete modelSolve the discrete systemAnalyse Errors in the discrete system Consistency, stability and convergence analysisMultiscale Summer School – p. 2

Contents Partial Differential Equations (PDEs)Multiscale Summer School – p. 3

Contents Partial Differential Equations (PDEs)Conservation Laws: Integral and DifferentialFormsMultiscale Summer School – p. 3

Contents Partial Differential Equations (PDEs)Conservation Laws: Integral and DifferentialFormsClassification of PDEs: Elliptic, parabolic andHyperbolicMultiscale Summer School – p. 3

Contents Partial Differential Equations (PDEs)Conservation Laws: Integral and DifferentialFormsClassification of PDEs: Elliptic, parabolic andHyperbolicFinite difference methodsMultiscale Summer School – p. 3

Contents Partial Differential Equations (PDEs)Conservation Laws: Integral and DifferentialFormsClassification of PDEs: Elliptic, parabolic andHyperbolicFinite difference methodsAnalysis of Numerical Schemes: Consistency,Stability, ConvergenceMultiscale Summer School – p. 3

Contents Partial Differential Equations (PDEs)Conservation Laws: Integral and DifferentialFormsClassification of PDEs: Elliptic, parabolic andHyperbolicFinite difference methodsAnalysis of Numerical Schemes: Consistency,Stability, ConvergenceFinite Volume and Finite element methodsMultiscale Summer School – p. 3

Contents Partial Differential Equations (PDEs)Conservation Laws: Integral and DifferentialFormsClassification of PDEs: Elliptic, parabolic andHyperbolicFinite difference methodsAnalysis of Numerical Schemes: Consistency,Stability, ConvergenceFinite Volume and Finite element methodsIterative Methods for large sparse linear systemsMultiscale Summer School – p. 3

Partial Differential Equations PDEs are mathematical models of continuous physicalphenomenon in which a dependent variable, say u, is afunction of more than one independent variable, say t (time),and x (eg. spatial position).Multiscale Summer School – p. 4

Partial Differential Equations PDEs are mathematical models of continuous physicalphenomenon in which a dependent variable, say u, is afunction of more than one independent variable, say t (time),and x (eg. spatial position).PDEs derived by applying a physical principle such asconservation of mass, momentum or energy. Theseequations, governing the kinematic and mechanicalbehaviour of general bodies are referred to as ConservationLaws. These laws can be written in either the strong ofdifferential form or an integral form.Multiscale Summer School – p. 4

Partial Differential Equations PDEs are mathematical models of continuous physicalphenomenon in which a dependent variable, say u, is afunction of more than one independent variable, say t (time),and x (eg. spatial position).PDEs derived by applying a physical principle such asconservation of mass, momentum or energy. Theseequations, governing the kinematic and mechanicalbehaviour of general bodies are referred to as ConservationLaws. These laws can be written in either the strong ofdifferential form or an integral form.Boundary conditions, i.e., conditions on the (finite)boundary of the domain ann/or initial conditions (fortransient problems) are required to obtain a well posedproblem.Multiscale Summer School – p. 4

PDEs (continued) For simplicity, we will deal only with singlePDEs (as opposed to systems of several PDEs)with only two independent variables, either two space variables, denoted by x andy, or one space variable denoted by x and one timevariable denoted by tMultiscale Summer School – p. 5

PDEs (continued) For simplicity, we will deal only with singlePDEs (as opposed to systems of several PDEs)with only two independent variables, either two space variables, denoted by x andy, or one space variable denoted by x and one timevariable denoted by tPartial derivatives with respect to independentvariables are denoted by subscripts, for example ut u t uxy 2u x yMultiscale Summer School – p. 5

Well Posed Problems Boundary conditions, i.e., conditions on the(finite) boundary of the domain and/or initialconditions (for transient problems) are required toobtain a well posed problem.Multiscale Summer School – p. 6

Well Posed Problems Boundary conditions, i.e., conditions on the(finite) boundary of the domain and/or initialconditions (for transient problems) are required toobtain a well posed problem.Properties of a well posed problem: Solution exists Solution is unique Solution depends continuously on the dataMultiscale Summer School – p. 6

Classifications of PDEs The Order of a PDE the highest-order partialderivative appearing in it. For example, The advection equation ut ux 0 is a firstorder PDE. The Heat equation ut uxx is a second orderPDE.Multiscale Summer School – p. 7

Classifications of PDEs The Order of a PDE the highest-order partialderivative appearing in it. For example, The advection equation ut ux 0 is a firstorder PDE. The Heat equation ut uxx is a second orderPDE.A PDE is linear if the coefficients of the partialderivates are not functions of u, for example The advection equation ut ux 0 is a linearPDE. The Burgers equation ut uux 0 is anonlinear PDE.Multiscale Summer School – p. 7

Classifications of PDEs (continued)Second-order linear PDEs of general formauxx buxy cuyy dux euy f u g 0are classified based on the value of the discriminant b2 4ac b2 4ac 0: hyperbolic e.g., wave equation : u uttxx 0 Hyperbolic PDEs describe time-dependent, conservative physicalprocesses, such as convection, that are not evolving toward steadystate.Multiscale Summer School – p. 8

Classifications of PDEs (continued)Second-order linear PDEs of general formauxx buxy cuyy dux euy f u g 0are classified based on the value of the discriminant b2 4ac b2 4ac 0: hyperbolic e.g., wave equation : u uttxx 0 Hyperbolic PDEs describe time-dependent, conservative physicalprocesses, such as convection, that are not evolving toward steadystate. b2 4ac 0: parabolic e.g., heat equation utt uxx 0 Parabolic PDEs describe time-dependent dissipative physicalprocesses, such as diffusion, that are evolving toward steady state.Multiscale Summer School – p. 8

Classifications of PDEs (continued)Second-order linear PDEs of general formauxx buxy cuyy dux euy f u g 0are classified based on the value of the discriminant b2 4ac b2 4ac 0: hyperbolic e.g., wave equation : u uttxx 0 Hyperbolic PDEs describe time-dependent, conservative physicalprocesses, such as convection, that are not evolving toward steadystate. b2 4ac 0: parabolic e.g., heat equation utt uxx 0 Parabolic PDEs describe time-dependent dissipative physicalprocesses, such as diffusion, that are evolving toward steady state.b2 4ac 0: elliptic e.g., Laplace equation: uxx uyy 0 Elliptic PDEs describe processes that have alreay reached steadystates, and hence are time-independent.Multiscale Summer School – p. 8

Parabolic PDEs: Initial-Boundary value problems Example: One dimensional (in space) Heat Equation for u u(t, x)ut κuxx , 0 x L, t 0Multiscale Summer School – p. 9

Parabolic PDEs: Initial-Boundary value problems Example: One dimensional (in space) Heat Equation for u u(t, x)ut κuxx , 0 x L, t 0 with Boundary conditions: u(t, 0) u0 , u(t, L) uL , and Initial conditions: u(0, x) g(x)Multiscale Summer School – p. 9

Parabolic PDEs: Initial-Boundary value problems Example: One dimensional (in space) Heat Equation for u u(t, x)ut κuxx , 0 x L, t 0 with Boundary conditions: u(t, 0) u0 , u(t, L) uL , and Initial conditions: u(0, x) g(x)tdomain of influencetppdomain of dependence00xpLxMultiscale Summer School – p. 9

Elliptic PDEs: Boundary value problems Example: Model of steady heat conduction in a two dimensional (inspace) domain, governed by the Laplace equation for the temperatureT T (x, y)Txx Tyy 0, 0 x W, 0 y HMultiscale Summer School – p. 10

Elliptic PDEs: Boundary value problems Example: Model of steady heat conduction in a two dimensional (inspace) domain, governed by the Laplace equation for the temperatureT T (x, y)Txx Tyy 0, 0 x W, 0 y H with boundary conditions T (x, 0) T1 , T (x, H) T3 T (0, y) T4 , T (W, y) T2Multiscale Summer School – p. 10

Elliptic PDEs: Boundary value problems Example: Model of steady heat conduction in a two dimensional (inspace) domain, governed by the Laplace equation for the temperatureT T (x, y)Txx Tyy 0, 0 x W, 0 y H with boundary conditions T (x, 0) T1 , T (x, H) T3 T (0, y) T4 , T (W, y) T2yT3HT4T2ypp00T1xpWxMultiscale Summer School – p. 10

Hyperbolic PDEs: Initial-Boundary value problems Example: One-dimensional (in space) wave equation for u u(t, x)utt c2 uxx , 0 x L, t 0Multiscale Summer School – p. 11

Hyperbolic PDEs: Initial-Boundary value problems Example: One-dimensional (in space) wave equation for u u(t, x)utt c2 uxx , 0 x L, t 0 with boundary conditions Boundary conditions u(t, 0) u0 , u(t, L) uL Initial Conditions u(0, x) f (x), ut t 0 g(x)Multiscale Summer School – p. 11

Hyperbolic PDEs: Initial-Boundary value problems Example: One-dimensional (in space) wave equation for u u(t, x)utt c2 uxx , 0 x L, t 0 with boundary conditions Boundary conditions u(t, 0) u0 , u(t, L) uL Initial Conditions u(0, x) f (x), ut t 0 g(x)tdomain ofinfluenceptp c0–cdomainof dependence0xpLxMultiscale Summer School – p. 11

Finite Difference Methods (FDM): Discretization Suppose that we are solving for u u(t, x) on the domainΩ [0, T ] [0, L]. we discretize the domain Ω by partitioning thespatial interval [0, L] into m 2 grid pointsx0 , x1 , . . . , xm , xm 1 L, such that xj xj 1 xj , j 0, 1, 2, . . . mIn the case that the m 2 spatial points xj are equally spaced, we have x xj , jq0 x0qqqqx1x2.qqxj 1 xj x -qqxj 1.qqxm xm 1x LMultiscale Summer School – p. 12

Finite Difference Methods (FDM): Discretization Suppose that we are solving for u u(t, x) on the domainΩ [0, T ] [0, L]. we discretize the domain Ω by partitioning thespatial interval [0, L] into m 2 grid pointsx0 , x1 , . . . , xm , xm 1 L, such that xj xj 1 xj , j 0, 1, 2, . . . mIn the case that the m 2 spatial points xj are equally spaced, we have x xj , jq0 x0qqqqx1x2.qqxj 1 xj x -qqxj 1.qqxm xm 1x L We similarly discretize the temporal domain [0, T ] into discrete timelevels tk with time step k t.Multiscale Summer School – p. 12

Finite Difference Methods: Discretization The numerical solution to the PDE is an approximation to the exactsolution that is obtained using a discrete represntation to the PDE at thegrid points xj in the discrete spatial mesh at every time level tk . Let usdenote this numerical solution as U such thatUjn u(tk , xj )Multiscale Summer School – p. 13

Finite Difference Methods: Discretization The numerical solution to the PDE is an approximation to the exactsolution that is obtained using a discrete represntation to the PDE at thegrid points xj in the discrete spatial mesh at every time level tk . Let usdenote this numerical solution as U such thatUjn u(tk , xj ) Thus, the numerical solution is a collection of finite values,n]U n [U1n , U2n , . . . , Umat each time level tn .Multiscale Summer School – p. 13

Finite Difference Methods: Discretization The numerical solution to the PDE is an approximation to the exactsolution that is obtained using a discrete represntation to the PDE at thegrid points xj in the discrete spatial mesh at every time level tk . Let usdenote this numerical solution as U such thatUjn u(tk , xj ) Thus, the numerical solution is a collection of finite values,n]U n [U1n , U2n , . . . , Umat each time level tn .n The boundary conditions determine the values of U0n and Um 1for alln. The initial conditions determine the values of U 0 at each spatial gridpoint.Multiscale Summer School – p. 13

Finite Difference Methods (continued) Recall the definition of the derivative from introductory Calculus:u(xj h) u(xj )ux (xj ) limh 0hu(xj ) u(xj h) limh 0hu(xj h) u(xj h) limh 02hMultiscale Summer School – p. 14

Finite Difference Methods (continued) Recall the definition of the derivative from introductory Calculus:u(xj h) u(xj )ux (xj ) limh 0hu(xj ) u(xj h) limh 0hu(xj h) u(xj h) limh 02h We use these formula with a small finite value of h x, i.e., weapproximateu(xj h) u(xj )(Forward difference)ux (xj ) hu(xj ) u(xj h)(Backward difference) hu(xj h) u(xj h) (Centered difference)2hMultiscale Summer School – p. 14

Error in FDM: Local Truncation Error The local truncation error (LTE) is the error that results by substitutingthe exact solution into the finite difference formula.Multiscale Summer School – p. 15

Error in FDM: Local Truncation Error The local truncation error (LTE) is the error that results by substitutingthe exact solution into the finite difference formula. Errors in the approximations to the derivative are calculated usingTaylor approximations around a grid point xj . For example,Multiscale Summer School – p. 15

Error in FDM: Local Truncation Error The local truncation error (LTE) is the error that results by substitutingthe exact solution into the finite difference formula. Errors in the approximations to the derivative are calculated using Taylor approximations around a grid point xj . For example,u(xj 1 ) u(xj x)( x)2 O(( x)3 ) u(xj ) ux (xj ) x uxx (xj )2Multiscale Summer School – p. 15

Error in FDM: Local Truncation Error The local truncation error (LTE) is the error that results by substitutingthe exact solution into the finite difference formula. Errors in the approximations to the derivative are calculated using Taylor approximations around a grid point xj . For example,u(xj 1 ) u(xj x)( x)2 O(( x)3 ) u(xj ) ux (xj ) x uxx (xj )2 Thus,u(xj 1 ) u(xj ) x O(( x)2 ) uxx (xj )ux (xj ) x2Multiscale Summer School – p. 15

Error in FDM: Local Truncation Error The local truncation error (LTE) is the error that results by substitutingthe exact solution into the finite difference formula. Errors in the approximations to the derivative are calculated using Taylor approximations around a grid point xj . For example,u(xj 1 ) u(xj x)( x)2 O(( x)3 ) u(xj ) ux (xj ) x uxx (xj )2 Thus,u(xj 1 ) u(xj ) x O(( x)2 ) uxx (xj )ux (xj ) x2 The forward difference is a first order accurate approximation to thepartial derivative ux at xj and the LTE is O( x).Multiscale Summer School – p. 15

Error in FDM: LTE The backward difference is a first order accurateapproximation to the partial derivative ux at xj and the LTEis O( x).Multiscale Summer School – p. 16

Error in FDM: LTE The backward difference is a first order accurateapproximation to the partial derivative ux at xj and the LTEis O( x). The centered difference is a second order accurateapproximation to the partial derivative ux at xj and the LTEis O(( x)2).Multiscale Summer School – p. 16

Error in FDM: LTE The backward difference is a first order accurateapproximation to the partial derivative ux at xj and the LTEis O( x). The centered difference is a second order accurateapproximation to the partial derivative ux at xj and the LTEis O(( x)2). Note that the LTE in all these approximations goes to zeroas x goes to zero.Multiscale Summer School – p. 16

FDM for Parabolic PDEs: The Heat Equation Consider the initial-boundary value problem for the heat equationut κuxx , 0 x 1, t 0u(0, x) f (x), Initial Conditionu(t, 0) α, Boundary Condition at x 0u(t, 1) β, Boundary Condition at x 1Multiscale Summer School – p. 17

FDM for Parabolic PDEs: The Heat Equation Consider the initial-boundary value problem for the heat equationut κuxx , 0 x 1, t 0u(0, x) f (x), Initial Conditionu(t, 0) α, Boundary Condition at x 0u(t, 1) β, Boundary Condition at x 1 Discretize the spatial domain [0, 1] into m 2 grid points using auniform mesh step size x 1/(m 1) . Denote the spatial gridpoints by xj , j 0, 1, . . . m 1.q0 x0qqqqx1x2.qqxj 1 xj x -qqxj 1.qqxm xm 1x 1Multiscale Summer School – p. 17

FDM for Parabolic PDEs: The Heat Equation Similarly discretize the temporal domain into temporal grid pointstk k t for suitably chosen time step t.Multiscale Summer School – p. 18

FDM for Parabolic PDEs: The Heat Equation Similarly discretize the temporal domain into temporal grid pointstk k t for suitably chosen time step t. Denote the approximate solution at the grid point (tk , xj ) as Ujk .α uk0q0 x0uk1uk2qqqqx1x2.ukj 1ukjukj 1qqqqxj 1.xj 1 xj x -kukm um 1 βqqxm xm 1tk k tx 1Multiscale Summer School – p. 18

FDM for Parabolic PDEs: The Heat Equation Similarly discretize the temporal domain into temporal grid pointstk k t for suitably chosen time step t. Denote the approximate solution at the grid point (tk , xj ) as Ujk .α uk0q0 x0uk1uk2qqqqx1x2.ukj 1ukjukj 1qqqqxj 1.xj 1 xj xkukm um 1 β - The space-time grid can be represented as. 6. qqqqqqqqt2 tqqxm xm 1tk k tx 1qq6q(t2 , xj )q6?t1 qqqqqqqqqqqqqqqqqqqqqtt0 qq0 x 0 x1qqqqqqqx2.xj 1xjxj 1.qq6-xxm xm 1 1Multiscale Summer School – p. 18

FDM for Parabolic PDEs: The Heat Equation Replace ut by a forward difference in time and uxx by a centraldifference in space to obtain the explicit FDMMultiscale Summer School – p. 19

FDM for Parabolic PDEs: The Heat Equation Replace ut by a forward difference in time and uxx by a centraldifference in space to obtain the explicit FDM kkUjk 1 UjkUj 1 2Ujk Uj 1 κ t( x)2 Ujk 1 Ujk κ tkkk Uj 1 2Uj Uj 1 , j 1, 2, . . . m2( x)Multiscale Summer School – p. 19

FDM for Parabolic PDEs: The Heat Equation Replace ut by a forward difference in time and uxx by a centraldifference in space to obtain the explicit FDM kkUjk 1 UjkUj 1 2Ujk Uj 1 κ t( x)2 Ujk 1 Ujk κ tkkk Uj 1 2Uj Uj 1 , j 1, 2, . . . m2( x) Associated to this scheme is a Computational Stencilk 1kk 1qqq 6I@qq @qqqqj 1jj 1Multiscale Summer School – p. 19

FDM for Parabolic PDEs: The Heat Equation This is an explicit FDM for the heat equation: Solution at time levelk 1 is det

PDEs Vrushali A. Bokil bokilv@math.oregonstate.edu and Nathan L. Gibson gibsonn@math.oregonstate.edu Department of Mathematics Oregon State University Corvallis, OR DOE Multiscale Summer School June 30, 2007 Multiscale Summer School Πp. 1

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

In this review article we discuss analyses of finite-element and finite-difference approximations of the shallow water equations. An extensive bibliography is given. 0. Introduction In this article we review analyses of finite-element and finite-difference methods for the approximation of the shallow water equations.

Broyden Self-adjoint Sensitivity Analysis Broyden/Finite-Difference Self-Adjoint Sensitivity Analysis Broyden-Fletcher-Goldfarb-Shannon Electromagnetics Feasible Adjoint Sensitivity Technique Finite Difference Finite-Difference Time Domain Finite Element Method Method ofMoment Sequential Quadratic Programming Transmission-Line Method Trust Regions

volume finite element method (CVFE) method and the simulation of coupled subsurface physics including, most notably, heat. The NUMERICAL FORMULATION SUMMARY outlines the CVFE method and compares it to finite element (FE), finite difference (FD) and integrated finite difference (IDF) methods. SUBSURFACE

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 .

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