Re: [pydstool-users] simulation with many auxiliary equations
Status: Beta
Brought to you by:
robclewley
From: Ludo V. <l.c...@sc...> - 2012-05-24 14:39:18
|
> > The problem is one of ignorance. I am accustomed to ODE integrators > like scipy.odeint or MATLAB's ode45, where one writes a function > that returns the numerical rhs of the ODE system at a given time > point and the ODE solver takes this function as an argument. > > Although I am a decent Python programmer, the object oriented > structure of the PyDSTool framework and the idea of specifying > equations and parameters using strings and dictionaries is foreign > to me. Hi Gyro, I see what you mean now. I found this tutorial very useful in understanding the basics: http://www.ni.gsu.edu/~rclewley/PyDSTool/Tutorial/Tutorial_linear.html Essentially, you need to define: * a dictionary of parameters, with parameter names as keys and parameter values as values * a dictionary of initial conditions, with variable names as keys and initial values as values * a dictionary of ODEs, with variables names as keys and string-expressions for the ODE, in terms of other variables and parameters Then you can use the args-object to create a generator to compute the trajectories. I'm currently working on some examples myself, while learning how to work with PyDSTool. Maybe, once these examples can also be useful to you or others, but the fact that they may not be related to your field of research can be distracting rather than clarifying. My examples are in the field of mechanics; if you're interested, I can document them some more and post them here. Kind regards, Ludo -- Ludo C. Visser, M.Sc. Science Applied phone: +31 6 1066 3076 e-mail: l.c...@sc... |