often I want to just plot the right-hand-sides of the
odes as functions of the variables. Nowadays I do it
by keeping a 2nd version of these functions and
then reference every parameter out of the pars dictionary.
This is kinda awkward, especially for big systems.
I want sth like ode.fnspecs(x0,x1,x2,..)
Thx and Greets,
There is ode.Rhs(t, xdict, pdict=None, asarray=True) - you can leave t=0 for an autonomous system, pdict can be empty if params are already defined and asarray=False will return a dictionary that you can select from. This way, though, it will only return one value at a time. There are similar functions for the auxiliary variables, Jacobian, Mass Matrix etc.
thx for that quick answer…I dont get why I dont see the method Rhs when I do a
print dir(ode), whereas ode is a generator of course.
Since it starts with a capital letter it appears at the top of the dir() output list, above all the underscore-led names. An alternative that I provide is:
but it doesn't show any underscored names (and I don't guarantee that it works perfectly as it's still test code).