Hey, all
Consider a pendulum of length OA = 2a, of mass m as a rigid body of center of
mass G (OG = a) which turn around (O,z). The angle between the reference frame
R and the rod is q.
The inertia of the body is I = (G,0,ma^2/3,ma^2/3)
When I ask Sympy for the angular momentum about point O, it says
m*a**2/3*q'*R.z, the same as point G.
I should have 4*m*a**2/3*q'*R.z.
Anybody can help me ?
Here is the code:
from sympy import symbols
from sympy.physics.mechanics import *
m,a = symbols('m a')
q = dynamicsymbols('q')
R = ReferenceFrame('R')
R1 = R.orientnew('R1', 'Axis', [q, R.z])
R1.set_ang_vel(R,q.diff() * R.z)
I = inertia(R1,0,m*a**2/3,m*a**2/3)
O = Point('O')
A = O.locatenew('A', 2*a * R1.x)
G = O.locatenew('G', a * R1.x)
S = RigidBody('S',G,R1,m,(I,G))
O.set_vel(R, 0)
A.v2pt_theory(O, R, R1)
G.v2pt_theory(O, R, R1)
print(S.angular_momentum(O,R))
print(S.angular_momentum(G,R))
Thanks !
Philippe
--
You received this message because you are subscribed to the Google Groups
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sympy.
To view this discussion on the web visit
https://groups.google.com/d/msgid/sympy/d03a0507-e644-438b-87be-683c48341e11%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.