Page 1 of 1
Concerning LONGITUDINAL_DIFFUSION
Posted: Tue Sep 26, 2006 2:46 pm
by hwaiianpineapple
I was trying to model the diffusion of a user-defined ion through 9 segments of a cell compartment and tried to use the LONGITUDINAL_DIFFUSION function to do so. However, I'm a bit confused on exactly ohw this function works and have a few questions. When the NMODL reads the LONGITUDINAL_DIFFUSION (short: LD) function, does it create a list with multiple sections, then apply diffusion schemes to the variables in each of those sections? If it does, how does NMODL get data such as diameter, length of each section, and the volume of the section from hoc? Once the LD function has been carried out, does the NMODL automatically update the variables in the cell segments with the new values it calculated via LD and tabulated in its lists? Basically I'm very confused about how LD and the actual cell one creates with hoc communicates with one another. Can anyone give me an answer? Thanks!
Posted: Tue Sep 26, 2006 3:58 pm
by ted
Before proceeding, let me ask if have you read the relevant material in The NEURON Book
or in the article
Hines, M.L. and Carnevale, N.T.
Expanding NEURON's repertoire of mechanisms with NMODL.
Neural Computation 12:995-1007, 2000
of which you can retrieve an enhanced preprint from a link at
http://www.neuron.yale.edu/neuron/bib/nrnpubs.html
?
Posted: Tue Sep 26, 2006 11:33 pm
by hwaiianpineapple
yes
Posted: Wed Sep 27, 2006 7:51 am
by hines
The base implementation in nrn/src/nrnoc/ldifus.c communicates with special functions emitted by the nocmodl translator. An approximate jacobian, with basically the same topology as the normal conductance matrix is setup to support the fully implicit method and so LONGITUDINAL_DIFFUSION is more or less numerically stable and works well with the variable step methods. I say "more or less" because only the
d(longitudinal_ion_flux)/d(ion_concentration)
terms are added to the jacobian and the d(membrane_ion_flux)/d(ion_concentration) terms are ignored as well as the coupling between the voltage and the concentration equations. But at least the dominant terms are there and it is a lot better than the usual modified euler approach and the framework is in place to add the extra elements if it ever seems worthwhile.
Posted: Fri Oct 13, 2006 11:13 am
by hwaiianpineapple
thanks Ted!
Posted: Fri Oct 13, 2006 10:40 pm
by ted
That "hines" guy is Michael Hines, not me. Thanks, Mike!
Posted: Sat Oct 14, 2006 1:54 pm
by hwaiianpineapple
lol. Sorry. Thank's Mike! And thanks Ted anyways!