1 / 43

Numerical Methods for Partial Differential Equations

Numerical Methods for Partial Differential Equations. CAAM 452 Spring 2005 Lecture 8 Instructor: Tim Warburton. Recall: Convergence Conditions for LMM Time-stepping Methods.

medea
Download Presentation

Numerical Methods for Partial Differential Equations

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Numerical Methods for Partial Differential Equations CAAM 452 Spring 2005 Lecture 8 Instructor: Tim Warburton

  2. Recall: Convergence Conditions for LMM Time-stepping Methods • Establish that a unique solution to the ODE exists via Picard’s theorem (http://mathworld.wolfram.com/PicardsExistenceTheorem.html) • For time stepping Dahlquist’s Equivalence Theorem tells us that a linear multistep time-stepping formula is convergent if and only if it is consistent and stable • We can easily verify consistency by using Taylor expansions for the local truncation error. • We check stability conditions by finding roots of the stability polynomial. • A global error analysis tells us that if the right hand side function is sufficiently smooth (p times continuously differentiable), and the LMM is stable with local truncation error then the error at a fixed time converges as

  3. Consistency of Finite Difference Operator Definition: A finite difference operator is consistent if it converges towards the continuous operator of the PDE as both dt0 and dx0

  4. Example: Euler-Forward + Right Difference • The finite difference method is: • We define the local truncation error as the operator which maps the actual solution of the PDE to the correction required to make it satisfy the scheme at each time step:

  5. Quick Note • Notice that in the definition of the LTE for the finite difference scheme we have not multiplied through by dt (since that would bias the LTE with respect to dt) • In this example the scheme is said to be first order method accurate in both time and space.

  6. Second Example(Leap Frog in Time and 4th Order Central in Space) • Here we use the fourth order central differencing in space and Leap Frog in time: • The truncation error in this case is: • Thus we declare the method accuracy to be 2nd order in time and 4th order in space.

  7. cont • In this case there is a discrepancy between the magnitude of the time stepping error and the spatial error. • Using this scheme may require a smaller time step than dx to ensure that the truncation errors for each part are of similar size.

  8. Definition: Method Order Accuracy • If the local truncation error satisfies: • Then the method s order accurate in time and r’th order accurate in space. • Again – if there is a discrepancy between r and s then it may be wise to consider reducing dt (if s<r) or dx (if r<s) possibly significantly more than the CFL condition suggests.

  9. Scheme Notation • For brevity we will denote the linear finite difference schemes: • where the coefficients may depend on dt,dx as: • then the scheme reads:

  10. Stability Definition: A finite difference scheme for a first-order PDE is stable if there is an integer J and positive numbers dt0 and dx0such that for any positive time T, there is a constant CT such that: i.e. for a scheme to be stable it must not increase the “solution energy” beyond some “energy” injected at the start of the time stepping.

  11. cont (norm notation) • We define a discrete Euclidean norm on the discrete solution as: • Then the stability condition is: • Or equivalently:

  12. Well Posedness Definition: The initial value problem for a first-order PDE is well posed if the following holds for all initial data u(x,0) for some choice of norm (say with integration over the interval in x ) where the constant C(t) is independent of the solution.

  13. Consequences of Well Posedness • If a first order PDE is well posed, it satisfies an analog of the numerical stability we have been seeking. • There are two important consequences: • two initial conditions which are almost everywhere identical will generate two solutions which are almost everywhere identical. • two solutions which start close together will remain close together almost everywhere.

  14. cont • The following PDE’s are well-posed

  15. Convergence Definition: A one-step finite difference scheme approximating a PDEis a convergent scheme if for any solution to the PDE ,u(x,t), with solution to the finite difference scheme, , such that converges to as m*dx converges to x,then converges to u(x,t) as (m*dx,n*dt) converges to(x,t) as (dt,dx)  (0,0)

  16. cont Convergence requires: for all solutions

  17. Lax-Richtmyer Equivalence Theorem Theorem: A consistent finite difference scheme for a partial differential equation for which the initial value problem is well-posed is convergent if and only if it is stable.

  18. Accuracy • There is a technical issue in comparing the numerical solution and the actual solution. • For any specific resolution (choice of dt,dx) the numerical solution is defined at discrete points in space and time. • However, the actual solution to the PDE is defined over the entire interval. • We now discuss how to compare these very different representations

  19. Solution Norms • We will need to compare two solutions over the periodic interval. • We will use conventional L2 and slightly less conventional Hs,Sobolev, norms: • Notice – this Sobolev norm is constructed with respect to “Fourier derivatives”

  20. Approach 1) Compare Solution With Interpolated Numerical Solution • In the first approach we compare the actual solution and a trigonometric interpolation of the numerical solution. • We find a Fourier sum which interpolates the numerical solution at the M data points. • i.e. we form a Fourier series with uhat coefficients:

  21. cont • Where we demand that the interpolant agrees with the vector of values of the numerical solution • The interpolant is a map from discrete points to a function defined on the periodic interval, which we will denote as:

  22. cont Where F is the discrete Fourier transform from Lecture 6 Then a theorem indicating solution accuracy is: Theorem: If the initial value problem for a linear PDE (for which the initial value problem is well-posed), is approximated by a stable one-step finite difference scheme which is r’th order method accurate in space and s’th order in time (with r<=s) and the initial function is the initial condition truncated to its lowest M Fourier modes then for each time T there exists a constant CT such that:

  23. Approach 2) Compare Solution and Numerical Solution at Nodes • It is trickier to perform a pointwise evaluation of the difference between the numerical solution and the exact solution. • The primary difficulty is that solutions in L2 are equivalent if they only differ on a set of measure zero. • Since the set of data points is a set of measure zero the evaluation of an L2 solution at the points is not well defined.

  24. cont We rely on the following approximation result Theorem 1.3.4 GKO: Let u be a periodic function and assume that its Fourier coefficients satisfy: Then: where the norm is the sup norm. The assumption on the coefficients implies at least the m’th order Fourier derivative exists.

  25. cont (sketch of convergence) • With this estimate in hand: • We consider: Compare interpolant of solution and numerical solution started with M term series truncation of solution: Bound by approximation estimate(assumes regularity of solution)

  26. Sketch cont • Bounded by approximation result • use well posedness to bound in terms of the initial data Bounded by “approach 1” Bounded by stability of method and accuracy ofinitial condition • Notice we use: • regularity of the solution • well posedness of the initial value problem • comparison of interpolated numerical solution with solution • stability of method • accuracy of initial condition

  27. cont (final result) We are left with the final accuracy estimate theorem Theorem: If the initial value problem for a PDE for which the initial valueproblem is well posed, is approximated by a stable one-stepfinite difference scheme that is r’th order in space and s’th orderin time with r<=s and the initial condition then for each positive time T, there is a constant CT such that:

  28. Summary of Convergence Test for Finite Difference Schemes • Is the PDE well posed (if in doubt look it up) ? • Is the finite-difference method stable ? • use the method of lines • a standard time-stepping method has a known region of absolute stability  bound for dt*maximum eigenvalue of the spatial operator • Is the finite-difference method consistent • use a Taylor series to estimate the local truncation in both time and space • what is the method order of accuracy ? • beware the case of low regularity initial data  unbounded remainder terms from Taylor series analysis Finally, if the method order is p then the error analysis gives order p in the solution (assuming the solution has p bounded Fourier derivatives)

  29. Boundary Conditions • We are now faced with the inevitable discussion of how to apply boundary conditions for a non-periodic domain. • The advection equation only requires inflow data at the node advection direction x

  30. Example Right-Difference • The obvious choice is to set the last node to be dx away from the inflow boundary

  31. System • An example system for 10 data points this time looks like:

  32. Interim (summation by parts) Result First we define a discrete inner-product: and associated norm: Lemma (summation by parts formula): This looks very much like an integration by parts formula, but in this case with a discrete inner-product

  33. Energy Method for Semi-discrete Difference Approximation of the Upwind Finite Difference Method • We assume exact treatment of the time variable and 1st order upwind in the space derivative. • The left hand side represents the time rate change of a numerical energy.

  34. cont • The right hand side indicates that the scheme is dissipative and the only “source” is from the inflow boundary condition. • i.e. the total energy can only increase by input from the boundary condition

  35. cont • Thus: • we are certainly in good shape (see GKO p448 for generalization to discrete in time and space). • The big “but” for this method is that it is first order in space • A method of lines analysis reveals that all the eigenvalues of the homogeneous operator are –c/dx and then we have to rely on further results on the impact of lower order terms (in this case the boundary condition contribution) on the stability of finite difference schemes

  36. 2nd Order Central + Boundary Conditions • Consider the following semi-discrete scheme: • We need special treatments for the two end points – as the stencil extends beyond the end of the data. • At the zero node we use the first order upwind condition: • At the M’th node we supply the inflow data as before.

  37. System

  38. Interim (summation by parts) Result 2 We define a modified discrete inner-product: and associated norm: Lemma (summation by parts formula with central differences): This looks very much like an integration by parts formula, but in this case with a discrete inner-product

  39. Corollary • Setting v=u • This looks rather like a discrete analog of the divergence theorem (or integration by parts). • The end point evaluation is now approximated by an average of the end point and neighbor.

  40. Example 2: Energy Method • The scheme: • has an energy equation (in the tailored norm): See GKO p452 for details

  41. Higher Order + Boundary Conditions • It is possible to apply modification to the higher order central differences but it gets quite complicated. • We will reserve higher order treatment of boundary conditions for finite-element and discontinuous Galerkin where it is more straightforward to accommodate boundary conditions (i.e. I have chickened out). • For the interested, see GKO p474-484 for some non trivial manipulations to the difference operators to accommodate the boundary conditions in a stable manner.

  42. Class Discussion • Pros and cons of finite difference methods • ease of implementation in simple geometries • locality of derivatives • cheap!!!!!!!!!! • time stepping condition not generally artificially costly • difficulty of implementing boundary conditions • technical difficulties in analysis • spurious modes • Boundary conditions • using extra points at boundary • maintaining stability • one sided stencil interpolation • Geometry • stair stepping in 2D,3D • embedded methods

  43. Next Lecture • Higher order PDE’s • 2D and 3D domains • i.e. wrap up of finite-difference introduction. • Preparation for finite-volume methods.

More Related