Time integration methods for the Heat Equation Solution

  • Slides: 37
Download presentation
Time integration methods for the Heat Equation Solution u for t=0. 0035 Tobias Köppl

Time integration methods for the Heat Equation Solution u for t=0. 0035 Tobias Köppl TUM 1

Agenda: 1. Time integration methods 1. 1. Implicit and explicit Onestep Methods 1. 2.

Agenda: 1. Time integration methods 1. 1. Implicit and explicit Onestep Methods 1. 2. Convergence theory for Onestep Methods 2. The Heat Equation 2. 1. Discretization of the Laplacian operator 2. 2. Application of Time integration methods 2. 3. Courant-Friedrichs-Levy condition 3. Outlook 4. Literature Tobias Köppl TUM 2

Notation: : field of real numbers : vector space of d dimensional vectors with

Notation: : field of real numbers : vector space of d dimensional vectors with components, which are in : is a differentiable function, which maps from the intervall into and whose derivative function is continous partial derivative of y with respect to t Laplacian operator of y Machine accuracy with Tobias Köppl TUM 3

1. Time integration methods 1. 1. Implicit and explicit Onestep Methods Goal: Find numerical

1. Time integration methods 1. 1. Implicit and explicit Onestep Methods Goal: Find numerical approximations of functions which are solutions of an ODE with an initial value: (IVP) Tobias Köppl TUM 4

1. Time integration methods 1. 1. Implicit and explicit Onestep Methods Example (IVP): Dahlquist‘s

1. Time integration methods 1. 1. Implicit and explicit Onestep Methods Example (IVP): Dahlquist‘s Testequation Tobias Köppl TUM 5

1. Time integration methods 1. 1. Implicit and explicit Onestep Methods Construction of a

1. Time integration methods 1. 1. Implicit and explicit Onestep Methods Construction of a time integration method Divide the continous intervall by discrete timepoints: t on Grid Stepsize of grid : Approximation of the solution at the gridpoints by a gridfunction for all Tobias Köppl TUM 6

1. Time integration methods 1. 1. Implicit and explicit Onestep Methods Additionaly: Computation of

1. Time integration methods 1. 1. Implicit and explicit Onestep Methods Additionaly: Computation of the gridfunction by recursion, should be possible. Such algorithms are called Onestep Methods. Reason: For the computation of only from the timepoint before is needed. Further possibility: Multistep Methods. See literature for more information f. e. [DB II] Chapter 7 or [QSS] Chapter 11 Tobias Köppl TUM 7

1. Time integration methods 1. 1. Implicit and explicit Onestep Methods Two popular Onestep

1. Time integration methods 1. 1. Implicit and explicit Onestep Methods Two popular Onestep Methods are the explicit and the implicit Euler Method: explicit Euler Method: implicit Euler Method: Tobias Köppl TUM 8

1. Time integration methods 1. 1. Implicit and explicit Onestep Methods Geometry of the

1. Time integration methods 1. 1. Implicit and explicit Onestep Methods Geometry of the explicit Euler Method: Construction of: Compute the tangent vector t in t t Compute the intersection point between: and Source: [DB II] The explicit Euler Method is creating a path (Euler path). Tobias Köppl First component of this intersection point is the next value of the gridfunction TUM 9

1. Time integration methods 1. 2. Convergence theory for Onestep Methods Issue: Under which

1. Time integration methods 1. 2. Convergence theory for Onestep Methods Issue: Under which conditions does a Onestep Method converge towards the exact solution of an ODE with an initial value? Definition (local discretization error): The local discretization error of a gridfunction a grid on the intervall is defined as: for is the solution of the IVP: on Tobias Köppl TUM 10

1. Time integration methods 1. 2. Convergence theory for Onestep Methods Definition: A Onestep

1. Time integration methods 1. 2. Convergence theory for Onestep Methods Definition: A Onestep Method is called constistent, if: for Theorem: The explicit and the implicit Euler Method are consistent. Proof: Tobias Köppl See f. e. [DB II] Chapter 4. TUM 11

