What makes an ode stiff




















Here is how to determine if a set of differential equations is stiff. The two equations below are a simplified model for a catalytic converter, where y denotes the mole fraction of CO in the gas phase and T denotes the temperature of the gas phase. The model was simplified by excluding the reaction term. Curator: Skip Thompson.

Eugene M. Lawrence F. Vadim N. 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.

They also determine the behavior of explicit numerical methods applied to the system. Equations of this kind arise in a natural way when the components of more general systems are uncoupled, so how a method performs on the test equation indicates how they will perform on more general equations.

This measure is extended to general differential equations by considering eigenvalues of the local Jacobian matrix. 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. Generally, we consider a system to be stiff if the stiffness index is "large. We have seen examples for which the reverse is true.

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. Stiffness ratios are helpful as far as they go, but they do not account adequately for several important practical issues. 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. However, ode23s , ode23t , and ode23tb can be more efficient if the problem permits a crude error tolerance.

For some ODE problems, the step size taken by the solver is forced down to an unreasonably small level in comparison to the interval of integration, even in a region where the solution curve is smooth. These step sizes can be so small that traversing a short time interval might require millions of evaluations. This can lead to the solver failing the integration, but even if it succeeds it will take a very long time to do so. Equations that cause this behavior in ODE solvers are said to be stiff.

The problem that stiff ODEs pose is that explicit solvers such as ode45 are untenably slow in achieving a solution. This is why ode45 is classified as a nonstiff solver along with ode23 , ode78 , ode89 , and ode Solvers that are designed for stiff ODEs, known as stiff solvers , typically do more work per step.

The pay-off is that they are able to take much larger steps, and have improved numerical stability compared to the nonstiff solvers.

For stiff problems, specifying the Jacobian matrix using odeset is particularly important. Stiff solvers use the Jacobian matrix to estimate the local behavior of the ODE as the integration proceeds, so supplying the Jacobian matrix or, for large sparse systems, its sparsity pattern is critical for efficiency and reliability.

Use the Jacobian , JPattern , or Vectorized options of odeset to specify information about the Jacobian. If you do not supply the Jacobian then the solver estimates it numerically using finite differences. See odeset for a complete listing of other solver options. When , the resulting system of ODEs is nonstiff and easily solved using ode Different algorithms are used for stiff and non-stiff solvers and they each have their own unique stability regions.

Stiff differential equations are best solved by a stiff solver, and vice-versa. One suggestion, if you are not sure whether or not your model is stiff, is to try applying both a non-stiff and stiff solver with the same settings and make a determination of the general accuracy and speed of the results.



0コメント

  • 1000 / 1000