ls1-MarDyn is a massively parallel Molecular Dynamics (MD) code for large systems. Its main target is the simulation of thermodynamics and nanofluidics. ls1-MarDyn is designed with a focus on performance and easy extensibility.
The present PR adds the possibility to get the global kinetic energy (rotational and translational) from the Domain.
This is then used in the ResultWriter to sample the total kinetic energy during the simulation. This is helpful when running a (pseudo) NVE simulation since it allows to control the total energy (which should remain constant in NVE).
How Has This Been Tested?
The sampling was tested with
1CLJTS fluid (no rotation): In this case, the kinetic energy is 1.5 times the temperature (T). This value matched the one from the ResultWriter. 1.5 is the number of degrees of freedom (DOF) / 2.
CO2 example: The kinetic energy is 2.5*T with 2.5=5/2 and 5 DOF (3 transl. + 2 rot.). This matches the sampled value.
Description
The present PR adds the possibility to get the global kinetic energy (rotational and translational) from the Domain. This is then used in the ResultWriter to sample the total kinetic energy during the simulation. This is helpful when running a (pseudo) NVE simulation since it allows to control the total energy (which should remain constant in NVE).
How Has This Been Tested?
The sampling was tested with
1CLJTS fluid (no rotation): In this case, the kinetic energy is 1.5 times the temperature (T). This value matched the one from the ResultWriter. 1.5 is the number of degrees of freedom (DOF) / 2.
CO2 example: The kinetic energy is 2.5*T with 2.5=5/2 and 5 DOF (3 transl. + 2 rot.). This matches the sampled value.
This PR is related to #255