[lammps-users] Problems about kinetic energy calculation


I have a problem when calculating the kinetic energy of a group of rigid body. I calculated the total kinetic energy using ke command. And I calculated the translational kinetic energy and the rotational kinetic energy using ke/rigid and erotate/rigid, respectively. However, the total kinetic energy does not equal the sum of the translational kinetic energy and the rotational kinetic energy. The difference between them become larger if the time step is longer. I want to know what causes the difference. I attached a simple case to show the problem more clearly.




[email protected]


签名由 网易邮箱大师 定制

mail.in (1.29 KB)

water.txt (258 Bytes)

the problem is with your input. you need to pay attention to this warning:
WARNING: One or more atoms are time integrated more than once (src/modify.cpp:285)

you apply both fix nve and fix rigid/small to all atoms. that is incorrect. fix rigid/small already includes time integration so using a second integrator is incorrect. there are some special cases where two time integration fixes may be used on the same atoms, and that is why this is flagged as a warning and not as an error. but this is not such a special case.