I\'m looking for a good library that will integrate stiff ODEs in Python. The issue is, scipy\'s odeint gives me good solutions sometimes, but the slightest change
If you can solve your problem with Matlab's ode15s
, you should be able to solve it with the vode
solver of scipy. To simulate ode15s
, I use the following settings:
ode15s = scipy.integrate.ode(f)
ode15s.set_integrator('vode', method='bdf', order=15, nsteps=3000)
ode15s.set_initial_value(u0, t0)
and then you can happily solve your problem with ode15s.integrate(t_final)
. It should work pretty well on a stiff problem.
(See also http://www.scipy.org/NumPy_for_Matlab_Users)