Finite Differences: Consistency, Stability and Convergence

Similar documents
Introduction to numerical schemes

FDM for parabolic equations

Tutorial 2. Introduction to numerical schemes

Finite difference methods for the diffusion equation

PDEs, part 3: Hyperbolic PDEs

Ordinary Differential Equations

Notation Nodes are data points at which functional values are available or at which you wish to compute functional values At the nodes fx i

Chapter 3. Finite Difference Methods for Hyperbolic Equations Introduction Linear convection 1-D wave equation

Numerical Integration of Linear and Nonlinear Wave Equations

Finite Difference Methods (FDMs) 2

Numerical Analysis of Differential Equations Numerical Solution of Parabolic Equations

Basics of Discretization Methods

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

Evolution equations with spectral methods: the case of the wave equation

2.29 Numerical Fluid Mechanics Spring 2015 Lecture 13

Introduction to PDEs and Numerical Methods Tutorial 4. Finite difference methods stability, concsistency, convergence

Linear Multistep Methods I: Adams and BDF Methods

MIT (Spring 2014)

Numerical Solutions to PDE s

MITOCW ocw feb k

arxiv: v1 [physics.comp-ph] 22 Feb 2013

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

Numerical Algorithms for Visual Computing II 2010/11 Example Solutions for Assignment 6

2.3. Quantitative Properties of Finite Difference Schemes. Reading: Tannehill et al. Sections and

Applied Mathematics 205. Unit III: Numerical Calculus. Lecturer: Dr. David Knezevic

Lecture Notes on Numerical Schemes for Flow and Transport Problems

Lecture Notes on Numerical Schemes for Flow and Transport Problems

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

Basic Aspects of Discretization

Numerical Analysis Preliminary Exam 10.00am 1.00pm, January 19, 2018

Numerical Methods for PDEs

7 Hyperbolic Differential Equations

Lecture 5: Single Step Methods

Fixed point iteration and root finding

Finite difference method for heat equation

Review. Numerical Methods Lecture 22. Prof. Jinbo Bi CSE, UConn

Partial differential equations

Numerical Solutions to Partial Differential Equations

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

ECE539 - Advanced Theory of Semiconductors and Semiconductor Devices. Numerical Methods and Simulation / Umberto Ravaioli

Time-dependent variational forms

Finite Differences for Differential Equations 28 PART II. Finite Difference Methods for Differential Equations

256 Summary. D n f(x j ) = f j+n f j n 2n x. j n=1. α m n = 2( 1) n (m!) 2 (m n)!(m + n)!. PPW = 2π k x 2 N + 1. i=0?d i,j. N/2} N + 1-dim.

Advection / Hyperbolic PDEs. PHY 604: Computational Methods in Physics and Astrophysics II

12 The Heat equation in one spatial dimension: Simple explicit method and Stability analysis

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

CS205B / CME306 Homework 3. R n+1 = R n + tω R n. (b) Show that the updated rotation matrix computed from this update is not orthogonal.

ME Computational Fluid Mechanics Lecture 5

4 Stability analysis of finite-difference methods for ODEs

Design of optimal Runge-Kutta methods

Chapter 5 Exercises. (a) Determine the best possible Lipschitz constant for this function over 2 u <. u (t) = log(u(t)), u(0) = 2.

Introduction to PDEs and Numerical Methods Tutorial 5. Finite difference methods equilibrium equation and iterative solvers

Finite Difference Methods for Boundary Value Problems

Numerical Methods for Engineers and Scientists

Solutions Preliminary Examination in Numerical Analysis January, 2017

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

Introduction to PDEs and Numerical Methods Tutorial 11. 2D elliptic equations

Multistage Methods I: Runge-Kutta Methods

Ordinary Differential Equations

FDM for wave equations

ENO and WENO schemes. Further topics and time Integration

q t = F q x. (1) is a flux of q due to diffusion. Although very complex parameterizations for F q

Math 7824 Spring 2010 Numerical solution of partial differential equations Classroom notes and homework

Ordinary Differential Equations

6 Non-homogeneous Heat Problems

Numerical methods Revised March 2001

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

Lecture 4.5 Schemes for Parabolic Type Equations

INF-MAT Mandatory Exercise 1

TAYLOR AND MACLAURIN SERIES

Lecture 4: Numerical solution of ordinary differential equations

