Page 1 of 1

How to access L (length of section) in NMODL

Posted: Tue May 20, 2014 3:24 pm
by ahwillia
I have a couple of mechanisms that need to know the surface area of the section they are inserted into. I tried to achieve this by the following code

Code: Select all

ASSIGNED {
    diam (um)
    L (um)
    surface_area (um)
}
BREAKPOINT {
    surface_area = 3.141592 * diam * L
}
I found that diam was correctly specified... but... L was set to 0.0 (not the length of the section). Is there another way for me to access the value of L or the surface area of the section?

Many thanks.

Re: How to access L (length of section) in NMODL

Posted: Tue May 20, 2014 10:49 pm
by ted
Forget about L. NMODL already knows segment area. In the ASSIGNED block declare
area (micron2)
then use area in any equation block. Remember to test your mod files with modlunit and use conversion factors as necessary to reconcile unit inconsistencies.