Scholarpedia is supported by Brain Corporation
Stiff Systems
Lawrence F. Shampine and Skip Thompson (2007), Scholarpedia, 2(3):2855. | doi:10.4249/scholarpedia.2855 | revision #139228 [link to/cite this article] |
Contents |
What is Stiffness?
Stiff systems of ordinary differential equations are a very important special case of the systems taken up in Initial Value Problems. There is no universally accepted definition of stiffness. Some attempts to understand stiffness examine the behavior of fixed step size solutions of systems of linear ordinary differential equations with constant coefficients. The eigenvalues \lambda_i of the Jacobian matrix completely characterize the stability of the system in this case. They also determine the behavior of explicit numerical methods applied to the system.
Solutions of the test equation y'(t) = \lambda_i y(t), \quad y(0) = 1.
This measure is extended to general differential equations by considering eigenvalues of the local Jacobian matrix. It should be noted that L is not invariant under a simple rescaling of the problem. That raises the distinction between the mathematical problem and the computational problem. The computational problem includes the nature of the error control and the error tolerances; and whether a problem is stiff may depend on this. In particular, rescaling a problem must include a corresponding change of error control if an equivalent problem is to be solved. It might also be remarked that pure imaginary eigenvalues are not allowed in these measures of stiffness because problems with high frequency oscillations require a completely different approach. An alternative measure is the ratio of the local solution time scale (or resolution step size) to the smallest damping time constant, min[-1/Re(\lambda_i)]\ . This can be more useful when some Re(\lambda_i) > 0 or when some other driving term sets the local solution time scale. Finally, it should also be pointed out that some authors prefer to use the stiffness ratio S = \frac{\max |Re(\lambda_i)|} {\min |Re(\lambda_i)|} .
Generally, we consider a system to be stiff if the stiffness index is "large." More specifically, a system is considered to be stiff on an interval [t_0,t_f] if L(t_f - t_0) \gg 1 \ . Often the role of the interval is overlooked, though we will see below that what might seem a small value of L could contribute to a stiff problem because the interval is long. We have seen examples for which the reverse is true. For instance, a nuclear reactor water hammer modeled by a system of several thousand differential equations had an L that was extremely large. Nevertheless, the model was easily solved using explicit methods because the time interval of interest was a fraction of a millisecond and as a consequence, the problem was not stiff.
Computational Stiffness
Stiffness ratios are helpful as far as they go, but they do not account adequately for several important practical issues. Some authors (Gear (1971)) prefer to approach the question of stiffness using a different test equation y'(t) = A (y - F(t)) + F'(t).
It must be recognized that stiff problems in practice can have eigenvalues with positive real part as long as they are not too big. The stiffness ratio is not defined in this case and in particular, it is not defined for the common case of linear conservation laws which result in zero eigenvalues. Indeed, the classic Robertson chemical kinetics problem (http://www.dm.uniba.it/~testset/) typically used to illustrate stiffness has two zero eigenvalues. Any definition of stiffness that does not apply to this standard test problem is not very useful. The stiffness ratio is not applicable to a scalar problem, hence is not applicable to the combustion example in the next section.
The stiffness ratio does not account for the role of the interval. Exercise 9.1 in Shampine (1994) provides two kinds of examples that show that for this reason the stiffness ratio can say that a problem is stiff, but it is in fact not stiff as far as any popular code is concerned, and vice versa. The stiffness ratio does not account for eigenvalues that are relatively near the imaginary axis. Stiffness in such a case depends on precisely which method is being used because methods typically have less satisfactory stability then. In particular, moderate to high order BDFs can suffer from stiffness when solving such a problem just as much as explicit Runge-Kutta methods.
There is clearly a conflict between wanting a precise mathematical definition of stiffness and the practical issue of what kind of code will perform in an acceptable way. In this context it is instructive to refer to a comment of Germund Dahlquist quoted in Exercise 9.1 of Shampine (1994): "The stiffness ratios used by some authors ... may be of use when one estimates the amount of work needed, if a stiff problem is to be solved with an explicit method, but they are fairly irrelevant in connection with implicit methods...."
We hasten to point out that the above definitions ignore the crucial role of per-step costs. More specifically, the choice of methods should include the cost of taking a step with a suitable stiff method versus the corresponding cost with a nonstiff method. In fact, the gain in step size achieved with a stiff method is offset somewhat by its higher per-step cost; so for a mildly stiff problem a nonstiff method may be cheaper.
An Example
A simple combustion model O'Malley (1991) and Shampine et al. (2003) shows what is special about solving stiff systems numerically. For very small values of \epsilon > 0\ , the concentration y(t) of a reactant satisfies y'(t) = y^2 (1 - y), \quad 0 \le t \le 2/ \epsilon, \quad y(0) = \epsilon
Stability Issues
The Euler methods are easy to analyze and they show what can happen with other methods. When the step size is a constant h\ , the explicit (forward) Euler method (AB1) applied to the test equation results in y_{n} = { \left( 1 + h \lambda_i \right) }^n\ . For the method to be stable, the y_n must decay to 0 as t_n increases. Clearly this happens only if | \left(1 + h \lambda_i \right) | < 1\ , which is to say that h\lambda_i must lie inside a unit circle centered at (-1,0)\ . Such a region is called a stability region. When |Re(\lambda_i)| is large compared to the length of the interval of integration, the solution quickly becomes very easy to approximate in the sense of absolute error. The problem is stiff for this method because a step size that approximates the solution well must be severely restricted to keep the computation stable. It is illuminating to observe that this problem is not stiff when a relative error control is used because the step size must be restricted to achieve the desired accuracy for all time. The implicit Backward Euler method (BDF1) y_{n+1} = y_n + h \lambda_i \, y_{n+1}
Implicit Methods
The backward Euler method has excellent stability, but it is an implicit method. Simple iteration is the standard way to evaluate implicit methods when solving non-stiff problems, but if we use it to evaluate the formula of (BDF1), we have y_{n+1}^{[m+1]} = y_n + h \lambda_i \, y_{n+1}^{[m]}
Further Reading and Stiff IVP Solvers
The text Shampine et al. (2003) is an introduction to methods and software for stiff systems in the problem solving environment MATLAB. They are discussed at a similar level in Ascher and Petzold (1998) and at a higher level in Gear (1971) and Hairer and Wanner (1991). All these texts provide references to software. The book Aiken (1985) is a survey of the art and practice of stiff computation that contains a large bibliography. GAMS, the Guide to Available Mathematical Software (http://gams.nist.gov/), is a convenient way to locate software for solving stiff systems numerically. In addition, SUNDIALS Equation Solvers describes the SUNDIALS collection of stiff solvers available for solving extremely large systems of ordinary differential equations arising from the spatial discretization of multi-dimensional systems of partial differential equations.
References
- R.C. Aiken, ed., Stiff Computation, Oxford University Press, Oxford, U.K., 1985.
- U.M. Ascher and L.R. Petzold, Computer Methods for Ordinary Differential Equations and Differential--Algebraic Equations, SIAM, Philadelphia, 1998.
- C.W. Gear, Numerical Initial Value Problems in Ordinary Differential Equations, Prentice--Hall, Englewood Cliffs, NJ, 1971.
- E. Hairer and G. Wanner, Solving Ordinary Differential Equations II, Stiff and Differential--Algebraic Problems, Springer--Verlag, Berlin, 1991.
- R.E. O'Malley, Singular Perturbation Methods for Ordinary Differential Equations, Springer--Verlag, New York, 1991.
- L.F. Shampine, Numerical Solution of Ordinary Differential Equations, Chapman & Hall, New York, NY, 1994.
- L.F. Shampine, I. Gladwell, and S. Thompson, Solving ODEs with MATLAB, Cambridge University Press, Cambridge, 2003.
Internal references
- Eugene M. Izhikevich (2007) Equilibrium. Scholarpedia, 2(10):2014.
- Lawrence F. Shampine and Skip Thompson (2007) Initial value problems. Scholarpedia, 2(3):2861.
- Rob Schreiber (2007) MATLAB. Scholarpedia, 2(7):2929.
- Kendall E. Atkinson (2007) Numerical analysis. Scholarpedia, 2(8):3163.
- Jeff Moehlis, Kresimir Josic, Eric T. Shea-Brown (2006) Periodic orbit. Scholarpedia, 1(7):1358.
- John Butcher (2007) Runge-Kutta methods. Scholarpedia, 2(9):3147.
- Philip Holmes and Eric T. Shea-Brown (2006) Stability. Scholarpedia, 1(10):1838.
- Alan C. Hindmarsh and Radu Serban (2007) Sundials equation solvers. Scholarpedia, 2(3):2860.
See Also
Initial Value Problem, Numerical Analysis, Relaxation Oscillator