# DASP3ODE¶

DASP3 Solver by Gustaf Söderlind (1980-10-22). Originally published in,:

DASP3 - A Program for the Numerical Integration of Partitioned:
Stiff Ode:s and Differential-Algebraic Systems.

By, Gustaf Söderlind, Department of Numerical Analysis, and
Computing Science, The Royal Institute of Technology, 1980.
Stockholm, Sweden.


DASP3 solves system on the form,

\frac{\mathrm{d}y}{\mathrm{d}t} &= f(t,y,z) \;\;\; \text{(N equations)} \\ \varepsilon\frac{\mathrm{d}z}{\mathrm{d}t} &= G(t,y,z)\;\;\; \text{(M equations)}

If is assumed that the first system is non-stiff and that the stiffness of the second system is due to the parameter epsilon, possibly a diagonal matrix.

## Support¶

• State events (root funtions) : False
• Step events (completed step) : False
• Time events : True

## Usage¶

Import the solver together with the correct problem:

from assimulo.solvers import DASP3ODE
from assimulo.problem import SingPerturbed_Problem


Define the problem, such as:

def rhs_slow(t,y,z): #Note that y and z are 1-D numpy arrays.
return N.array([1.0]) #Note that the return must be numpy array, NOT a scalar.

def rhs_fast(t,y,z): #Note that y and z are 1-D numpy arrays.
return N.array([1.0]) #Note that the return must be numpy array, NOT a scalar.

yy0 = [1.0]
zz0 = [1.0]
t0 = 1.0


Create a problem instance:

mod = SingPerturbed_Problem(rhs_slow, rhs_fast, yy0, zz0, t0)


Note

For complex problems, it is recommended to check the available examples and the documentation in the problem class, SingPerturbed_Problem. It is also recommended to define your problem as a subclass of SingPerturbed_Problem.

Warning

When subclassing from a problem class, the function for calculating the right-hand-side (for ODEs) must be named rhs and in the case with a residual function (for DAEs) it must be named res.

Create a solver instance:

sim = DASP3ODE(mod)


Modify (optionally) the solver parameters.

Parameters:

Simulate the problem:

Information: