pdsolve/numeric/errorcontrol  find a numerical solution of PDE with an error approximation, or within a certain tolerance

Calling Sequence


pdsolve(PDE, conditions, numeric, meth, options)


Parameters


PDE



single or set or list of timedependent partial differential equations in two independent variables

conditions



set or list of initial and boundary conditions

numeric



keyword indicating a numerical solution is to be obtained

meth



(optional) method description of the form method=theta or method=

options



(optional) equations of the form keyword = value where keyword is one of 'errorest, 'errortype', 'abstol', mintimestep, and maxtimestep





Description


•

This page describes options and capabilities specific to use of error estimation and error control with numeric PDE solution.

•

There are two main operating modes for PDE solution with error estimation. The first simply provides viewable information on the approximate errors of the solution, while the second provides an automatic control mechanism, whereby the time step is adjusted to keep the error per unit step within a specified bound.

•

Information on the error estimation process is provided in Details below.



Options



The relevant options are as follows.


Specifies whether error estimates are to be computed. If error control is in use (that is, 'abstol' was specified), then this is true automatically.


Specifies the form of the error estimates to be viewed.


 The option 'accumulated' (the default) provides an error estimate at any given time as the sum of the error estimates for all prior time steps from the start of the problem. This option is most useful in obtaining solutions with approximate error bounds.


 The option 'singlestep' provides a local error estimate for the current step. This option is most useful in determining where the local error in a solution is most problematic.


In addition to providing an upper bound on the local estimate of the time and spatial errors per unit step, use of this option indicates that time adaptation should be used.


Note: This upper bound is used independently on the two error estimators, meaning that it is used to control errors due to the spatial discretization and errors due to the time discretization separately. If an overall total error bound is required, then 'abstol' should be specified as half the desired value.


Another consideration here is that only the time step can be adjusted to reduce the error (the spatial mesh is fixed), so if the spatial error estimate exceeds the tolerance, then the integration halts with an appropriate error message.


This option provides an absolute minimum value for the time step taken to compute a requested solution. By default, the value is 1/1000th the initial time step (either the default, or specified by the timestep value).


This option provides an absolute maximum value for the time step taken to compute a requested solution. By default, the value is 100 times the initial time step (either the default, or specified by the timestep value).

•

Error estimates can be used in the dependent variable specification of the plot, animate, and value methods of the returned module.


The additional shortcuts terr(), , and err() are provided to display the maximum time, space, or total error for all solution components. This is only useful if the input PDE is higher than first order, or the input PDE is a system.



Details



The error estimators used, in both the visual error estimates and the error control, are simply local truncation error estimates for the PDE or PDE system. Essentially, what is done is to compute the solution on a different mesh, and use the difference between solutions to estimate the error.


The spatial error estimate is obtained by comparing the solution to another computed on a coarser spatial mesh, but for the same time step. This gives an estimate of the local truncation error (where is the mesh spacing for the spatial variable).


It is important to note that these estimates are local, so they do not account for situations where a small perturbation in the solution at a time can result in a large change in the solution at a later time .



Examples


Simple oneway wave equation with error estimates. Comparison at two sets of step sizes.
>


 (1) 
>


 (2) 
>


 (3) 
>


>


>


Comparison of error estimate and true error (for this problem the exact solution is known).
>


 (4) 
>


In this case, the error estimate is somewhat pessimistic.
A nonlinear PDE with a forming shock layer using error control
>


 (5) 
>


 (6) 
>


 (7) 
>


You must decrease the space step size. A little experimentation shows that you can get to t=0.5 with:
>


And at that time, the spatial error looks like
>



