ODE solvers for stiff problems (when cvode is not enough)
Posted: Wed Mar 27, 2013 2:18 pm
Hello,
I am trying to use NEURON to run a simulation with a model that has a stiff system of ODEs. Unfortunately, it is so stiff that CVODE has not been able to solve the system. I have tried adjusting the absolute tolerance level, but it is still not working.
Previously, I had been using this model in the Matlab environment, where I was successfully running simulations using the built in Matlab ODE solver ode15s, which is a backwards differentiation method with a variable time step intended for use with stiff problems.
I have been having trouble figuring out what kinds of options are available for numerical solvers in the NEURON environment, and I was wondering if anyone could suggest another solver that I might try. Alternatively, perhaps someone knows of a paper that managed to use NEURON for an especially stiff system?
Thanks so much!
Also, if it is useful, here is the output I get from nrn:
exp(725.497) out of range, returning exp(700)
exp(725.497) out of range, returning exp(700)
CVode-- Warning: Internal t = 1.39616 and h = 1.84998e-17
are such that t + h = t on the next step.
The solver will continue anyway.
CVode-- Warning: Internal t = 1.39616 and h = 1.15623e-18
are such that t + h = t on the next step.
The solver will continue anyway.
CVode-- Warning: Internal t = 1.39616 and h = 6.8639e-19
are such that t + h = t on the next step.
The solver will continue anyway.
CVode-- Warning: Internal t = 1.39616 and h = 4.40155e-19
are such that t + h = t on the next step.
The solver will continue anyway.
CVode-- Warning: Internal t = 1.39616 and h = 4.40155e-19
are such that t + h = t on the next step.
The solver will continue anyway.
CVode-- Warning: Internal t = 1.39616 and h = 4.40155e-19
are such that t + h = t on the next step.
The solver will continue anyway.
CVode-- Warning: Internal t = 1.39616 and h = 7.53857e-19
are such that t + h = t on the next step.
The solver will continue anyway.
CVode-- Warning: Internal t = 1.39616 and h = 7.53857e-19
are such that t + h = t on the next step.
The solver will continue anyway.
CVode-- Warning: Internal t = 1.39616 and h = 7.53857e-19
are such that t + h = t on the next step.
The solver will continue anyway.
CVode-- Warning: Internal t = 1.39616 and h = 7.53857e-19
are such that t + h = t on the next step.
The solver will continue anyway.
CVode-- The above warning has been issued mxhnil times and will not be
issued again for this problem.
exp(700.014) out of range, returning exp(700)
exp(700.073) out of range, returning exp(700)
No more errno warnings during this execution
------------------------------------------------------------------------------------------
Just to check on the warnings about "exp(700.014)", I did go back to my matlab code and have it print out the value of the argument to every exp() at each timestep to see whether any of these was supposed to reach 700 or higher; in fact, none of them did. Thus, I think that these warning messages from cvode regarding "exp(700.014 out of range)" are happening after the solution has already blown up.
I am trying to use NEURON to run a simulation with a model that has a stiff system of ODEs. Unfortunately, it is so stiff that CVODE has not been able to solve the system. I have tried adjusting the absolute tolerance level, but it is still not working.
Previously, I had been using this model in the Matlab environment, where I was successfully running simulations using the built in Matlab ODE solver ode15s, which is a backwards differentiation method with a variable time step intended for use with stiff problems.
I have been having trouble figuring out what kinds of options are available for numerical solvers in the NEURON environment, and I was wondering if anyone could suggest another solver that I might try. Alternatively, perhaps someone knows of a paper that managed to use NEURON for an especially stiff system?
Thanks so much!
Also, if it is useful, here is the output I get from nrn:
exp(725.497) out of range, returning exp(700)
exp(725.497) out of range, returning exp(700)
CVode-- Warning: Internal t = 1.39616 and h = 1.84998e-17
are such that t + h = t on the next step.
The solver will continue anyway.
CVode-- Warning: Internal t = 1.39616 and h = 1.15623e-18
are such that t + h = t on the next step.
The solver will continue anyway.
CVode-- Warning: Internal t = 1.39616 and h = 6.8639e-19
are such that t + h = t on the next step.
The solver will continue anyway.
CVode-- Warning: Internal t = 1.39616 and h = 4.40155e-19
are such that t + h = t on the next step.
The solver will continue anyway.
CVode-- Warning: Internal t = 1.39616 and h = 4.40155e-19
are such that t + h = t on the next step.
The solver will continue anyway.
CVode-- Warning: Internal t = 1.39616 and h = 4.40155e-19
are such that t + h = t on the next step.
The solver will continue anyway.
CVode-- Warning: Internal t = 1.39616 and h = 7.53857e-19
are such that t + h = t on the next step.
The solver will continue anyway.
CVode-- Warning: Internal t = 1.39616 and h = 7.53857e-19
are such that t + h = t on the next step.
The solver will continue anyway.
CVode-- Warning: Internal t = 1.39616 and h = 7.53857e-19
are such that t + h = t on the next step.
The solver will continue anyway.
CVode-- Warning: Internal t = 1.39616 and h = 7.53857e-19
are such that t + h = t on the next step.
The solver will continue anyway.
CVode-- The above warning has been issued mxhnil times and will not be
issued again for this problem.
exp(700.014) out of range, returning exp(700)
exp(700.073) out of range, returning exp(700)
No more errno warnings during this execution
------------------------------------------------------------------------------------------
Just to check on the warnings about "exp(700.014)", I did go back to my matlab code and have it print out the value of the argument to every exp() at each timestep to see whether any of these was supposed to reach 700 or higher; in fact, none of them did. Thus, I think that these warning messages from cvode regarding "exp(700.014 out of range)" are happening after the solution has already blown up.