Page 1 of 1

Syncronized concentrations in and out the membrane

Posted: Thu Mar 26, 2020 11:11 am
by bremen
Hi.

I'm trying to define a MOD file capable of reading the internal concentration of a substance and, with a slim to none delay, "transpose" the same concentration in a ecs.
The ecs is defined with rxd.Extracellular(). The substance is generated by a MOD file in the inside and as an rxd.species on the outside, with a diffusion value to prevent local accumulation.

I'm following a leak current and pump schemes:

Code: Select all

USEION x READ xi WRITE xo CHARGE 1

INITIAL {
    imax = 1
}

ASSIGNED {
    xo      (mM)
    xi      (mM)
}

BREAKPOINT {
    xo = imax *xi
}
When i record the variable inside the mod with printf("xi: %g \n", xi) or printf("xo: %g \n", xo) they are correct.
When i use vec.record(cell.section[0](0.5)._ref_xo) it stays at 1 for one integration step and than it falls at 0 for the rest of the simulation.

Re: Syncronized concentrations in and out the membrane

Posted: Fri Mar 27, 2020 3:37 pm
by bremen
Never mind. I have found the underlying issue.