# Question on fix addtorque

Hi

I am trying to understand the source code for fix addtorque. But I can not find out the reason why the last two terms are in the right hand side of the following equation (line 237 of fix_addtorque.cpp):

fx = massone * (dzdomegadt[1]-dydomegadt[2] + vzomega[1]-vyomega[2]);

I would be highly appreciated if anybody can help me understand the logic behind it or introduce me a reference about this topic.

Regards

i would look in a classical mechanics textbook, like this one https://en.wikipedia.org/wiki/Classical_Mechanics_(Goldstein_book),
under rigid bodies.

axel.

I just looked at the eqs in fix addtorque and
don’t understand them either. I’m CCing Laurent
so maybe he can comment/explain or add some eqs
to the fix addtorque doc page (esp now that
it is easier due to the new doc page format).

I would have thought that the forces on each
atom when you apply an added torque are
independent of the current omega and angmom.
So I’m not clear on why that is being computed or
used in the eqs.

Steve

Dear all,

I must have some notes about these equations in my office, but I
cannot access them, being confined at home as all academic staffs in
France...

I think I remember the idea of the second term was to compensate for
the centrifugal force (which pulls the atoms in the group apart), so
as to ensure a rigid body motion in the absence of other external
forces.

Best wishes,
Laurent

Is the added torque due to an unbalanced distribution of forces? rigid body rotation (without translation) is ensured otherwise. Seems the denoted correction would simply suppress the natural deformation of the body due to its angular momentum.

Adrian Diaz

Hi Laurent and Adrian - thanks for commenting on this thread.

I think I remember the idea of the second term was to compensate for
the centrifugal force (which pulls the atoms in the group apart), so
as to ensure a rigid body motion in the absence of other external
forces.

So Laurent, you’re saying the goal of fix addtorque
is, in the absence of any external forces or even internal
forces between the atoms (e.g. no pair style defined),
to have the atoms being torqued spin faster and faster as
if they were a rigid body? For that, I agree you need
the extra correction force.

But I think it might be more logical (and similar to fix addforce)
to just add the torque force and let the atoms respond however
they wish. E.g. as Adrian said, if there is a pair style attracting
the atoms to each other (or just a set of harmonic bonds),
then the atoms would spin under the added torque, but
it would dilate the body, i.e. stretch the springs.

Since you already have the extra terms in the code,
maybe an option to turn them on/off would be good.
I can imagine a user wanting either case. Also when I
read the doc page, the current mode of operation was
not clear to me (though it might be now if re-read it!)

Thanks,
Steve