dasp3_basic.py

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

Example to demonstrate the use of DASP3 for a singularly perturbed problem:

Slow part of the problem:

\[\begin{split}\dot y_1 &= -(0.6 z + 0.8 y_3) y_1 + 10 y_2 \\ \dot y_2 &= -10 y_2 + 1.6 z_1 y_3 \\ \dot y_3 &= -1.33 \varepsilon ^2 y_3 ( y_1 + 2 z)\end{split}\]

with \(\varepsilon = \frac{1}{3} 10^{-3}\).

Fast part of the problem:

\[\dot z = 1.6 z y_3 - 6 z y_1 - 45 (\varepsilon z)^2 + 0.8 y_3 y_1\]

on return:

  • exp_mod problem instance
  • exp_sim solver instance

Final Run Statistics: DASP3 Example: Singularly perturbed ODE 


Solver options:

 Solver                  : DASP3 
 Tolerances (absolute)   : 1e-05
 Tolerances (relative)   : 1e-05

Simulation interval    : 0.0 - 10.0 seconds.
Elapsed simulation time: 0.631796121597 seconds.
_images/dasp3_basic.png

Note

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