ExplicitRK45Solver
ptolemy.domains.hs.kernel.solver.ExplicitRK45Solver

This class implements a fourth-order Runge-Kutta ODE solving method. The algorithm was introduced in "A Variable Order Runge-Kutta Method for Initial Value Problems with Rapidly Varying Right-Hand Sides" by J. R. Cash and Alan H. Karp, ACM Transactions on Mathematical Software, vol 16, pp. 201-222, 1990. For completeness, a brief explanation of the algorithm is explained below. <p> For an ODE of the form: <pre> dx(t)/dt = f(x(t), t), x(0) = x0 </pre> it does the following: <pre> K0 = f(x(n), tn); K1 = f(x(n) + 0.2*K0*h, tn + 0.2*h); K2 = f(x(n) + (3.0/40*K0 + 9.0/40*K1)*h, tn + 0.3*h); K3 = f(x(n) + (0.3*K0 - 0.9*K1 + 1.2*K2)*h, tn + 0.6*h); K4 = f(x(n) + (-11/54*K0 + 5.0/2*K1 -70/27*K2 + 35/27*K3)*h, tn + 1.0*h); K5 = f(x(n) + (1631/55296*K0 + 175/512*K1 + 575/13824*K2 + 3544275/110592*K3 + 253/4096*K4)*h, tn + 7/8*h); x(n+1) = x(n)+(37/378*K0 + 250/621*K2 + 125.0/594*K3 + 512.0/1771*K5)*h; </pre>, and error control: <pre> LTE = [(37.0/378 - 2825.0/27648)*K0 + (250.0/621 - 18575.0/48384)*K2 + (125.0/594 - 13525.0/55296)*K3 + (0.0 - 277.0/14336)*K4 + (512.0/1771 - 0.25)*K5]*h. </pre> <P> If the LTE is less than the error tolerance, then this step size h is considered successful, and the next integration step size h' is predicted as: <pre> h' = h * Math.pow((ErrorTolerance/LTE), 1.0/5.0) </pre> This is a fourth order method, but uses a fifth order procedure to estimate the local truncation error. <p> It takes 6 steps for this solver to resolve a state with an integration step size. A round counter is used to record which step this solver performs.

Author(s): Haiyang Zheng
Version:$Id: ExplicitRK45Solver.doc.html,v 1.1 2006/02/22 18:40:27 mangal Exp $
Pt.Proposed Rating:Green (hyzheng)
Pt.Accepted Rating:Green (hyzheng)