sympy.physics.mechanics / nonlinear motion constraints #26428
Replies: 2 comments 11 replies
-
KanesMethod should automatically calculate the "acceleration constraints" from your velocity constraints, but if you want to calculate them yourself you can pass it to KanesMethod. This allows you to ensure all qdots and qddots are gone from the expressions, for example (although we may already do that). |
Beta Was this translation helpful? Give feedback.
-
Thanks! |
Beta Was this translation helpful? Give feedback.
-
I have been reading Dynamics by Carlos Roithmayr and Dewey Hodges, the updated version of Kane's original book.
I came across the topic motion constraints with nonlinear equations, something I had never come across before.$P_1, P_2$ move in the X/Y plane, such that ${}^N \bar v^{P_1} \circ {}^N \bar v^{P_2} = 0$ , N being the inertial frame.
So, I tried to calculate the simple example given there, where
So I set
speed_constr = P1.vel(N).dot(P2.vel(N))
This did not work, there were accelerations in the force vector.
In the error message I noticed the keyword acceleration_constraints in KanesMethod, so I set
speed_constr_dt = speed_constr.diff(t)
and 'gave' this to acceleration_constraints. (I kept the velocity_constraints, too)
Now all seemed to work fine, the results looked 'reasonable', and speed_constr was close to 0 - as it should be.
My questions:
1.
Is my approach correct for nonlinear motion constraints?
2.
In the documentation, I did not find anything about acceleration constraints.
Did I overlook anything?
Any help is greatly appreciated!
Beta Was this translation helpful? Give feedback.
All reactions