
ExplicitRK23Solver |
ptolemy.domains.hs.kernel.solver.ExplicitRK23Solver |
This class implements the Explicit Runge-Kutta 2(3) ODE solving method.
For an ODE of the form:
<pre>
dx/dt = f(x, t), x(0) = x0
</pre>
it does the following:
<pre>
K0 = f(x(n), tn);
K1 = f(x(n)+0.5*h*K0, tn+0.5*h);
K2 = f(x(n)+0.75*h*K1, tn+0.75*h);
x(n+1) = x(n)+(2/9)*h*K0+(1/3)*h*K0+(4/9)*h*K2;
</pre>,
and error control:
<pre>
K3 = f(x(n+1), tn+h);
LTE = h*[(-5.0/72.0)*K0 + (1.0/12.0)*K1 + (1.0/9.0)*K2 + (-1.0/8.0)*K3]
</pre>
<P>
If the LTE is less than the error tolerance, then this step is considered
successful, and the next integration step is predicted as:
<pre>
h' = 0.8*Math.pow((ErrorTolerance/LTE), 1.0/3.0)
</pre>
This is a second order method, but uses a third order procedure to estimate
the local truncation error.
Author(s): Jie Liu, Haiyang Zheng
Version:$Id: ExplicitRK23Solver.doc.html,v 1.1 2006/02/22 18:40:27 mangal Exp $
Pt.Proposed Rating:Green (hyzheng)
Pt.Accepted Rating:Green (hyzheng)