From: Stefan M. <ste...@oe...> - 2006-06-21 15:50:51
|
rainer > Stefan, thanks for the clarification in your last email. > > i think i got it now :) > > you wrote: > > the ode for conc can be derived by differentiating x=X/V: > > dx/dt = (dX/dt)/V - x*(dV/dt)/V > > where dX/dt is given by the kinetic law above. > > dX/dt is just the sum of the +/- (stoichiometry*kineticLaw) expressions > for all reactions where X is a product/reactant, i.e. it is a function of > concentrations x, y, z ... > > Right? (If not forget, the rest ...) right. > So actually, the first part of this equation (dX/dt)/V is the current form > of ODEs in SOSlib! > > Could the implementation of variable compartments in SOSlib would be as > easy as: > > 1) add the expression " - x*(dV/dt)/V " > to the concentration ODEs for species in a variable compartment? yes. > 2a) if the compartment is defined by a rate rule, this rate rule could be > appended to all ODEs directly, i.e. > > newODE = currentODE - (x/V) * rateRule yes. > 2b) if the compartment is defined by an assignment rule, we would have > differentiate it towards time? For this we need to convert the assignment > rule to a form, where differentiateAST recognizes time dependent variables > that are in the assignment rule, e.g. x(t), which appears only as ASTNode > "x". Is this possible/easy? possible. easy? differentiateAST has to extended. there must be differentiation with respect to time, but only variables for which there is an ode are differentiated. (and the rhs of the ode is the result.) the chain rule does the rest of the work... > 2c) if the compartment is changed by events, we don't need to append > anything but just recalculate concentrations and re-initialize the solver, > just as we do now for events. > > > If above is right - but i guess it might just not be that easy - > we would have extracted two alternatives: > > A) use ODEs in substance/time, write assignment rules for > x.amount = x / volume and replace all x by x.amount in ODEs, as Andrew > suggested you mean: x = x.amount / volume !? > or > > B) use above approach. > > Is that it? yes. i vote for alternative A :) reason: (i) in alternative B you have to do point 1 and 2a, the volume correction, for each ode. (ii) in alternative B you have to do point 2b, the additional differentiation. (iii) the use of assignment rules x = x.amount / volume are not a criterion. they can be used in both alternatives. cheers, s > Rainer > _______________________________________________ > sbmlsolver-devel mailing list > sbm...@li... > https://lists.sourceforge.net/lists/listinfo/sbmlsolver-devel |