cvode_with_parameters_modified.py

assimulo.examples.cvode_with_parameters_modified.run_example(with_plots=True)[source]

This is the same example from the Sundials package (cvsRoberts_FSA_dns.c)

This simple example problem for CVode, due to Robertson, is from chemical kinetics, and consists of the following three equations:

\[\dot y_1 &= -p_1 y_1 + p_2 y_2 y_3 \ \dot y_2 &= p_1 y_1 - p_2 y_2 y_3 - p_3 y_2^2 \ \dot y_3 &= p_3 y_2^2\]

on return:

  • exp_mod problem instance
  • exp_sim solver instance

Final Run Statistics: Sundials test example: Chemical kinetics 

 Number of steps                                       : 105
 Number of function evaluations                        : 125
 Number of Jacobian evaluations                        : 2
 Number of function eval. due to Jacobian eval.        : 6
 Number of error test failures                         : 1
 Number of nonlinear iterations                        : 122
 Number of nonlinear convergence failures              : 0
 Number of sensitivity evaluations                     : 125
 Number of function eval. due to sensitivity eval.     : 500
 Number of sensitivity nonlinear iterations            : 0
 Number of sensitivity nonlinear convergence failures  : 0
 Number of sensitivity error test failures             : 0

Sensitivity options:

 Method                   : SIMULTANEOUS
 Difference quotient type : CENTERED
 Suppress Sens            : False

Solver options:

 Solver                   : CVode
 Linear multistep method  : BDF
 Nonlinear solver         : Newton
 Linear solver type       : DENSE
 Maximal order            : 5
 Tolerances (absolute)    : [  1.00000000e-08   1.00000000e-14   1.00000000e-06]
 Tolerances (relative)    : 0.0001

Simulation interval    : 0.0 - 4.0 seconds.
Elapsed simulation time: 0.019896030426 seconds.
_images/cvode_with_parameters_modified.png

Note

Press [source] (to the top right) to view the example.