Page 1 of 1

Using an appropriate integration method

Posted: Thu Feb 09, 2012 4:28 am
by Keivan
I'm working on a model which has 4 states, as follows:

Code: Select all

A' = -A/tau1
B' = -B/tau2
C' = -C/tau3
g' = (wC*C + wB*B)*(inf-g)/tau
When I use "cnexp" the mechanism compiles but there is error during simulation.
When I use "sparse" method I cannot compile the mechanism.
When i use "runge" method everything works fine but as far as I understand this method of integration is not what you advice us to use. Do you?

What should I do to be able to use CVODE and variable time step methods too?

Other useful info:
1 ms < tau1 < 8 ms
3 ms < tau2 < 100 ms
100 ms < tau2 < 1000 ms

Re: Using an appropriate integration method

Posted: Thu Feb 09, 2012 9:41 am
by ted
The right hand side of the 4th equation is nonlinear in two of the state variables. I would try derivimplicit.

Re: Using an appropriate integration method

Posted: Thu Feb 09, 2012 12:59 pm
by Keivan
It didn't work too. the error is:

Code: Select all

The matrix in the solution method is singular or ill-conditioned
nrniv: scopmath library error

Re: Using an appropriate integration method

Posted: Thu Feb 09, 2012 1:27 pm
by hines
I'm puzzled about why derivimplicit did not do the right thing. Can you send me the model (simplified if convenient) that exhibits the problem.
I'd like to look into it in greater detail. Send to michael dot hines at yale dot edu.
Thanks

Re: Using an appropriate integration method

Posted: Thu Feb 09, 2012 1:31 pm
by hines
cvode is independent of what you choose in the METHOD. I'd be even more puzzled if the variable step methods did not
work with your model as is. I looks like the normal trajectory is that g approaches inf with greater and greater time constant
and that does not seem like it should introduce any difficulty.