I propose an answer to my own question. Would there not an error in Sympy ? I can read here http://docs.sympy.org/dev/modules/physics/mechanics/api/part_bod.html#sympy.physics.mechanics.rigidbody.RigidBody.angular_momentum that:
*Angular momentum of the rigid body.* The angular momentum H, about some point O, of a rigid body B, in a frame N is given by H = I* . omega + r* x (M * v) where I* is the central inertia dyadic of B, omega is the angular velocity of body B in the frame, N, r* is the position vector from point O to the mass center of B, and v is the velocity of point O in the frame, N. I think v is not the velocity of point O, but velocity of the center of mass ? Am I wrong ? Thanks for your help Philippe Le samedi 24 octobre 2015 18:00:59 UTC+2, Philippe Fichou a écrit : > > 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 sympy+unsubscr...@googlegroups.com. To post to this group, send email to sympy@googlegroups.com. 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/8f3af7d6-95b2-4185-8cda-ebc292dec582%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.