← Back to team overview

yade-users team mailing list archive

Re: [Question #690104]: torque

 

Question #690104 on Yade changed:
https://answers.launchpad.net/yade/+question/690104

    Status: Open => Answered

Jan Stránský proposed the following answer:
> as we all know, torque = force*(cross dot) length. so for command(1)
we can get the torque, but the definition didn't mention where is the
action point------so what is the meaning of this command in YADE?

for command (1), you get sum of "plain" torques applied to bodies. It is
something different than utils.sumTorques, but may have some use case..

If you want to sum "total" torques "manually", do the same as utils.sumTorques [1]:
torque = sum(( O.forces.t(b) + (O.bodies[b].state.pos-actionPoint).cross(O.forces.f(b)) for b in cylinderIDS), Vector3.Zero)
of not one line:
###
ret = Vector3.Zero
for i in cylinderIDS:
   b = O.bodies[i]
   p = b.state.pos
   r = p - actionPoint
   t = O.forces.t(i)
   f = O.forces.f(i)
   ret += t + r.cross(f)
###

cheers
Jan

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.