Wolfram ResearchPRODUCTSPURCHASEFOR USERSCOMPANYOUR SITES
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.

Documentation  / Mathematica  / Built-in Functions  / Numerical Computation  / Equation Solving  / NDSolve Advanced Documentation  /

StiffnessSwitching

Introduction

The basic idea behind the StiffnessSwitching method is to provide an automatic means of switching between a non-stiff and a stiff solver.

The StiffnessTest option (described within ) provides a useful means of detecting when a problem appears to be stiff.

The StiffnessSwitching method traps any failure code generated by StiffnessTest and switches to an alternative solver.

Extrapolation provides a powerful technique for computing highly accurate solutions using dynamic order and step size selection (see for more details) and are therefore used as the default choice in StiffnessSwitching.

Examples

This loads some useful packages.

This selects a stiff problem and specifies a longer integration time interval than the default specified by the NDSolveProblem.

The default Extrapolation base method is not appropriate for stiff problems and gives up quite quickly.

NDSolve::ndstf: "At \!\(T\) == \!\(0.016098761924181776`\), system appears to be stiff. Methods Automatic, BDF or StiffnessSwitching may be more appropriate."

Instead of giving up, the StiffnessSwitching method continues the integration with a stiff solver.

The StiffnessSwitching method uses a pair of extrapolation methods as the default. The non-stiff solver uses the ExplicitModifiedMidpoint base method and the stiff solver uses the LinearlyImplicitEuler base method.

For small values of the AccuracyGoal and PrecisionGoal tolerances it can sometimes be preferable to use an explicit Runge-Kutta method for the non-stiff solver.

The ExplicitRungeKutta method eventually gives up when the problem is considered to be stiff.

NDSolve::ndstf: "At \!\(T\) == \!\(5.204811749183198`\), system appears to be stiff. Methods Automatic, BDF or StiffnessSwitching may be more appropriate."

This sets the ExplicitRungeKutta method as a sub-method of StiffnessSwitching.

A plot of the step sizes taken shows that the stiff solver eventually takes much larger steps.

Option summary

Options of the method StiffnessSwitching.



Any questions about topics on this page? Click here to get an individual response.Buy NowMore Information


 © 2009 Wolfram Research, Inc.  Terms of Use  Privacy Policy |
Sign up for our newsletter: