Presentation is loading. Please wait.

Presentation is loading. Please wait.

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

Similar presentations


Presentation on theme: "Numerical Methods for Partial Differential Equations CAAM 452 Spring 2005 Lecture 8 Instructor: Tim Warburton."— Presentation transcript:

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

2 CAAM 452 Spring 2005 Recall: Convergence Conditions for LMM Time-stepping Methods i.Establish that a unique solution to the ODE exists via Picard’s theorem (http://mathworld.wolfram.com/PicardsExistenceTheorem.html)http://mathworld.wolfram.com/PicardsExistenceTheorem.html ii.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 iii.We can easily verify consistency by using Taylor expansions for the local truncation error. iv.We check stability conditions by finding roots of the stability polynomial. v.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 CAAM 452 Spring 2005 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 CAAM 452 Spring 2005 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 CAAM 452 Spring 2005 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 CAAM 452 Spring 2005 Second Example (Leap Frog in Time and 4 th 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 2 nd order in time and 4 th order in space.

7 CAAM 452 Spring 2005 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 CAAM 452 Spring 2005 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 CAAM 452 Spring 2005 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 CAAM 452 Spring 2005 Stability Definition: A finite difference scheme for a first-order PDE is stable if there is an integer J and positive numbers dt 0 and dx 0 such that for any positive time T, there is a constant C T 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 CAAM 452 Spring 2005 cont (norm notation) We define a discrete Euclidean norm on the discrete solution as: Then the stability condition is: Or equivalently:

12 CAAM 452 Spring 2005 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 CAAM 452 Spring 2005 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 CAAM 452 Spring 2005 cont The following PDE’s are well-posed

15 CAAM 452 Spring 2005 Convergence Definition: A one-step finite difference scheme approximating a PDE is 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 CAAM 452 Spring 2005 cont Convergence requires: for all solutions

17 CAAM 452 Spring 2005 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 CAAM 452 Spring 2005 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 CAAM 452 Spring 2005 Solution Norms We will need to compare two solutions over the periodic interval. We will use conventional L 2 and slightly less conventional H s,Sobolev, norms: Notice – this Sobolev norm is constructed with respect to “Fourier derivatives”

20 CAAM 452 Spring 2005 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 CAAM 452 Spring 2005 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 CAAM 452 Spring 2005 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 C T such that: cont

23 CAAM 452 Spring 2005 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 L 2 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 L 2 solution at the points is not well defined.

24 CAAM 452 Spring 2005 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 CAAM 452 Spring 2005 cont (sketch of convergence) With this estimate in hand: We consider: Bound by approximation estimate (assumes regularity of solution) Compare interpolant of solution and numerical solution started with M term series truncation of solution:

26 CAAM 452 Spring 2005 Sketch cont i.Bounded by approximation result ii.use well posedness to bound in terms of the initial data Bounded by “approach 1”Bounded by stability of method and accuracy of initial 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 CAAM 452 Spring 2005 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 value problem is well posed, is approximated by a stable one-step finite difference scheme that is r’th order in space and s’th order in time with r<=s and the initial condition then for each positive time T, there is a constant C T such that:

28 CAAM 452 Spring 2005 Summary of Convergence Test for Finite Difference Schemes i.Is the PDE well posed (if in doubt look it up) ? ii.Is the finite-difference method stable ? i.use the method of lines ii.a standard time-stepping method has a known region of absolute stability  bound for dt*maximum eigenvalue of the spatial operator iii.Is the finite-difference method consistent i.use a Taylor series to estimate the local truncation in both time and space iv.what is the method order of accuracy ? i.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 CAAM 452 Spring 2005 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 x advection direction

30 CAAM 452 Spring 2005 Example Right-Difference The obvious choice is to set the last node to be dx away from the inflow boundary

31 CAAM 452 Spring 2005 System An example system for 10 data points this time looks like:

32 CAAM 452 Spring 2005 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 CAAM 452 Spring 2005 Energy Method for Semi-discrete Difference Approximation of the Upwind Finite Difference Method We assume exact treatment of the time variable and 1 st order upwind in the space derivative. The left hand side represents the time rate change of a numerical energy.

34 CAAM 452 Spring 2005 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 CAAM 452 Spring 2005 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 CAAM 452 Spring 2005 2 nd 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 CAAM 452 Spring 2005 System

38 CAAM 452 Spring 2005 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 CAAM 452 Spring 2005 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 CAAM 452 Spring 2005 Example 2: Energy Method The scheme: has an energy equation (in the tailored norm): See GKO p452 for details

41 CAAM 452 Spring 2005 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 CAAM 452 Spring 2005 Class Discussion i.Pros and cons of finite difference methods i.ease of implementation in simple geometries ii.locality of derivatives iii.cheap!!!!!!!!!! iv.time stepping condition not generally artificially costly v.difficulty of implementing boundary conditions vi.technical difficulties in analysis vii.spurious modes ii.Boundary conditions i.using extra points at boundary ii.maintaining stability iii.one sided stencil interpolation iii.Geometry i.stair stepping in 2D,3D ii.embedded methods

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


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

Similar presentations


Ads by Google