From: Stefan M. <ste...@oe...> - 2006-06-13 12:50:45
|
i don't know how compartments are implemented exactly, but it is definitely not enough to devide the odes for the amounts by the size of the compartment. each amount has to be sclaed by the comportment. only then the rate rules for the concentrations can be used. i suppose a "doube bookkeeping" of amounts and concs will be necessary... cheers, stefan. Am Dienstag 13 Juni 2006 12:42 schrieb Rainer Machne: > Folks > > Lukas has identified another serious bug! > > SOSlib doesn't support variable compartments. > > We initialize sundials with ODEs for concentrations d[A]/dt, and sundials > calculates [A] + (d[A]/dt)*h, where h is a small time step and [A] is the > initial condition or the current value. > > If we have a variable, e.g time-dependent compartment, then d[A]/dt will > change with changing compartment because the compartment size is part of > the right hand side. > > However, not only d[A]/dt is dependent on the volume, but also [A], i.e. > the current value in data->value! > > The attached example file exemplifies this. > > So we actually should use an ODE system in amount/time instead of > concentration/time, and have a second data->value array for concentrations > to be used in formula evaluation. > > Didn't we discuss this once? I remember that I had started to do this > (ODEs in amount/time), but then it got more complicated then I > thought and something else came up. > > Can you think of any problems we will run into? Andrew, how about the > compiling version? > > Rainer |