Absolute tolerance scale in RxD

Extending NEURON to handle reaction-diffusion problems.

Moderators: hines, wwlytton, ramcdougal

Post Reply
bschneiders
Posts: 34
Joined: Thu Feb 02, 2017 11:30 am

Absolute tolerance scale in RxD

Post by bschneiders »

I have been getting numerical errors when simulating my model in RxD, and I think they are due to scaling within CVode. I've seen how to use the absolute tolerance scale multiplier for species specified in MOD files (https://www.neuron.yale.edu/neuron/stat ... .atolscale) and am using the following code in any MOD files containing calcium:

Code: Select all

STATE{
      ca    (mM)  <1e-6> 
}
However, is there a way to set this scale for RxD species as well? While calcium is in my calcium channels and pump MOD files and can therefore be scaled there, I have several RxD species in my model that don't come up in MOD files (i.e. a calcium buffer), but they still need to be scaled. Any suggestions on how to do so?

See the following for a plot of the error I'm talking about (the image wouldn't display so here is the URL):
https://ibb.co/cwob1Q
ramcdougal
Posts: 267
Joined: Fri Nov 28, 2008 3:38 pm
Location: Yale School of Public Health

Re: Absolute tolerance scale in RxD

Post by ramcdougal »

I just added this functionality to the development branch.

Get a copy via

Code: Select all

git clone https://github.com/ramcdougal/nrn.git
and then compile as normal.

Specify an atolscale when you define the rxd.Species, e.g.

Code: Select all

ca = rxd.Species(cyt, initial=0, atolscale=1e-3)
(If you've already set cvode.atol to 1e-3, this means that it would try to compute calcium to an absolute accuracy of 1e-6.)
Post Reply