Converting mechanisms to differential equations
Posted: Thu Apr 17, 2008 8:09 pm
Many mechanisms in ModelDB and elsewhere do not utilize the DERIVATIVE block for one reason or another, instead opting to use the 'dt' variable directly. I got the feeling that this practice is not optimal, so I tried to convert any and all mechanisms like that to use the derivative block. However, I have come upon forms that do not have apparent equivalent differential forms. For example, an rough excerpt from one mechanism I am using:
By looking at the specification, it is apparent that n', which is what we want to get to put into the derivative block, has this form:
This trick of using the n_exp variable is seen in many mechanisms, and I see no way of solving for dt in the above form.
So, my question(s):
Is there a way to convert such a mechanism to a differential equation form?
Where does this approach come from (perhaps a paper/book)? This is just so I can look at the original problem specification and see if I can re derive the equations myself.
Thanks.
Code: Select all
PROCEDURE states() { : exact when v held constant
evaluate_fct(v)
n = n + n_exp * (n_inf - n)
}
UNITSOFF
PROCEDURE evaluate_fct(v(mV)) { LOCAL a,b,v2
v2 = v - vtraub
a = 0.032 * (15-v2) / ( exp((15-v2)/5) - 1)
b = 0.5 * exp((10-v2)/40)
tau_n = 1 / (a + b) / tadj
n_inf = a / (a + b)
n_exp = 1 - exp(-dt/tau_n)
}
UNITSON
Code: Select all
n' = (1 - exp(-dt/tau_n)) * (n_inf - n) / dt
So, my question(s):
Is there a way to convert such a mechanism to a differential equation form?
Where does this approach come from (perhaps a paper/book)? This is just so I can look at the original problem specification and see if I can re derive the equations myself.
Thanks.