Numerical methods for partial differential equations
Download
1 / 43

Numerical Methods for Partial Differential Equations - PowerPoint PPT Presentation


  • 148 Views
  • Uploaded on

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

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about ' Numerical Methods for Partial Differential Equations ' - medea


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.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
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
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


Consistency of finite difference operator
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


Example euler forward right difference
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:


Quick note
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.


Second example leap frog in time and 4 th order central in space
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.


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.


Definition method order accuracy
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.


Scheme notation
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:


Stability
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.


Cont norm notation
cont (norm notation)

  • We define a discrete Euclidean norm on the discrete solution as:

  • Then the stability condition is:

  • Or equivalently:


Well posedness
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.


Consequences of well posedness
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.


cont

  • The following PDE’s are well-posed


Convergence
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)


cont

Convergence requires:

for all solutions


Lax richtmyer equivalence theorem
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.


Accuracy
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


Solution norms
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”


Approach 1 compare solution with interpolated numerical solution
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:


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:


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:


Approach 2 compare solution and numerical solution at nodes
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.


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.


Cont sketch of convergence
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)


Sketch cont
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


Cont final result
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:


Summary of convergence test for finite difference schemes
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)


Boundary conditions
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


Example right difference
Example Right-Difference

  • The obvious choice is to set the last node to be dx away from the inflow boundary


System
System

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


Interim summation by parts result
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


Energy method for semi discrete difference approximation of the upwind finite difference method
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.


cont the Upwind Finite Difference Method

  • 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


cont the Upwind Finite Difference Method

  • 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


2 nd order central boundary conditions
2 the Upwind Finite Difference Methodnd 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.


System1
System the Upwind Finite Difference Method


Interim summation by parts result 2
Interim (summation by parts) Result 2 the Upwind Finite Difference Method

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


Corollary
Corollary the Upwind Finite Difference Method

  • 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.


Example 2 energy method
Example 2: Energy Method the Upwind Finite Difference Method

  • The scheme:

  • has an energy equation (in the tailored norm):

See GKO p452 for details


Higher order boundary conditions
Higher Order + Boundary Conditions the Upwind Finite Difference Method

  • 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.


Class discussion
Class Discussion the Upwind Finite Difference Method

  • 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


Next lecture
Next Lecture the Upwind Finite Difference Method

  • Higher order PDE’s

  • 2D and 3D domains

  • i.e. wrap up of finite-difference introduction.

  • Preparation for finite-volume methods.


ad