Jason Grout wrote:
> Can you tell us what wv, wv1, wb, wb1, veloc, mort, lwat, jbiom, rwat, 
> and av are?
>
> Thanks,
>
> Jason
>   
It's a water and biomass balance model. Here is the full code, FYI:

dwaterv = (av p - esv - etv - qvb + qbv);
dwaterb = (ab p - esb + qvb - qbv);
ab = 1 - av;
qvb = veloc wv/av;
qbv = veloc wb/ab;
esv = av lwat (wv/av);
etv = av rwat (wv/av) (bv/av)^2;
esb = ab lwat wb/ab;
dbv = jbiom etv - mort bv;

Reduce[0 == dwaterv && p > 0 && veloc > 0 && mort > 0 && lwat > 0 && 
  jbiom > 0 && rwat > 0 && av >= 0, wv, Reals]
veloc > 0 && 
 rwat > 0 && ((0 < av < 1 && lwat > 0 && p > 0 && mort > 0 && 
     jbiom > 0) || (av > 1 && lwat > 0 && p > 0 && mort > 0 && 
     jbiom > 0)) && 
 wv == (av^3 p - av^4 p + av^2 veloc wb)/(
  av^2 lwat - av^3 lwat + bv^2 rwat - av bv^2 rwat + av veloc - 
   av^2 veloc)

Solve[0 == dwaterv, wv]
wv1 = %[[1, 1, 2]];
{{wv -> (av^2 (-av p + av^2 p - veloc wb))/((-1 + av) (av^2 lwat + 
      bv^2 rwat + av veloc))}}

...

This was my last MMA project, which I recoded and finished in sage. I had quite 
a bit of trouble getting sage to solve some of the equations I needed to solve, 
but it worked in the end. Hope it will be easier in the future. When the paper 
is accepted, I shall put the sage code online.

Cheers,
Stan




--~--~---------~--~----~------------~-------~--~----~
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to