Time integration solver
TimeIntegrationSolver is the default solver in Poscidyn. It computes responses by integrating the equations of motion in time and then extracting the steady-state part of the trajectory.
Core idea
The solver rewrites the oscillator as a first-order system
with state \(\mathbf{y} = [\mathbf{x}, \mathbf{v}]\), where \(\mathbf{x}\) contains modal displacements and \(\mathbf{v}\) modal velocities.
Poscidyn then:
- estimates a transient duration using
model.t_steady_state(...), - multiplies that estimate by
t_steady_state_factor, - integrates beyond the transient,
- retains the final 10 drive periods,
- evaluates the chosen response measure on that retained window.
Numerical method
The implementation uses:
diffrax.Tsit5()as the ODE integrator,- adaptive step-size control through
diffrax.PIDController, - tolerances
rtolandatol, - a hard
max_stepslimit per solve.
For frequency sweeps, trajectories with non-finite states are marked as unsuccessful and excluded from the final sweep statistics.
Sampling
n_time_steps controls how densely the retained response window is sampled.
- If you set it explicitly, that value is used directly.
- If you leave it as
None, Poscidyn estimates a suitable value from the highest expected frequency component. - Inside traced or JIT-compiled workflows,
n_time_stepsmust be set explicitly.
For time_response, you can also pass only_save_steady_state=True to save only the final steady-state portion instead of the full transient.
Parameters
rtol,atol: relative and absolute tolerances for the adaptive integrator.n_time_steps: number of saved samples per retained period block.max_steps: maximum number of internal solver steps allowed per trajectory.t_steady_state_factor: safety factor applied to the model's steady-state time estimate.throw: passed to Diffrax. IfTrue, integration failures raise immediately.verbose: reserved on the class but currently not used in the implementation.