From: Andrew F. <af...@ph...> - 2006-06-13 10:44:32
|
Rainer the complied version will be to be changed as well yours Andrew=20 > -----Original Message----- > From: sbm...@li...=20 > [mailto:sbm...@li...] On=20 > Behalf Of Rainer Machne > Sent: 13 June 2006 11:42 > To: SOSlib Development > Subject: [SOSlib-devel] variable compartment bug[Scanned] >=20 > Folks >=20 > Lukas has identified another serious bug! >=20 > SOSlib doesn't support variable compartments. >=20 > We initialize sundials with ODEs for concentrations d[A]/dt,=20 > and sundials calculates [A] + (d[A]/dt)*h, where h is a small=20 > time step and [A] is the initial condition or the current value. >=20 > If we have a variable, e.g time-dependent compartment, then=20 > d[A]/dt will change with changing compartment because the=20 > compartment size is part of the right hand side. >=20 > However, not only d[A]/dt is dependent on the volume, but=20 > also [A], i.e.=20 > the current value in data->value! >=20 > The attached example file exemplifies this. >=20 > So we actually should use an ODE system in amount/time=20 > instead of concentration/time, and have a second data->value=20 > array for concentrations to be used in formula evaluation. >=20 > Didn't we discuss this once? I remember that I had started to=20 > do this (ODEs in amount/time), but then it got more=20 > complicated then I thought and something else came up. >=20 > Can you think of any problems we will run into? Andrew, how=20 > about the compiling version? >=20 > Rainer >=20 |