Re: [pydstool-users] simulation with many auxiliary equations
Status: Beta
Brought to you by:
robclewley
From: Ludo V. <l.c...@sc...> - 2012-05-24 13:33:43
|
Hi, I'm not completely sure what the problem is that you're running into. If the complexity of the conversion equations is an issue, then you can use either the symbolic manipulation tools provided by PyDSTool (although I have no experience with that) or SymPy (I have a lot of experience with that, and SymPy plays really quite nice with PyDSTool) to take semi-automate the generation of the ODEs. Since all equations are specified as string expression, some clever string manipulation can get you a long way. For the rest, the problem you describe seems an ordinary first order system, so a single Generator instance, like used in the harmonic oscillation example, should work. Regards, Ludo Visser On May 24, 2012, at 2:48 pm, gyro funch wrote: > Hi, > > I am a newbie with PyDSTool and would appreciate your advice on how > to solve a large system of ODEs that also contains a lot of > auxiliary equations that define and scale variables and parameters. > > Here is a small example that illustrates the sort of problem I am > trying to solve: > > > state variables > --------------- > y1, y2, y3 > > parameters > ---------- > a1,a2,a3 > b1,b2,b3 > c1,c2,c3 > d1,d2,d3 > > conversion equations > -------------------- > s1 = a1/b1 > s2 = a2/b2 > s3 = a3/b3 > z1 = y1/c1 > z2 = y2/c2 > z3 = y3/c3 > > differential equations > ---------------------- > dy1/dt = s1*z1 - s2*dy2/dt > dy2/dt = s3*z1 - s4*z3 > dy3/dt = s2*z3 - s3*z2*dy1/dt > > initial conditions > ------------------ > y1(0) = d1 > y2(0) = d2 > y3(0) = d3 > > > The examples included in the documentation and distribution are > helpful, but I am unclear on how to specify this system most > efficiently. I am also not clear on when symbolic variables can be > used or if they would help in this instance. > > Thank you very much. > > Kind regards, > gyro > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > PyDSTool-Users mailing list > PyD...@li... > https://lists.sourceforge.net/lists/listinfo/pydstool-users -- Ludo C. Visser, M.Sc. Science Applied phone: +31 6 1066 3076 e-mail: l.c...@sc... |