Kane, Thomas R., and David A. Levinson. Dynamics, theory and applications. McGraw Hill, 1985.
from sympy import symbols
from sympy.physics.mechanics import ReferenceFrame, dynamicsymbols, Point
LA, LP, LB, LDz, LDx = symbols('L_A L_P L_B L_{Dz} L_{Dx}')
q0, q1, q2 = q = dynamicsymbols('q_0:3')
E = ReferenceFrame('E')
A = E.orientnew('A', 'Axis', [q0, E.x])
B = A.orientnew('B', 'Axis', [q1, A.y])
P0 = Point('P_0')
P1 = P0.locatenew('P_1', LA * A.z) # A*
P2 = P0.locatenew('P_2', LP * A.z) # Joint P
P3 = P2.locatenew('P_3', LB * B.z) # B*
P4 = P3.locatenew('P_4', q2 * B.z) # C*
P5 = P4.locatenew('P_5', LDz * B.z + LDx * B.x) # D*
P4.v2pt_theory(P0, E, B).express(E).simplify()
--
You received this message because you are subscribed to the Google Groups "PyDy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pydy+uns...@googlegroups.com.
To post to this group, send email to py...@googlegroups.com.
Visit this group at https://groups.google.com/group/pydy.
To view this discussion on the web visit https://groups.google.com/d/msgid/pydy/3af9a055-e46f-4751-b028-dd4adb7233df%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
P4.set_vel(B, diff(q2, t) * B.z)
P4.v1pt_theory(P0, E, B).express(E).simplify()
P4/C* is not fixed in B so using v2pt_theory() will not give the correct result -- specifically it will be missing the contribution due to \dot{q2} as you identified.I believe you want to use v1pt_theory() instead. Give that a try and see if that resolves your issue. Documentation is here:Luke
To unsubscribe from this group and stop receiving emails from it, send an email to py...@googlegroups.com.
To post to this group, send email to py...@googlegroups.com.
Visit this group at https://groups.google.com/group/pydy.
To view this discussion on the web visit https://groups.google.com/d/msgid/pydy/3af9a055-e46f-4751-b028-dd4adb7233df%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.