TrapezoidalRuleSolver
ptolemy.domains.hs.kernel.solver.TrapezoidalRuleSolver

This is a second order variable step size ODE solver that uses the trapezoidal rule algorithm. Unlike the solvers with fixed step size, this solver adjusts its step size based on the estimation of the local truncation error. <p> NOTE: The design of this solver, in particular, the design of estimation of the local truncation error, is still preliminary. <p> For an ODE <pre> x' = f(x, t) x(0) = x0 </pre> the solver iterates: <pre> x(t+h) = x(t) + (h/2)*(x'(t) + x'(t+h)) </pre> This solver uses an implicit algorithm, which involves a fixed-point iteration to find x(t+h) and x'(t+h). <p> The local truncation error (LTE) control is based on the formula 9.78 in "Modeling and Simulation of Dynamic Systems" by Robert L. Woods and Kent L. Lawrence. <p> The basic idea is that once states and derivatives are resolved, denoted as x(t+h) and x'(t+h), use a two-step method with the calculated derivatives to recalculate the states, denoted as xx(t+h). Since this solver is second order, the LTE is approximately: <pre> abs(x(t+h) - xx(t+h))/(2^2 - 1) </pre> This is used to adjust the step size.

Author(s): Jie Liu, Haiyang Zheng
Version:$Id: TrapezoidalRuleSolver.doc.html,v 1.1 2006/02/22 18:42:26 mangal Exp $
Pt.Proposed Rating:Green (hyzheng)
Pt.Accepted Rating:Green (hyzheng)