I have a system of coupled ODEs that I'm trying to solve as an initial value problem using scipy.integrate.odeint
. However, every time I run odeint
, I get the error
lsoda-- at t(=r1) and step size h(=r2), the error
test failed repeatedly or with abs(h) = hmin
in above, r1 = 0.2351321589734D+00 r2 = 0.1000000000000D-05
ODEintWarning: Repeated error test failures (internal error). Run with full_output = 1 to get quantitative information.
warnings.warn(warning_msg, ODEintWarning)
I'm pretty sure I know the reason for this. The value of one of my derivatives goes to infinity at the point where the error is coming about. However, this is unavoidable in the problem I'm trying to solve. I am wondering if there is a way to make odeint behave in a more civilised way when it gets to this infinity rather than just refusing to work and producing a nonsense output (shown in the picture) scipy getting upset.
Cheers in advance!