A generalized Irving–Kirkwood formula for the calculation of stress in molecular dynamics models
In non-equilibrium molecular dynamics simulations, continuum mechanics quantities can be computed from the position and momentum of the particles based on the classical Irving-Kirkwood formalism. For practical purposes, the implementations of Irving-Kirkwood formulas often involve a spatial averaging using a smooth kernel function. The resulting formula for the stress has been known as Hardy stress. Usually results obtained this way still need to be further processed to reduce the fluctuation, e.g., by ensemble or time averaging. In this paper we extend Hardy's formulas by systematically incorporating both spatial and temporal averaging into the expression of continuum quantities. The derivation follows the Irving-Kirkwood formalism, and the average quantities still satisfy conservation laws in continuum mechanics. We will discuss the selection of kernel functions and present several numerical tests.