the v2pt_theory method doesn't return the correct speed

조회수 41회
읽지 않은 첫 메시지로 건너뛰기

FSFarimani

읽지 않음,
2019. 5. 31. 오후 12:42:1219. 5. 31.
받는사람 PyDy
Following the problem set 3.15 from the book

Kane, Thomas R., and David A. Levinson. Dynamics, theory and applications. McGraw Hill, 1985.

page 276 (296 PDF from here) for which there is a code in PyDy examples here,

Untitled.png


I have rewritten the code as:


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*


No trying to calculate the velocity of C* in E reference frame:

P4.v2pt_theory(P0, E, B).express(E).simplify()

I get the wrong result of:

Capture.PNG



which doesn't seem right as it does not include the \dot{q2} as it should. I would appreciate if you could help me understand where is my mistake or how is the most canonical way to find the velocity of C* ?

Dale Lukas Peterson

읽지 않음,
2019. 5. 31. 오후 3:49:0719. 5. 31.
받는사람 py...@googlegroups.com
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


--
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.


--
For a successful technology, reality must take precedence over public relations, for Nature cannot be fooled. -- Richard Feynman

FSFarimani

읽지 않음,
2019. 6. 2. 오전 5:05:1219. 6. 2.
받는사람 PyDy
Dear Luke,

Thanks a lot for your help.
So if I change it to

P4.set_vel(B, diff(q2, t) * B.z)
P4
.v1pt_theory(P0, E, B).express(E).simplify()

then it should give me the correct answer?

Best,
Foad


On Friday, May 31, 2019 at 9:49:07 PM UTC+2, Dale Lukas Peterson wrote:
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.
전체답장
작성자에게 답글
전달
새 메시지 0개