I'm modeling glucose conversion to ethanol through solving a series of ODEs of enzymatic reactions. How do I set the constraint that all concentrations are >= 0 and the total mass of all compounds in the pathway are constant over time. Any help would be greatly appreciated!
Your reaction rates are extremely fast! The value of Glu drops to zero within a value of x of about 6.5*10^-4, yet you are looking for results over values of x out to 200. The ODE solvers can't cope with this!
1. Solve Glu on its own (as it is independent of the others) to x around 6.5*10^-4; Then set it to zero beyond this.
2. Solve the others to the same limited time (distance?), then use their results at this time as initial conditions for subsequent solutions.
I didn't check the time constants of anything other than that for Glu, so you might have to repeat step 2 if the end time is still too large for the ODE solvers to cope.
Obviously the result coincides with that obtained using "odesolve" for the single differential equation y '= f (y) with the necessary initial conditions. The result is then used by the system of differential equations without the previous equation. But there are still negative concentrations.