Interface myphysicslab.lab.model.ODESim

Provided By
All Extended Interfaces
All Known Subinterfaces
All Known Implementations

A Simulation based on ordinary differential equations. Contains an array of variables given by #getVarsList which holds the simulation state and an #evaluate method that defines the differential equation. A myphysicslab.lab.model.DiffEqSolver can act on the ODESim to advance the variables over time.

Note that the myphysicslab.lab.model.VarsList returned by getVarsList method is implicitly a significant part of the API of ODESim. For example: initial conditions are set by modifying the values stored in the VarsList.

Time is stored in the VarsList. When the simulation state is advanced, the time is advanced by the DiffEqSolver like any other variable. The time variable always has a rate of change of exactly 1.0, which is specified in the {#evaluate} method.

Instance Methods