Time Integration Methods for the Heat Equation

Similar documents
Section 7.2 Euler s Method

Lecture 42 Determining Internal Node Values

Finite Difference Methods for Boundary Value Problems

Poisson Equation in 2D

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

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

APPLICATIONS OF FD APPROXIMATIONS FOR SOLVING ORDINARY DIFFERENTIAL EQUATIONS

Mathematics Research Report No. MRR 003{96, HIGH RESOLUTION POTENTIAL FLOW METHODS IN OIL EXPLORATION Stephen Roberts 1 and Stephan Matthai 2 3rd Febr

Numerical Analysis Preliminary Exam 10 am to 1 pm, August 20, 2018

Part 1. The diffusion equation

Introduction to the Numerical Solution of IVP for ODE

Numerical Solutions to Partial Differential Equations

Background. Background. C. T. Kelley NC State University tim C. T. Kelley Background NCSU, Spring / 58

Computation Fluid Dynamics

Numerical Solutions to Partial Differential Equations

Numerical Analysis of Differential Equations Numerical Solution of Elliptic Boundary Value

Finite difference methods for the diffusion equation

2tdt 1 y = t2 + C y = which implies C = 1 and the solution is y = 1

AMS 147 Computational Methods and Applications Lecture 17 Copyright by Hongyun Wang, UCSC

Chapter 6 - Ordinary Differential Equations

Scientific Computing: An Introductory Survey

Numerical Solutions to PDE s

Math 1270 Honors ODE I Fall, 2008 Class notes # 14. x 0 = F (x; y) y 0 = G (x; y) u 0 = au + bv = cu + dv

Numerical Programming I (for CSE)

1e N

Applied Mathematics 505b January 22, Today Denitions, survey of applications. Denition A PDE is an equation of the form F x 1 ;x 2 ::::;x n ;~u

Numerical method for approximating the solution of an IVP. Euler Algorithm (the simplest approximation method)

AIMS Exercise Set # 1

MULTIGRID METHODS FOR NONLINEAR PROBLEMS: AN OVERVIEW

PDE Solvers for Fluid Flow

Chapter 8. Numerical Solution of Ordinary Differential Equations. Module No. 1. Runge-Kutta Methods

Do not turn over until you are told to do so by the Invigilator.

Chapter 10 Exercises

9. Iterative Methods for Large Linear Systems

Definition 5.1. A vector field v on a manifold M is map M T M such that for all x M, v(x) T x M.

Calculus C (ordinary differential equations)

z x = f x (x, y, a, b), z y = f y (x, y, a, b). F(x, y, z, z x, z y ) = 0. This is a PDE for the unknown function of two independent variables.

Numerical Algorithms as Dynamical Systems

Numerical Solution Techniques in Mechanical and Aerospace Engineering

THEODORE VORONOV DIFFERENTIABLE MANIFOLDS. Fall Last updated: November 26, (Under construction.)

AM 205: lecture 14. Last time: Boundary value problems Today: Numerical solution of PDEs

Solutions Definition 2: a solution

INTRODUCTION TO PDEs

Kasetsart University Workshop. Multigrid methods: An introduction

Numerical Oscillations and how to avoid them

Do not turn over until you are told to do so by the Invigilator.

7 Hyperbolic Differential Equations

NUMERICAL ANALYSIS 2 - FINAL EXAM Summer Term 2006 Matrikelnummer:

AN OVERVIEW. Numerical Methods for ODE Initial Value Problems. 1. One-step methods (Taylor series, Runge-Kutta)

Index. higher order methods, 52 nonlinear, 36 with variable coefficients, 34 Burgers equation, 234 BVP, see boundary value problems

A stencil of the finite-difference method for the 2D convection diffusion equation and its new iterative scheme

Code: 101MAT4 101MT4B. Today s topics Finite-difference method in 2D. Poisson equation Wave equation

Ordinary Differential Equations

Partial Differential Equations

DYNAMICAL SYSTEMS

4. Higher Order Linear DEs

Ordinary Differential Equation Theory

Scientific Computing II

Ordinary Differential Equations

KINGS COLLEGE OF ENGINEERING DEPARTMENT OF MATHEMATICS ACADEMIC YEAR / EVEN SEMESTER QUESTION BANK

A Hybrid Method for the Wave Equation. beilina

MATH 333: Partial Differential Equations

Examination paper for TMA4125 Matematikk 4N

2 Multidimensional Hyperbolic Problemss where A(u) =f u (u) B(u) =g u (u): (7.1.1c) Multidimensional nite dierence schemes can be simple extensions of

Algorithmic Lie Symmetry Analysis and Group Classication for Ordinary Dierential Equations

The one-dimensional equations for the fluid dynamics of a gas can be written in conservation form as follows:

Lecture 4: Numerical solution of ordinary differential equations

Tutorial 2. Introduction to numerical schemes

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

Iterative Methods and Multigrid

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

Numerical Methods for Initial Value Problems; Harmonic Oscillators

Scientific Computing: An Introductory Survey

Finite Difference Method for PDE. Y V S S Sanyasiraju Professor, Department of Mathematics IIT Madras, Chennai 36

Convergence and Error Bound Analysis for the Space-Time CESE Method

MONOTONE SCHEMES FOR DEGENERATE AND NON-DEGENERATE PARABOLIC PROBLEMS

Partial differential equations

Fourth Order RK-Method

9.2 Euler s Method. (1) t k = a + kh for k = 0, 1,..., M where h = b a. The value h is called the step size. We now proceed to solve approximately

Numerical Schemes from the Perspective of Consensus

Lecture 2: Review of Prerequisites. Table of contents

then the substitution z = ax + by + c reduces this equation to the separable one.

MATH 56A SPRING 2008 STOCHASTIC PROCESSES

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

Introduction to Scientific Computing II Multigrid

Numerical Solutions to Partial Differential Equations

Partitioned Methods for Multifield Problems

1. Differential Equations (ODE and PDE)

Relevant self-assessment exercises: [LIST SELF-ASSESSMENT EXERCISES HERE]

Matrix-equation-based strategies for convection-diusion equations

Diffusion of a density in a static fluid

Module 3: BASICS OF CFD. Part A: Finite Difference Methods

NUMERICAL SOLUTION OF ODE IVPs. Overview

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

Ordinary Differential Equations II

AM205: Assignment 3 (due 5 PM, October 20)

Numerical Methods for Initial Value Problems; Harmonic Oscillators

Introduction to numerical schemes

1 Solutions to selected problems

Iterative Methods for Solving A x = b

Transcription:

Time Integration Methods for the Heat Equation Tobias Köppl - JASS March 2008 Heat Equation: t u u = 0 Preface This paper is a short summary of my talk about the topic: Time Integration Methods for the Heat Equation, I gave at the Euler Institute in Saint Petersburg. The goal of this talk was rst to present Time integration methods for ordinary dierential equations and then to apply them to the Heat Equation after the discretization of the Laplacian operator. Moreover accuracy of the Time integration methods and stability conditions for our algorithms were discussed. The picture above shows the solution of the Heat Equation at a certain time on the unit square, in which the solution of the Heat Equation was said to be zero at the boundary of the unit square. 1

1. Time Integration Methods 1.1. Implicit and explicit Onestep Methods Before we talk about solution methods for the Heat Equation, we want to construct solution methods for ordinary dierential equations (ODE). So for the moment our goal is to nd numerical approximations of functions x C 1 ([t 0, T ], R d ), which are solutions of an initial value problem (IVP): d x(t) = f(t, x) dt x(t 0 ) = x 0 x 0 is a vector in R d, f ist a smooth function, which maps from [t 0, ) R d into R d. The rst step for the construction of an numerical solution method for ODE is to divide the continous intervall [t 0, T ] by n + 1 discrete timepoints: t 0 < t 1 <...t n = T This set of timepoints forms a grid on [t 0, T ]: = {t 0, t 1,..., t n } For further discussions it is useful to dene the expression stepsize of an grid. The stepsize τ of our Grid is dened as: τ := max{τ j = t j+1 t j 0 j < n}. Now we want to approximate the solution of the IVP at the gridpoints t j by a gridfunction x : R d. So x should fullll the following: x (t) x(t) for all t. In additon to that it should be possible to compute a certain value x (t j+1 ) by recursion, using only x (t j ). Such Time Integration Methods are called Onestep Methods. x (t 0 ) x (t 1 )... x (t n ) Of course one does not need to use only x (t j ) in order to compute x (t j+1 ), but one can also use several values of the gridfunctions, which were computed in former steps (See literature e.g. [DB II]). 2

Two popular Onestep Methods are the explicit and the implicit Euler Method: x (t 0 ) = x 0 explicit EulerM ethod : x (t j+1 ) = x (t j ) + τ j f(t j, x (t j )) implicit EulerM ethod : x (t j+1 ) = x (t j ) + τ j f(t j+1, x (t j+1 )) Considering this two Onestep Methods, it becomes clear, why it is necessary to distinguish between implicit and explicit Onestep Methods. Using the explicit Euler Method, x (t j+1 ) can be computed directly. But if you use the implicit Euler Method, x (t j+1 ) can in general only be computed by the solution of an in general non linear equation. Now one may ask why implicit Onestep Methods are considered at all, because of the computional eort, which is required in order to solve the mentioned equation. The answer is given in the next section, in which the convergence theory of Onestep Methods is treated. 1.2. Convergence theory for Onestep Methods In this section our goal is to derive conditions under which a Onestep Method converges towards the exact solution of a given IVP. But before we can treat this problem in detail, we rst have do dene several expressions, which help us to set up our convergence theorem. Denition (local discretization error) The local discretization error l( ) of a grid function x : R d for a grid on the intervall [t 0, T ] is dened as: l( ) = max{ x (t j+1 ) x (j) (t j+1 ) } x (j) ist the solution of the IVP: 0 j < n d x(t) = f(t, x) dt x(t j ) = x (t j ) Denition A Onestep Method is called consistent, if: l( ) 0 for τ 0 Theorem The explicit and the implicit Euler Method are consistent. Proof: See e.g. [DB II] Chapter 4. 3

Denition (global discretization error) The global discretization error e( ) is the maximum error between the computed approximations x (t j ) and the corresponding values of the exact solution x(t j ). e( ) = max{ x (t j+1 ) x(t j+1 ) } 0 j < n Denition (convergence) A Onestep Method is called convergent towards the exact solution on an IVP, if: e( ) 0 for τ 0 The following graph helps us to get a better imagination of the local and the global discretization error: Now we have all the expressions, which are necessary to formulate our convergence theorem. Maintheorem of Numerics A Onestep Method is called convergent if and only if it is consistent. Now we know the condition under which our Onestep Method is convergent. But the above Theorem is only ture, if we can chose an arbitrary small stepsize. The problem is that we can not choose an innitly small stepsize for our computations with the help of a computer. In addition to the Maintheorem of Numerics our algorithm has to have 4

a further property called stability, in order to achieve good numerical results with an acceptable small stepsize. Denition (stability) A numerical algorithm is called stable, if for all permitted input data perturbed in the size of computional accuracy O(ɛ) acceptable results are produced under the inuence of rounding and method errors. Example If we apply the implicit and the explicit Euler Method to the following IVP (Dahlquist's testequation): d x(t) = λx(t) dt x(0) = 1, λ R one gets the following result: Example The implicit Euler Method is stable for any stepsize τ. The explicit Euler Method is only stable, if τ 2. λ 2. The Heat Equation 2.1. Discretization of the Laplacian operator Before we can solve the Heat Equation, we have to think about solution methods for the Poisson equation (PE), for simplicity we consider only the two dimensional case: u = f Ω = [0, 1] 2, u Ω = 0 f : Ω R In order to solve the Poission equation, we transfer the partial dierential equation into a system of linear equations. Here we replace dierential operators by dierence operators and discretize our domain Ω by an uniform grid with gridparameter h. h is the distance between two neighboured nodes of the grid in x- or y-direction. Thus we have the following discretization points: (x i, y j ) Ω x i = ih, y j = jh 0 i, j 1 h 5

The picture below shows some possible discretizations or our domain Ω by an uniform grid. Before we discretize the twodimensional Laplacian operator, we have to introduce some notation: u i,j = u(x i, y j ) (x i, y j ) is an interior point of Ω. f i,j = f(x i, y j ) The next step is to expand u(x i + h, y j ) and u(x i h, y j ) into a Taylor series up to order 4 around x i = ih. Furthermore one needs to expand u(x i, y j + h) and u(x i, y j h) into a Taylor series up to order 4 around y j = jh. After that we add the Taylor series of u(x i + h, y j ) and u(x i h, y j ) and we get an new equation. Next we solve this equation for the second derivative with respect to x and get: xx u(x i, y j ) = 1 h 2 (u(x i + h, y j ) 2u(x i, y j ) + u(x i h, y j )) + O(h 4 ) Then one has to do the same with u(x i, y j + h) and u(x i, y j h) and gets: yy u(x i, y j ) = 1 h 2 (u(x i, y j + h) 2u(x i, y j ) + u(x i, y j h)) + O(h 4 ) If you neglect the term O(h 4 ), you get the following expression of the twodimensional Laplacian operator: u i,j 1 h 2 (4u i,j u i+1,j u i 1,j u i,j+1 u i,j 1 ) The Discretization error is in the order of O(h 4 ). 6

In order to get a numerical solution of the Poisson equation on each gridpoint, one has to solve the following system of linear equations: 1 h 2 ( 4u i,j + u i+1,j + u i 1,j + u i,j+1 + u i,j 1 ) = f i,j 0 i, j 1 h Matrix-Vector notation: A has the following structure: Au = f It can be easily seen that A is a sparse matrix, thus one should use fast iterative solvers, in order to solve the system of linear equations, which is given above. 2.2. Application of Time Integration Methods In this section our goal is to nd numerical approximations of functions u, solving the homogenous Heat Equation: t u u = 0 Ω = [0, 1] 2, u Ω = 0 g : (0, 1) 2 R, u(0, x) = g(x) t [t 0, T ] It is clear that the solution of the Heat Equation depends on space and time. Thus discretization of time and space is necessary in order to get a discrete system of linear equations. 7

Both time and space can be discretized by an uniform grid, as it can be seen in the picture below: We can discretize our unit square Ω again by an uniform grid with gridparameter h. This yields the same discretizations points as in section 2.1.: (x i, y j ) Ω x i = ih, y j = jh 0 i, j 1 h Moreover we discretize the intervall [t 0, T ] by an onedimensional grid with stepsize k and n discrete timepoints: t m = km, 0 m < n We denote u(t m, x i, y j ) with: u m,i,j Now one can take care about the construction of an solver of the Heat Equation: t u u = 0 t u = u The next step is to construct local initial value problems for every interior point (x i, y j ) 0 i, j 1 h (IVP(ij)): d dt u(t, x i, y j ) = u(t, x i, y j ) u(0, x i, y j ) = g(x i, y j ) t [t 0, T ] IVP(ij) can be solved for example by the implicit Euler Method. Applying the implicit Euler Method to IVP(ij), we get the following formula: u 0,i,j = g(x i, y j ) u m+1,i,j = u m,i,j + k u m+1,i,j 8

After that we insert the discretization of the two dimensional Laplacian operator: u m+1,i,j 1 h 2 (4u m+1,i,j u m+1,i+1,j u m+1,i 1,j u m+1,i,j+1 u m+1,i,j 1 ) and this yields the following system of linear equations, whích is to be solved in every timestep, for example by a fast iterative solver (Jacobi Method, Gauss-Seidel Method): (4 + h2 k )u m+1,i,j + u m+1,i+1,j + u m+1,i 1,j + u m+1,i,j+1 + u m+1,i,j 1 = h2 k u m,i,j 0 i, j 1 h 0 m < n 2.3. Courant-Friedrichs-Levy condition IVP(i,j) can also be solved by the explicit Euler Method. But remember: In section 1.2. we realized that the explicit Euler Method is only stable for small stepsizes k. We also know that stability is an essential condition for getting qualitatively correct solutions, when using practical stepsizes. In 1928 Courant, Friedrichs and Levy found a condition under which the explicit Euler Method is a stable solver for the Heat Equation: Theorem(CFL - condition) The explicit Euler Method is a stable solver for the Heat Equation, if: 4 k < 1 h 2 9

3. Outlook Let x(t) be a solution of an IVP. It is clear, that an uniform discretization of the time axis would lead to a slow convergence. Thus adaptive algorithms with a good errormeasurement are required in order to get a better convergence. Further things, that would improve our numerical algorithm would be the optimization of the algorithms solving the sparse linear system of equations, with respect to storage and number of oating point operations, constructing an algorithm, which helps us to traverse our grid eciently (peano curves) or the preconditioning of the Matrix representing the system of linear equations. 4. Literature DH I: Numerische Mathematik I, Deuhard/Hohmann, 2002, 3. edition DB II: Numerische Mathematik II, Deuhard/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 the theory of partial dierential equations, 2000 CFL: Über die partiellen Dierentialgleichungen der mathematischen Physik, Courant, Friedrichs, Levy, 1928 10