Skip to content
Projects

Model solves

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

scaled_rates

functionsource

Return the rate coefficients with some multiplied by factors (by name).

scaled
kr←fr kr,finv=ffwd for a detailed-balance inverse without a factor of its ownk_r \leftarrow f_r\, k_r, \qquad f_{\mathrm{inv}} = f_{\mathrm{fwd}} \ \text{for a detailed-balance inverse without a factor of its own}
Assumes
  • an inverse moves with its forward reaction, so the scaled network keeps detailed balance: what sensitivities and uncertainty propagation perturb

solve_steady_state

functionsource

Return the steady state as a Result.

fixed point
gnew(k)=g(τ0[nl(g(k))]),given factors override computed ones line by lineg^{(k)}_{\mathrm{new}} = g\big(\tau_0[n_l(g^{(k)})]\big), \qquad \text{given factors override computed ones line by line}
update
g(k+1)=g(k)+d (gnew(k)−g(k)),d=1→0.5 once the largest change growsg^{(k+1)} = g^{(k)} + d\,\big(g^{(k)}_{\mathrm{new}} - g^{(k)}\big), \qquad d = 1 \to 0.5 \ \text{once the largest change grows}
stop
max⁡lines∣gnew(k)−g(k)∣≤tolerance\max_{\mathrm{lines}} \big|g^{(k)}_{\mathrm{new}} - g^{(k)}\big| \le \texttt{tolerance}
Assumes
  • only with Conditions.trapping: the first solve is optically thin apart from the given factors (an absent gg counts as 1)
  • the result returned was solved with the previous factors; at max_iterations a ConvergenceError is raised
  • the damping never goes back to 1
Built from