jaxdem.integrators.direct_euler#
Direct (semi-implicit / symplectic Euler) Integrator.
Classes
Semi-implicit (symplectic) Euler integration method. |
- class jaxdem.integrators.direct_euler.DirectEuler#
Bases:
LinearIntegratorSemi-implicit (symplectic) Euler integration method.
The method updates the velocity first. The position update then uses the new velocity. This makes the scheme symplectic: first-order accurate with bounded energy error, unlike a true forward Euler step.
- static step_after_force(state: State, system: System) tuple[State, System][source]#
Advance the simulation state by one time step after the force calculation with the semi-implicit (symplectic) Euler method.
The update equations are (the position update uses the updated velocity):
\[\begin{split}& v(t + \Delta t) &= v(t) + \Delta t a(t) \\ & r(t + \Delta t) &= r(t) + \Delta t v(t + \Delta t)\end{split}\]- where:
\(r\) is the particle position (
jaxdem.State.pos)\(v\) is the particle velocity (
jaxdem.State.vel)\(a\) is the particle acceleration computed from forces (
jaxdem.State.force)\(\Delta t\) is the time step (
jaxdem.System.dt)