The Asynchronous Leapfrog Method as a Stiff ODE Solver

Initializing live version
Download to Desktop

Requires a Wolfram Notebook System

Interact on desktop, mobile and cloud with the free Wolfram Player or other Wolfram Language products.

The asynchronous leapfrog method together with a simple adaptive step-size control is tested with a well-known stiff initial value problem, which is a simplified model for an expanding flame ball. It describes the flame ball as going through three phases: slow growth, very fast expansion, and a final phase of constant size. No constant time step integrator can run through these phases in reasonable time and with normal 64-bit arithmetic. This can be considered a practical characterization of stiffness.

[more]

This Demonstration shows that an extremely simple integrator (explicit, second-order, only one evaluation of the right-hand side per time step) and a very simple step-size control master the challenge of running through the process with reasonable accuracy.

Three plots are provided to support this claim. The first one shows the computed solution in red and the much more accurate solution obtained from NDSolve superimposed in blue. We observe that the graphical resolution prevents us from clearly differentiating between the two solutions. The second plot shows the difference between the solutions in logarithmic representation and gives a clear picture of the integration error. The last plot shows how the time step evolves under adaptive step-size control for the method parameters as set via the second and third slider. These method parameters are explained in the Details section.

The default values are reasonable for all cases and variability is provided only for the investigative mind. The first slider is by far the most important. It controls the steepness of the expansion phase and thus, in a sense, the stiffness of the problem. In more general terms, it defines the initial value problem to be solved.

[less]

Contributed by: Ulrich Mutze (May 2013)
Open content licensed under CC BY-NC-SA


Snapshots


Details

This is the asynchronous leapfrog integrator for fixed step size in fully explicit form:

The initial value problem under consideration is , . The discrete trajectory gives values for the times . In addition to these values, the asynchronous leapfrog method gives velocities that are defined by the time-stepping algorithm upon initialization as .

Let and let , , and be given. Set , , , , , . Writing the step algorithm as a value change of the fixed variables , , , it becomes shorter and more symmetrical: , , , , . This is the form used in this Demonstration.

Although in our case is simply real-valued, the algorithm only assumes that its values belong to some real affine space. Our adaptive step control algorithm assumes that the underlying vector space (to which the values of belong) is a normed linear space. With a step we associate the kink . For this dimensionless quantity, we specify a tolerated maximum value , for example, 1/1000. If the kink exceeds this value, this is taken as a sign that the terrain is getting more difficult. We therefore discard the present value of and reinitialize it as , and we decrease the step size by multiplying it by , for example, . If the kink is found to be smaller than , this is taken as a sign that the terrain is getting easier, and we simply increase the step size by multiplying it with . Computing the kink does not entail an evaluation of . However, in the case of an objectionably large kink, we have to reinitialize, which does entail an evaluation of . Of course, it is not mandatory to couple the parameters for treating the easy terrain and the difficult terrain in exactly the way chosen here.

Snapshot 1: initial value set for a quite flat solution

Snapshot 2: initial value set for a very steep solution

References

[1] U. Mutze. "An Asynchronous Leap-Frog Method." (May 16, 2013) www.ma.utexas.edu/mp_arc/c/08/08-197.pdf.

[2] U. Mutze. "An Asynchronous Leap-Frog Method." (May 16, 2013) (Updated version of [1]) www.ulrichmutze.de/articles/leapfrog4.pdf.

[3] L. Shampine and S. Thompson. "Stiff Systems." Scholarpedia. (May 16, 2013) www.scholarpedia.org/article/Stiff_systems.



Feedback (field required)
Email (field required) Name
Occupation Organization
Note: Your message & contact information may be shared with the author of any specific Demonstration for which you give feedback.
Send