Multi-Factor Finite Differences

PDE Solvers for Fluid Flow

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

Lecture 17: Initial value problems

Review for Exam 2 Ben Wang and Mark Styczynski

Numerical Solutions to Partial Differential Equations

Finite Difference Methods for

Numerical Methods for Differential Equations Mathematical and Computational Tools

A Bound-Preserving Fourth Order Compact Finite Difference Scheme for Scalar Convection Diffusion Equations

Selected HW Solutions

Finite Difference Methods (FDMs) 1

Time stepping methods

3.3. Phase and Amplitude Errors of 1-D Advection Equation

Strong Stability-Preserving (SSP) High-Order Time Discretization Methods

1 Introduction to MATLAB

Linear Advection Equation

e x = 1 + x + x2 2! + x3 If the function f(x) can be written as a power series on an interval I, then the power series is of the form

AMS527: Numerical Analysis II

Course Description for Real Analysis, Math 156

2.2. Methods for Obtaining FD Expressions. There are several methods, and we will look at a few:

Preface. 2 Linear Equations and Eigenvalue Problem 22

An Efficient Algorithm Based on Quadratic Spline Collocation and Finite Difference Methods for Parabolic Partial Differential Equations.

Consistency and Convergence

Numerical Solutions to Partial Differential Equations

Computation Fluid Dynamics

Hyperbolic Partial Differential Equations

Partial Differential Equations

AIMS Exercise Set # 1

The Way of Analysis. Robert S. Strichartz. Jones and Bartlett Publishers. Mathematics Department Cornell University Ithaca, New York

Transcription:

Finite Differences: Consistency, Stability and Convergence Varun Shankar March, 06 Introduction Now that we have tackled our first space-time PDE, we will take a quick detour from presenting new FD methods, and discuss the convergence of the FD method on the heat equation (and for other PDEs). We will center our discussion on the Lax Equivalence Theorem. This theorem states that a consistent FD method on a well-posed linear IVP is convergent if and only if it is stable. Convergence If U is the approximate solution to the PDE and u is the true solution, convergence is the requirement that lim U u = 0. (),h 0 In other words, we require that the numerical solution recover the approximate solution as our discrete differential operators become more accurate. Practically speaking, we generally are not given u. How would one go about measuring or ascertaining convergence of U in this scenario? There are two possibilities: for simple linear problems, one could show stability and consistency, and this would imply convergence. In the more general case, one typically runs a convergence study using a proxy for u: simply generate an FD solution to the PDE with a very small, h pair, then use that as the true solution in a convergence study. All solutions with larger, h pairs are then compared to this true solution, and convergence is ascertained by gradually reducing, h, either together or separately.

3 Consistency Consider a PDE of the form Lu = 0, where L is some linear (space-time) differential operator. Consistency is the requirement that the discrete differential operator L,h approach the continuous operator L as, h 0. If we are deriving a new FD scheme from a polynomial interpolation approach, we can show consistency by showing that the error in the derivative of the interpolant vanishes as, h 0. If we are, however, presented with an FD scheme without any error terms, we can show consistency by Taylor expanding the spatial approximations and temporal approximations separately, and then showing that the total truncation error goes to zero. A natural consequence of this is that an FD scheme must be at least first-order to be consistent ( O() + O(h)). 4 Stability Stability is typically harder to ascertain for PDEs. First, recall that stability is the requirement that the error not grow from iteration to iteration of the time-stepping scheme. We would either like the error to remain constant, or, ideally, we would like the error to reduce. In other words, we would like: e n+ e n, () = U n. (3) Obviously, this is only possible if the PDE problem is well-posed (and possiblity also well-behaved). The discrete version of the above conditions amounts to: U n. (4) Clearly, this is only possible if the spectral radius of the time-stepping matrix is less than, i.e., ρ(a). We can show this when we know the eigenvalues of the matrix A. However, if the eigenvalues of A are hard to find, this approach does not generalize. Often, it is possible to use an alternative form of analysis in place of this matrix norm analysis. This method is called Von Neumann analysis or Fourier analysis. We will focus on this method of stability analysis for the remainder of this chapter, with the caveat that this analysis is equivalent to the matrix norm analysis on on linear, constant coefficient IVPs with periodic or Dirichlet boundary conditions.