1. Time integration methods 1. 2. Convergence theory for Onestep Methods Definition (global discretization

1. Time integration methods 1. 2. Convergence theory for Onestep Methods Definition (global discretization error): The global discretization error is the maximum error between the computed approximations and the corresponding values of the exact solution Defintion (convergence): A Onestep Method is called convergent towards the exact solution of an IVP, if: for Tobias Köppl TUM 12

1. Time integration methods 1. 2. Convergence theory for Onestep-Methods Comparison of local and

1. Time integration methods 1. 2. Convergence theory for Onestep-Methods Comparison of local and global Discretization error: Source: [Bun] Tobias Köppl TUM 13

1. Time integration methods 1. 2. Convergence theory for Onestep-Methods Maintheorem of Numerics: A

1. Time integration methods 1. 2. Convergence theory for Onestep-Methods Maintheorem of Numerics: A Onestep Method is convergent, if and only if it is consistent. Defintion (stability): A numerical algorithm is called (numerically) stable, if for all permitted input data perturbed in the size of computational accuracy ( ) acceptable results are produced under the influence of rounding and method errors. Tobias Köppl TUM 14

1. Time integration methods 1. 2. Convergence theory for Onestep-Methods Remark: Stability of a

1. Time integration methods 1. 2. Convergence theory for Onestep-Methods Remark: Stability of a Onestep Method is an essential condition for getting qualitatively correct solutions, when using practical stepsizes. See numerical experiment. Theorem: The implicit Euler Method is stable for any stepsize The explicit Euler Method is only stable for small Proof: See f. e. [Jun] Chapter 4. Example: If , the explicit Euler Method is a stable integrator for Dahlquist‘s testequation. Tobias Köppl TUM 15

2. The Heat Equation 2. 1. Discretization of the Laplacian operator Goal: Find a

2. The Heat Equation 2. 1. Discretization of the Laplacian operator Goal: Find a numerical approximation of the two dimensional Laplacian operator in order to solve the Poisson equation: (PE) Tobias Köppl TUM 16

2. The Heat Equation 2. 1. Discretization of the Laplacian operator Discretization Method: Finite

2. The Heat Equation 2. 1. Discretization of the Laplacian operator Discretization Method: Finite Differences Main idea: Replace differential operators by difference operators Further discretization methods: Finite Volumes or Finite Elements See literature for more information f. e. [QSS] or [Wa] Tobias Köppl TUM 17

2. The Heat Equation 2. 1. Discretization of the Laplacian operator Discretization of Uniform

2. The Heat Equation 2. 1. Discretization of the Laplacian operator Discretization of Uniform grid with grid parameter h Discretizationpoints: and Tobias Köppl TUM 18

2. The Heat Equation 2. 1. Discretization of the Laplacian operator Source: [Hu] Tobias

2. The Heat Equation 2. 1. Discretization of the Laplacian operator Source: [Hu] Tobias Köppl TUM 19

2. The Heat Equation 2. 1. Discretization of the Laplacian operator is an interior

2. The Heat Equation 2. 1. Discretization of the Laplacian operator is an interior point of the unit square expand and in a Taylor series around Discretization of the two dimensional Laplacian operator: Discretization error: Tobias Köppl TUM 20

2. The Heat Equation 2. 1. Discretization of the Laplacian operator In order to

2. The Heat Equation 2. 1. Discretization of the Laplacian operator In order to get a numerical solution of the (PE) we have to solve the following System of linear equations: Matrix- Vectornotation: (SLSE) Tobias Köppl TUM 21

2. The Heat Equation 2. 1. Discretization of the Laplacian operator Structure of the

2. The Heat Equation 2. 1. Discretization of the Laplacian operator Structure of the Matrix A: A ist a sparse Matrix Use fast iterative solvers like Jacobi Method or Gauß Seidel Method for the solution of (SLSE) See f. e. [El] Source: [Hu] Tobias Köppl TUM 22

2. The Heat Equation 2. 1. Discretization of the Laplacian operator Example: Solution: See

2. The Heat Equation 2. 1. Discretization of the Laplacian operator Example: Solution: See numerical example Tobias Köppl TUM 23

2. The Heat Equation 2. 2. Application of Time integration methods Goal: Find numerical

2. The Heat Equation 2. 2. Application of Time integration methods Goal: Find numerical approximations of functions which are solutions of the homogenous Heat Equation: Tobias Köppl TUM 24

2. The Heat Equation 2. 2. Application of Time integration methods Solution of the

2. The Heat Equation 2. 2. Application of Time integration methods Solution of the Heat Equation depends on time and space. h h Discretization of time and space is necessary Both time and space can be discretized by an uniform grid Source: [SK] Tobias Köppl TUM 25

2. The Heat Equation 2. 2. Application of Time integration methods Discretization of Uniform

2. The Heat Equation 2. 2. Application of Time integration methods Discretization of Uniform grid (2 D) with grid parameter h Discretizationpoints: and Discretization of Uniform grid (1 D) with stepsize k and n timepoints: Tobias Köppl TUM 26

2. The Heat Equation 2. 2. Application of Time integration methods Construct a local

2. The Heat Equation 2. 2. Application of Time integration methods Construct a local IVP for every (IVP(ij)) Tobias Köppl TUM 27

2. The Heat Equation 2. 2. Application of Time integration methods Solve IVP(ij) with

2. The Heat Equation 2. 2. Application of Time integration methods Solve IVP(ij) with the implicit Euler Method: Use the discretization of the two dimensional Laplacian Operator: Tobias Köppl TUM 28

2. The Heat Equation 2. 2. Application of Time integration methods We have to

2. The Heat Equation 2. 2. Application of Time integration methods We have to solve the following system of linear equations for every timestep: (SLSE II) Use again fast iterative solvers like Jacobi Method or Gauß Seidel Method for the solution of (SLSE II) Tobias Köppl TUM 29

2. The Heat Equation 2. 2. Application of Time integration methods Numerical Example: (Cooling

2. The Heat Equation 2. 2. Application of Time integration methods Numerical Example: (Cooling of a heated plate) Tobias Köppl TUM 30

2. The Heat Equation 2. 3. Courant-Friedrichs-Levy condition (IVP(ij)) can be solved by the

2. The Heat Equation 2. 3. Courant-Friedrichs-Levy condition (IVP(ij)) can be solved by the explicit Euler Method, too. Chapter 1. 2. : explicit Euler Method is only stable for a small stepsize k Maintheorem of Numerics: Stability is an essential condition for getting qualitatively correct solutions, when using practical stepsizes. Tobias Köppl TUM 31

2. The Heat Equation 2. 3. Courant-Friedrichs-Levy condition Theorem (CFL condition): The explicit Euler

2. The Heat Equation 2. 3. Courant-Friedrichs-Levy condition Theorem (CFL condition): The explicit Euler Method is a stable solver for the Heat Equation if: h h Proof: See [CFL] Source: [SK] Tobias Köppl TUM 32

2. The Heat Equation 2. 3. Courant-Friedrichs-Levy condition Numerical Example: (Cooling of a heated

2. The Heat Equation 2. 3. Courant-Friedrichs-Levy condition Numerical Example: (Cooling of a heated plate, solved with the explicit Euler Method and a discretization which is not conform with the CFL condition) Tobias Köppl TUM 33

3. Outlook Let x(t) be the solution of an (IVP): x(t) Source: [DH I]

3. Outlook Let x(t) be the solution of an (IVP): x(t) Source: [DH I] t An uniform discretization of the time axis, would lead to a Onestep Method with slow convergence Adaptive discretization algorithms, with a good error measurement are required Tobias Köppl TUM 34

3. Outlook Further topics: Optimization of the algorithms, solving the sparse linear equation systems,

3. Outlook Further topics: Optimization of the algorithms, solving the sparse linear equation systems, with respect to storage and number of floating point operations Traversing a certain grid efficiently (peano curves) Preconditioning of the Matrix representing the mentioned SLSE Tobias Köppl TUM 35

4. Literature: [DH I]: Numerische Mathematik I, Deuflhard/Hohmann, 2002, 3. edition [DB II]: Numerische

4. Literature: [DH I]: Numerische Mathematik I, Deuflhard/Hohmann, 2002, 3. edition [DB II]: Numerische Mathematik II, Deuflhard/Bornemann, 2002, 2. edition [Jun]: Lecture on Numerische Mathematik, Junge, 2007 [SK]: Numerische Mathematik, Schwarz/Köckler, 2006, 6. edition [QSS]: Numerische Mathematik 2, Quateroni/Sacco/Saleri, 2002, 2. edition [Wa]: Lecture on Finite Elements, Wall, 2007, 2. edition [Hu]: Numerics for computer sience students, Huckle/Schneider, 2002, 3. edition [Bun]: Lecture on numerical programming, Bungartz, 2007 [El]: Finite Elements and Fast Iterative Solvers, Elman/Silvester/Wathen, 2005, 2. ed. [Fo I]: Analysis I, Forster, 1976, 6. edition [Fo II]: Analysis II, Forster, 1976, 6. edition [Fei]: Introduction into theory of partial differential equations, 2000 [CFL]: Über die partiellen Differentialgleichungen der mathematischen Physik, Courant, Friedrichs, Levy, 1928 Tobias Köppl TUM 36

Thank you for your attention!!! Tobias Köppl TUM 37

Thank you for your attention!!! Tobias Köppl TUM 37