Create an abstract base class for the mechanics *Method
classes and create a commit set of attributes & methods
#21772
Labels
*Method
classes and create a commit set of attributes & methods
#21772
We currently have
KanesMethod
,LagrangesMethod
, and very soonJointMethod
.JointMethod
is unique in that it will useKanesMethod
orLagrangesMethod
internally, but, even so, it would be helpful if all three of these methods had some common attributes and methods so that duck typing can work well and there is consistency among the methods.Some reasons making these more consistent will be helpful:
JointMethod(..., method=KanesMethod|LagrangesMethod|OtherNewMethods)
:JointMethod
should be able to use a number of otherMethod
classes to actually formulate the equations of motion.JointMethod
simple collects the joints and bodies then passes the correct information to the internal methods. Being able to pass in these and future methods toJointMethod
would give a clean, simple API.pydy.system.System
currently consumesKanesMethod
in its constructor. It should be able to consume any*Method
object and also theSymbolicSystem
object (https://github.com/sympy/sympy/blob/master/sympy/physics/mechanics/system.py).SymbolicSystem
was/is that each method object could produce theSymbolicSystem
, e.g.KanesMethod.export_symbolic_system()
. The symbolic system is supposed to be the most general container that can describe any symbolic multibody system. If that works, thenpydy.system.System()
could consume it instead of (or in addition) to the*Methods
classes.*Methods
classes that could be created, e.g.HamiltonsMethod
,TMTMethod
,NewtonEulerMethod
, etc. So having a common class to build them from is helpful.Key things that
Method()
should likley have:M*u' = F
M*u' = F
form_equations_of_motion()
method, as this is such a time consuming step we have this explicit method for the Methods classes.The text was updated successfully, but these errors were encountered: