From: Andrew F. <af...@ph...> - 2006-06-13 13:23:43
|
Rainer Slow down!! I don't actually understand the argument: why can't you have the ODEs as ODEs of concentrations: if S1 is in a compartment with volume C then d[S1]/dt =3D (f1() + f2() + ... fn()) / C f1..fn are the reaction rates which are=20 expressions that have units substance/time f1...fn are functions of the concentrations of the species [S1]..[Sn] I thought that's what we'd implemented. Why do you need two sets of values? I would strongly urge we go for the approach is having one set of values and carefully converting the units as is appropriate. fundamentally what's the problem? In the SBML you sent the only fly in the ointment is that the initial value for the species is expressed in substance units via the initialAmount attribute rather than the initialConcentration attribute which is in concentration units. All you need to do is ensure that the initialAmount values are used to calculate the initialConcentration values again by dividing by the volume. Have we implemented that? Note the initial volume of the compartment is not specified in the xml. yours Andrew > -----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 |