Numerical Methods for Partial Differential Equations CAAM 452 Spring 2005 Lecture 5 Summary of convergence checks for LMM and one-step time stepping Instructor:

Slides:



Advertisements
Similar presentations
Finite Difference Discretization of Hyperbolic Equations: Linear Problems Lectures 8, 9 and 10.
Advertisements

5.1 Real Vector Spaces.
Numerical Methods for Partial Differential Equations CAAM 452 Spring 2005 Lecture 9 Instructor: Tim Warburton.
Computational Modeling for Engineering MECN 6040
Chapter 8 Elliptic Equation.
CSE245: Computer-Aided Circuit Simulation and Verification Lecture Note 5 Numerical Integration Prof. Chung-Kuan Cheng 1.
Numerical Computation
Lecture 18 - Numerical Differentiation
EARS1160 – Numerical Methods notes by G. Houseman
CSE245: Computer-Aided Circuit Simulation and Verification Lecture Note 5 Numerical Integration Spring 2010 Prof. Chung-Kuan Cheng 1.
Ch 5.2: Series Solutions Near an Ordinary Point, Part I
Lecture 2: Numerical Differentiation. Derivative as a gradient
Introduction to Numerical Methods I
Subdivision Analysis via JSR We already know the z-transform formulation of schemes: To check if the scheme generates a continuous limit curve ( the scheme.
Numerical Methods for Partial Differential Equations CAAM 452 Spring 2005 Lecture 11 Instructor: Tim Warburton.
Numerical Methods for Partial Differential Equations CAAM 452 Spring 2005 Instructor: Tim Warburton.
Ordinary Differential Equations (ODEs)
Numerical Methods for Partial Differential Equations CAAM 452 Spring 2005 Lecture 9 Instructor: Tim Warburton.
Numerical Methods for Partial Differential Equations CAAM 452 Spring 2005 Lecture 2 Instructor: Tim Warburton.
Numerical Methods for Partial Differential Equations CAAM 452 Spring 2005 Lecture 6 Various Finite Difference Discretizations for the Advection Equations.
Numerical Methods for Partial Differential Equations
Computational Methods in Physics PHYS 3437 Dr Rob Thacker Dept of Astronomy & Physics (MM-301C)
Numerical Methods for Partial Differential Equations CAAM 452 Spring 2005 Lecture 8 Instructor: Tim Warburton.
Ch 8.1 Numerical Methods: The Euler or Tangent Line Method
Interpolation. Interpolation is important concept in numerical analysis. Quite often functions may not be available explicitly but only the values of.
Lecture 22 MA471 Fall Advection Equation Recall the 2D advection equation: We will use a Runge-Kutta time integrator and spectral representation.
Lecture 22 - Exam 2 Review CVEN 302 July 29, 2002.
Extrapolation Models for Convergence Acceleration and Function ’ s Extension David Levin Tel-Aviv University MAIA Erice 2013.
1 Spring 2003 Prof. Tim Warburton MA557/MA578/CS557 Lecture 5a.
Numerical Methods for Partial Differential Equations CAAM 452 Spring 2005 Lecture 3 AB2,AB3, Stability, Accuracy Instructor: Tim Warburton.
Lecture 3.
1 EEE 431 Computational Methods in Electrodynamics Lecture 4 By Dr. Rasime Uyguroglu
MA/CS 375 Fall MA/CS 375 Fall 2002 Lecture 31.
Integration of 3-body encounter. Figure taken from
1 Spring 2003 Prof. Tim Warburton MA557/MA578/CS557 Lecture 8.
To Dream the Impossible Scheme Part 1 Approximating Derivatives on Non-Uniform, Skewed and Random Grid Schemes Part 2 Applying Rectangular Finite Difference.
Programming assignment #2 Solving a parabolic PDE using finite differences Numerical Methods for PDEs Spring 2007 Jim E. Jones.
7. Introduction to the numerical integration of PDE. As an example, we consider the following PDE with one variable; Finite difference method is one of.
Engineering Analysis – Computational Fluid Dynamics –
CHAPTER 3 NUMERICAL METHODS
MECN 3500 Inter - Bayamon Lecture 9 Numerical Methods for Engineering MECN 3500 Professor: Dr. Omar E. Meza Castillo
16.920J/SMA 5212 Numerical Methods for PDEs Lecture 5 Finite Differences: Parabolic Problems B. C. Khoo Thanks to Franklin Tan SMA-HPC ©2002 NUS.
Large Timestep Issues Lecture 12 Alessandra Nardi Thanks to Prof. Sangiovanni, Prof. Newton, Prof. White, Deepak Ramaswamy, Michal Rewienski, and Karen.
1 Spring 2003 Prof. Tim Warburton MA557/MA578/CS557 Lecture 24.
1 Spring 2003 Prof. Tim Warburton MA557/MA578/CS557 Lecture 23.
Numerical Methods for Partial Differential Equations CAAM 452 Spring 2005 Lecture 12 Instructor: Tim Warburton.
1 Lecture 4: March 13, 2007 Topic: 1. Uniform Frequency-Sampling Methods (cont.)
Advanced Engineering Mathematics, 7 th Edition Peter V. O’Neil © 2012 Cengage Learning Engineering. All Rights Reserved. CHAPTER 4 Series Solutions.
ECE 576 – Power System Dynamics and Stability Prof. Tom Overbye Dept. of Electrical and Computer Engineering University of Illinois at Urbana-Champaign.
Ordinary Differential Equations
Solving Scalar Linear Systems A Little Theory For Jacobi Iteration
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Part 6 - Chapters 22 and 23.
1 Spring 2003 Prof. Tim Warburton MA557/MA578/CS557 Lecture 25.
1 Spring 2003 Prof. Tim Warburton MA557/MA578/CS557 Lecture 32.
1 Spring 2003 Prof. Tim Warburton MA557/MA578/CS557 Lecture 28.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Chapter 21 Numerical Differentiation.
Lecture 11 Alessandra Nardi
Numerical Methods for Partial Differential Equations
EEE 431 Computational Methods in Electrodynamics
Introduction to Numerical Methods I
Lecture 19 MA471 Fall 2003.
Interpolation.
CSE 245: Computer Aided Circuit Simulation and Verification
Finite Volume Method for Unsteady Flows
Research Methods in Acoustics Lecture 9: Laplace Transform and z-Transform Jonas Braasch.
topic4: Implicit method, Stability, ADI method
MATH 175: Numerical Analysis II
topic4: Implicit method, Stability, ADI method
Presentation transcript:

Numerical Methods for Partial Differential Equations CAAM 452 Spring 2005 Lecture 5 Summary of convergence checks for LMM and one-step time stepping Instructor: Tim Warburton

CAAM 452 Spring 2005 Today I will summarize the steps we took to examine the stability, consistency and thus convergence of the AB and RK schemes

CAAM 452 Spring 2005 AB The general AB scheme reads: To check linear stability we assume that f is linear in u (we can also achieve a similar goal by assuming f is Lipschitz) Assuming: We know that all the solutions of this recurrence relationship are bounded provided the corresponding stability polynomial: has roots which satisfy the root condition (all roots bounded by 1, and if they have magnitude 1 must be simple roots).

CAAM 452 Spring 2005 AB cont We must then check the roots of: For roots with |z|<1 we are sure that the method is stable. What we wish to know is what values of mu*dt guarantee this condition. We can think of this formula defining a map between the (complex) plane of roots to the (complex) plane of mu*dt We must determine the image of the unit circle in the root plane in the mu*dt plane.

CAAM 452 Spring 2005 AB cont Given the root equation: We determine the map in a trivial manner: Example AB3:

CAAM 452 Spring 2005 AB3 Stability

CAAM 452 Spring 2005 AB Accuracy Next we perform a local truncation error analysis. That is we estimate what correction at each step of the solution is required for the exact solution of the ODE to be a solution to the numerical method:

CAAM 452 Spring 2005 cont We now use Taylor expansions to express the truncation error in terms of u and its derivatives at tn: We found that Tn scaled as: Finally we apply Dahlquist’s equivalence theorem, which requires consistency and stability  convergence and corollary which gives us global error estimates:

CAAM 452 Spring 2005 RK Analysis A similar analysis is required for the Runge-Kutta schemes. The stability analysis was straightforward as we found that the recurrence for a linear f was: For stability we required: We examined this by setting

CAAM 452 Spring 2005 RK3 Stability and let Matlab do the work.

CAAM 452 Spring 2005 RK Accuracy The error estimate process for RK schemes is a little more complicated, but still boils down to dt expansions of the one-step operator. Again, once we have consistency and stability we have convergence.

CAAM 452 Spring 2005 Implicit Schemes Later on in the semester we will discuss implicit schemes. Then we will also discuss the Butcher block formulation of RK methods.

CAAM 452 Spring 2005 After Time Stepping… Back to PDE’s We have now proposed two quite distinct but reliable ways to advance an ODE approximately in time. But our original goal was to solve a PDE And not just for one mode.

CAAM 452 Spring 2005 Sample Points in Time Space We chose to sample the ODE at discrete points on the time axis. We can also make the same choice for the spatial representation at each discrete time level. We follow this choice with the dilemma of how to reconstruct an approximation to the derivative of discretely sampled data. x

CAAM 452 Spring 2005 Choice of Stencil x x x x x And many more combinations

CAAM 452 Spring 2005 Use Taylor’s Series In much the same spirit as time-domain we can expand the solution at each grid point in terms of u and its derivatives as a power series in dx (the space between spatial grid points) Examples:

CAAM 452 Spring 2005 Left Differencing Using the data points on this stencil we wish to compute an approximation to the gradient of u at Dividing and rearranging we find: x

CAAM 452 Spring 2005 Left Differencing x This gives us an obvious one-sided linear interpolation formula of the derivative. We will later on decide whether it is suitable for time-stepping with AB or RK.

CAAM 452 Spring 2005 We define the following difference operator (appalling but fairly standard notational choice): Where represents the function sampled at the m’th data point. The difference formula shows Left Difference Operator i.e. delta- is a first order approximation of the derivative operator

CAAM 452 Spring 2005 Right Difference Operator x i.e. delta+ is a first order approximation of the derivative operator

CAAM 452 Spring 2005 Central Differencing Operator Subtracting the forward and backward expansions: We obtain: x

CAAM 452 Spring 2005 cont i.e. the central differencing operator is second order accurate in dx Note: for the error term to be bounded we require that the third derivative be bounded.

CAAM 452 Spring 2005 Approximating the Second Derivative We can create an approximation of the second derivative:

CAAM 452 Spring 2005 cont

CAAM 452 Spring 2005 Delta Operators

CAAM 452 Spring 2005 Using the delta’s: Example 1 We use:

CAAM 452 Spring 2005 Example 2 We can use the difference operators to eliminate the third order spatial derivative:

CAAM 452 Spring 2005 Example 2 cont We can expand out the difference operator And we have a super difference formula for the derivative which is 4 th order accurate! What is the stencil for this formula ? (volunteer)

CAAM 452 Spring 2005 Example 2 cont We can think of this difference formula as a matrix operator acting on the point data values aligned in a vector: Becomes

CAAM 452 Spring 2005 For 10 Points on a Periodic Interval Notice: the matrix is skew-symmetrix  imaginary eigenvalues

CAAM 452 Spring 2005 Diagonalize We now use this formula in the PDE which we evaluate at the 10 spatial sample points: This is an identity (although we are a little fuzzy about the O(dx^4) term)

CAAM 452 Spring 2005 Some Notation We will represent the set of data values at the spatial points as a vector:

CAAM 452 Spring 2005 cont The system matrix is an approximation of the derivative operator so we will denote it as D

CAAM 452 Spring 2005 PDE  System of ODE’s -> Decoupled ODE’s So we can express the PDE as: Let’s make a semi-discrete scheme: As a theoretical exercise we can diagonalize the skew symmetric D operator with a diagonal matrix. Then:

CAAM 452 Spring 2005 cont The system of 10 ODE’s: are now totally decoupled, so we can apply our extensive knowledge of treating scalar ODE’s to each of the components of vhat. All we have to do is make sure that the eigenvalues of the cD matrix are squeezed into the time- stepping region by choosing small enough dt

CAAM 452 Spring 2005 cont By linearity of the right hand side we can be sure that time stepping (say using AB or RK) the original ODE will be fine as long as fits in the relevant stability region… We now need to solve: Noting our studies of the stability regions, the fact that all the eigenvalues sit on the imaginary axis rules out –Euler-Forward (unconditionally unstable) –AB2 and RK2 (marginally stable)

CAAM 452 Spring 2005 cont In this case we can use Gerschgorin’s theorem to bound the magnitude of the eigenvalues. The Gerschgorin disk for each row is centered at zero with radius:

CAAM 452 Spring 2005 Cont (dt estimate) The skew symmetry tells us the eigenvalues are on the imaginary axis so we know that if: is in the stability region we have sufficient conditions for stability of the ODE. This is a pretty good estimate, as the eigenvalues given by Matlab for the 10x10 matrix are:

CAAM 452 Spring 2005 Comment on Gerschgorin Bound The Gerschgorin estimate was pretty good in this case (we suggested eigenvalues in i*[-1.5,1.5] ) >> 12*dxD ans = >> [v,dxD] = test4th(10); >> >> v v = i i i i i i i i i i

CAAM 452 Spring 2005 Note on Those Eigenvalues What should the eigenvalues of the derivative operator ideally tend to in the limiting of decreasing dx? Example (10, 20, 80 points with the periodic length 2*pi): >> [dxDeigs, dxD] = test4th(10); >> dx = 2*pi/10; >> sort(dxDeigs/dx) ans = i i i i i i i i i i >> [dxDeigs, dxD] = test4th(20); >> dx = 2*pi/20; >> >> e = sort(dxDeigs/dx); >> e(1:10) ans = i i i i i i i i >> [dxDeigs, dxD] = test4th(80); >> dx = 2*pi/80; >> e = sort(dxDeigs/dx); >> >> e(1:10) ans = i i i i i i i i i i

CAAM 452 Spring 2005 cont From Fourier analysis we know that the field u, if sufficiently smooth has a Fourier representation. Taking the first derivative we achieve: Also, each Fourier mode is an eigenfunction of the differentiation operator with eigenvalue

CAAM 452 Spring 2005 cont By the completeness of the Fourier modes, we would hope the eigenvalues of the discrete approximation differentation operator would converge to However, we see an oddity There is the +/ in there. More about this later. >> [dxDeigs, dxD] = test4th(80); >> dx = 2*pi/80; >> e = sort(dxDeigs/dx); >> >> e(1:10) ans = i i i i i i i i i i

CAAM 452 Spring 2005 Using RK4 To avoid confusion with subindices for the vector, we have used super indices to represent the time level.

CAAM 452 Spring 2005 Using AB4

CAAM 452 Spring 2005 That’s a Scheme Without much trouble we have created a stable finite difference scheme for the advection equation – given the local truncation errors are small we might expect that the scheme is high order too. We will examine the accuracy and conditions for convergence of this kind of finite difference scheme next lecture. However, I did steer the choice of spatial difference discretization towards a skew symmetric operator I will motivate the choices next lecture.

CAAM 452 Spring 2005 Homework 2 (due 02/03/2005) Q1) Implement the 6 stage, 5 th order Runge-Kutta from: Use equations: , , with coefficients at the top of table 717 (Cash-Karp coefficients provided on the website) Q1a) Solve Q1b) Estimate dtmax by concocting a Lipschitz constant for the right hand side of the ODE. Q1c) Solve 4 times, using (i) dt=dtmax (ii) dt=dtmax/2 (iii) dt=dtmax/5 (iv) dt=dtmax/6At each time step estimate the error (using ) and compare with actual error (plot both on a graph, use log scale if necessary).