T.J., if you check out our GSoC ideas and roadmap on pydy.org we have plans
for flexible bodies. In particular we are looking at this approach to
easily integrate with our Kane class: http://dx.doi.org/10.2514/3.20540

Jason
moorepants.info
+01 530-601-9791


On Thu, Mar 14, 2013 at 12:30 AM, T.J. Lahey <notifications@github.com>wrote:

> In doc/src/modules/physics/mechanics/examples.rst:
>
> > @@ -564,14 +564,15 @@ accelerations(q double dots) with the ``rhs`` method. ::
> >
> >    >>> q = [q1, q2, q3]
> >    >>> l = LagrangesMethod(Lag, q)
> > -  >>> l.form_lagranges_equations()
> > -  [5*m*r**2*(sin(q2)*q1' + q3')*cos(q2)*q2'/4 + 5*m*r**2*(sin(q2)*q1'' + cos(q2)*q1'*q2' + q3'')*sin(q2)/4 + m*r**2*sin(q2)*q3''/4 + m*r**2*cos(q2)**2*q1''/8 + m*r**2*cos(q2)*q2'*q3'/4 + (m*r**2*sin(q2)**2/4 + m*r**2*cos(q2)**2/8)*q1'']
> > -  [                                                                                                                                 g*m*r*sin(q2) - 5*m*r**2*(sin(q2)*q1' + q3')*cos(q2)*q1'/4 - m*r**2*cos(q2)*q1'*q3'/4 + 5*m*r**2*q2''/4]
> > -  [                                                            m*r**2*(sin(q2)*q1'' + cos(q2)*q1'*q2' + q3'')/4 + m*r**2*(2*sin(q2)*q1'' + 2*cos(q2)*q1'*q2' + 2*q3'')/2 + m*r**2*sin(q2)*q1''/4 + m*r**2*cos(q2)*q1'*q2'/4 + m*r**2*q3''/4]
> > -  >>> l.rhs()
> > -  [                                                                                                                                                                                                                             q1']
> > -  [                                                                                                                                                                                                                             q2']
> > -  [                                                                                                                                                                                                                             q3']
> > -  [(24*sin(q2)**2/(m*r**2*(5*sin(q2)**2 + 1)*cos(q2)**2) + 4/(m*r**2*(5*sin(q2)**2 + 1)))*(-5*m*r**2*(sin(q2)*q1' + q3')*cos(q2)*q2'/4 - 5*m*r**2*sin(q2)*cos(q2)*q1'*q2'/4 - m*r**2*cos(q2)*q2'*q3'/4) + 6*sin(q2)*q1'*q2'/cos(q2)]
> > -  [                                                                                                                           4*(-g*m*r*sin(q2) + 5*m*r**2*(sin(q2)*q1' + q3')*cos(q2)*q1'/4 + m*r**2*cos(q2)*q1'*q3'/4)/(5*m*r**2)]
> > -  [                                               -(5*sin(q2)**2 + 1)*q1'*q2'/cos(q2) - 4*(-5*m*r**2*(sin(q2)*q1' + q3')*cos(q2)*q2'/4 - 5*m*r**2*sin(q2)*cos(q2)*q1'*q2'/4 - m*r**2*cos(q2)*q2'*q3'/4)*sin(q2)/(m*r**2*cos(q2)**2)]
> > +  >>> le = l.form_lagranges_equations()
> > +  >>> le.simplify(); le
>
> I'm pretty happy about this. I'll likely spend some time with the
> mechanics module this summer so this is great. I really need to see if I
> can extend it to include spatial variables as part of a dynamic symbol (for
> flexible body support). I may be the only one who is interested in it, but
> the module isn't useful to me without it.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/sympy/sympy/pull/1737/files#r3368947>
> .
>