Concerning LONGITUDINAL_DIFFUSION
Concerning LONGITUDINAL_DIFFUSION
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!
-
- Site Admin
- Posts: 6384
- Joined: Wed May 18, 2005 4:50 pm
- Location: Yale University School of Medicine
- Contact:
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
?
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
?
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.
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.