Skip to content

Simulation options

These following options exists for the integrators. Some options are only relevant for the IDA integrator. The options are stored as a Dict in SimulationObject.options.

CVODE options

Option Type Default value Description
abs_tol float 1.0e-6 The scalar absolute error tolerance
init_step float 0.0 The value of the initial step size to be attempted
max_conv_fails int 10 Maximum number of allowable nonlinear solver convergence failures per step
max_err_test_fails int 50 Maximum number of error test failures allowed on one step
max_hnil int -1 Maximum number of messages issued by the solver warning that t + h = t on the next internal step
max_nonlin_iters int 3 Maximum number of nonlinear solver iterations allowed per step
max_num_steps int 100000 maximum number of steps to be taken by the solver in its attempt to reach the next output time
max_ord int 5 Maximum order of the linear multistep method. Must be positive
max_step float 0.0 Upper bound on the magnitude of the step size
method int 0 Linear multistep method. 0 for Adams, 1 for BDF
min_step float 0.0 Lower bound on the magnitude of the step size
rel_tol float 1.0e-6 The scalar relative error tolerance
show_integrator_stats int 0 If set to 1, prints diagnostic statistics for the simulation

IDA options

Option Type Default value Description
abs_tol float 1.0e-6 The scalar absolute error tolerance The scalar absolute error tolerance
calc_ic int 0 If set to 1, will correct initial conditions prior to simulation.
init_step float 0.0 The value of the initial step size to be attempted
max_conv_fails int 10 Maximum number of allowable nonlinear solver convergence failures per step
max_err_test_fails int 50 Maximum number of error test failures allowed on one step
max_nonlin_iters int 3 Maximum number of nonlinear solver iterations allowed per step
max_num_backs_ic int 100000 Maximum number of linesearch backtracks allowed in any Newton iteration, when solving the initial conditions calculation problem
max_num_iters_ic int 10000 Maximum number of Newton iterations allowed in any one attempt to solve the initial conditions calculation problem
max_num_jacs_ic int 5000 Maximum number of the approximate Jacobian or preconditioner evaluations allowed when the Newton iteration appears to be slowly converging
max_num_steps int 100000 Maximum number of steps to be taken by the solver in its attempt to reach the next output time
max_num_steps_ic int 5000 Maximum number of steps to be taken by the solver when correcting the initial conditions. See calc_ic.
max_ord int 5 Maximum order of the linear multistep method. Must be positive
max_step float 0.0 Maximum absolute value of the step size
rel_tol float 1.0e-6 The scalar relative error tolerance
show_integrator_stats int 0 If set to 1, prints diagnostic statistics for the simulation