compute erotate/rigid command
compute ID group-ID erotate/rigid fix-ID
- ID, group-ID are documented in compute command
- erotate/rigid = style name of this compute command
- fix-ID = ID of rigid body fix
compute 1 all erotate/rigid myRigid
Define a computation that calculates the rotational kinetic energy of a collection of rigid bodies, as defined by one of the fix rigid command variants.
The rotational energy of each rigid body is computed as 1/2 I Wbody^2, where I is the inertia tensor for the rigid body, and Wbody is its angular velocity vector. Both I and Wbody are in the frame of reference of the rigid body, i.e. I is diagonalized.
The fix-ID should be the ID of one of the fix rigid commands which defines the rigid bodies. The group specified in the compute command is ignored. The rotational energy of all the rigid bodies defined by the fix rigid command in included in the calculation.
This compute calculates a global scalar (the summed rotational energy of all the rigid bodies). This value can be used by any command that uses a global scalar value from a compute as input. See Section 6.15 for an overview of LAMMPS output options.
The scalar value calculated by this compute is “extensive”. The scalar value will be in energy units.
This compute is part of the RIGID package. It is only enabled if LAMMPS was built with that package. See the Making LAMMPS section for more info.