Integrators¶
A dynamics simulation integrates the differential equations of motion. We have,
(1)¶\[\begin{align}
\frac{dv}{dt} &= a \\
\frac{dx}{dt} &= v
\end{align}\]
where \(x\) is position, \(v\) is velocity and \(a\) is acceleration. There is extensive research on integrators and their properties for dynamic systems. Here, we focus on two commond ones: the simple Euler integrator and the slightly more advanced Leapfrog integrator. The integrators are implemented in separate classes and can be extended, e.g. with Runge-Kutta methods.
Euler¶
The Euler integrator is a simple first-order method.
(2)¶\[\begin{align}
x_{t+1} &= x_t + v_t \Delta t \\
v_{t+1} &= v_t + a_t \Delta t
\end{align}\]
Leapfrog¶
Reference [BL04]. The main integrator used here is the Leapfrog integrator. It has only a very small computational overhead compared to the Euler method.
(3)¶\[\begin{align}
x_{t+1} &= x_t + v_t \Delta t + \frac{1}{2} a_t \Delta t^2 \\
v_{t+1} &= v_t + \frac{1}{2}(a_t + a_{t+1}) \Delta t
\end{align}\]