From: Rainer M. <ra...@tb...> - 2006-06-13 10:42:36
|
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 |