From: Rob Clewley <rob.clewley@gm...> - 2011-01-24 20:27:51
> How can I deal with matrices in the system of equations? I need to work with
> such systems often in future as this is the form I get after applying the
> Galerking decomposition to continuum-mechanical dynamic systesm.
> Thanks for your help!
I'm afraid the software is somewhat limited in this respect. Matrix
equations have to unwrapped into a set of 1D equations in scalar
variables only, i.e. you must pre-multiply out the RHS vector
expressions and extract each component of the result to the RHS of a
1D scalar variable. As well as the usual Maple or Sage, the excellent
SymPy package should be able to help you perform the symbolic matrix
multiplications, from which you could copy and paste strings into your
In addition, provided you have the Radau integrator working, you may
integrate systems that have a LHS "mass matrix," which can have time
and state dependence. I.e. this will let you solve more general ODEs
M(x,t) dx/dt = F(x,t)
that cannot be written in a normal form
dx / dt = f(x, t),
where x is a vector, because of the potential non-invertability of M.
For an example, see the demonstration in
tests/freefinger_noforce_radau.py, which implements a "finger" model
as an inverted, damped triple pendulum. Currently, the syntax for this
is clunky, and if anyone would like to contribute the code to provide
better syntactic sugar for this feature I would include it!
Robert Clewley, Ph.D.
Neuroscience Institute and
Department of Mathematics and Statistics
Georgia State University
PO Box 5030
Atlanta, GA 30302, USA
tel: 404-413-6420 fax: 404-413-5446
Get latest updates about Open Source Projects, Conferences and News.