4. Stability of Forward Euler on the D Heat Equation Fourier analysis proceeds as follows: express the numerical solution function U(x, t) using a Fourier series. Then, substitute all (or even just one) of the Fourier modes into the FD scheme, and attempt to obtain an expression for the growth factor G, defined as = GU n. Let us write out this Fourier expansion: U(x, t) = k Û(t)e ikx. (5) Just taking one Fourier mode and evaluating on the grid, we get U n j = Û(t n)e ikjh = Û n e ikjh. (6) For stability, we need G. In practice, conditional stability manifests as a condition on and h, derived from the expression G. This will make more sense as we proceed. Let us now write out the Forward Euler Centered Difference scheme (often called FTCS, forward in time, centered in space) for a single grid point. Uj n Plugging in the Fourier mode, we get j GÛ n e ikjh Û n e ikjh We can divide through by Û n e ikjh, leaving us with = D U n j+ U n j + U n j h. (7) = D Û n e ik(j+)h Û n e ikjh + Û n e ik(j )h h. (8) = D eikh + e ikh h. (9) We can use Euler s formula to simplify this. We know that e ikh + e ikh = cos(kh). Rearranging for G, we get where α = D h G = α( cos(kh) ), (0). Using the half angle formula, we can further simplify this to ). () G = 4α sin ( kh We require G. This establishes a bound on α. More specifically, we have ( ) kh 4α sin. () Simplifying, we have α. This means that given a D and h value, we have an upper limit on for stability. This is called the CFL condition (Courant, Friedrich and Lewy). This not surprising: taking a small time-step with Forward Euler lets us stay within its stability region given the spread of the eigenvalues of L. 3

4. Stability of Backward Euler on the D Heat Equation To see how things may change for an implicit method, let us perform a Fourier analysis on the BTCS (Backward in Time, Centered in Space) scheme for the Heat equation. The scheme is as follows: j U n j = D j+ Plugging in the Fourier mode, we have: n+ Uj + j h. (3) GÛ n e ikjh Û n e ikjh = DGÛn e ik(j+)h Û n e ikjh + Û n e ik(j )h h. (4) Dividing through by Û n e ikjh, we are left with = DG h (eikh + e ikh ). (5) Using Euler s formula and the half angle formula, we can simplify this to = 4 DG ( ) kh h sin. (6) Multiplying through by and re-arranging for G, we get ( ) kh G + 4Gα sin =. (7) Re-arranging, we get G = + 4α sin ( ). (8) kh Clearly, G. This implies that the BTCS scheme is unconditionally stable on the heat equation. 4.3 Stability of Forward Euler on the D Heat Equation What if we are dealing with the D heat equation? In this scenario, we have two spatial variables and one temporal variable. Consequently, our Fourier mode must also contain two exponentials, one for each spatial variable. Let us work this out for the FTCS scheme for a single Fourier mode. Assuming again that h x = h y = h, the scheme is: j,l U n j,l = D 4U n j,l U n j,l U n j,l U n j+,l U n j,l+ h. (9) 4

Looking at a single Fourier mode (we can now leave out the coefficient, since it will get divided out anyway), we have U n j,l eikjh e iplh, where k and p are the wave numbers in the x and y directions, and j and l are the grid indices in the x and y directions. Plugging in and dividing by e ikjh.e iplh, we have = D h (eikh + e ikh + e iph + e iph ). (0) We can use Euler s formula and the half-angle formulae on both the k and p terms. Thus, we have ( ( ) ( )) G = 4α sin + sin () We require G. We can use this to show that α 4. Notice that this is a stricter time-step restriction than in the D case! It will get worse in 3D (α 8 ). 4.4 Stability of Backward Euler on the D Heat Equation We know the pattern now. We can start with the Fourier mode plugged in, the coefficients divided out, and the e ikjh.e iplh divided out as well. We then get = DG h (eikh + e ikh + e iph + e iph ). () Using Euler s formula and the half-angle formulae, this becomes = 4 DG ( ( ) ( )) h sin + sin. (3) Multiplying through by and collecting the G terms to the left side, we get ( ( ) ( )) G + 4αG sin + sin =. (4) This implies that G = ( + 4α sin ( kh ) ( )). (5) + sin ph Clearly, once again G. Backward Euler is unconditionally stable on the D heat equation as well. 5