Skip to content
Projects

Time integration

The equations of opencr.solvers.transient, declared on the code that implements them and checked by the tests.

solve_transient

functionsource

Return the densities of the evolving states at times and the report.

ode
dndt=R(max⁡(n,0),t),n(t0)=n0\frac{d\mathbf n}{dt} = R\big(\max(\mathbf n, 0), t\big), \qquad \mathbf n(t_0) = \mathbf n_0
tolerance
atol=10−12max⁡(n0, nP, Ne) (1 if all zero)\mathrm{atol} = 10^{-12} \max\big(\mathbf n_0,\ \mathbf n_P,\ N_e\big) \ (1 \text{ if all zero})
drift
max⁡t∣∑iceini(t)−∑iceini(t0)∣∑iceini(t0)\max_t \frac{\big|\sum_i c_{ei} n_i(t) - \sum_i c_{ei} n_i(t_0)\big|}{\sum_i c_{ei} n_i(t_0)}
Assumes
  • stiff integrators only (BDF, the default, Radau, LSODA): CR rates span 10−310^{-3} to 10910^9 s−1^{-1}
  • BDF and Radau get the analytic sparse Jacobian; LSODA forms its own by finite differences
  • time-dependent conditions rebuild the rates and the system at each new time (a one-entry cache); the prescribed states stay the same
  • negative output densities are set to zero, with a message
References
Built from