From aad0a9a0f303f62bee0fdd41c6afbc3ac48831aa Mon Sep 17 00:00:00 2001 From: Stephen Sanderson Date: Wed, 17 Mar 2021 14:14:33 +1000 Subject: [PATCH] Updated documentation to reflect changes in compute_temp_profile --- doc/src/compute_temp_profile.rst | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/doc/src/compute_temp_profile.rst b/doc/src/compute_temp_profile.rst index 0fa8ce5807..3f045f2bda 100644 --- a/doc/src/compute_temp_profile.rst +++ b/doc/src/compute_temp_profile.rst @@ -76,13 +76,20 @@ velocity for each atom. Note that if there is only one atom in the bin, its thermal velocity will thus be 0.0. After the spatially-averaged velocity field has been subtracted from -each atom, the temperature is calculated by the formula KE = (dim\*N -- dim\*Nx\*Ny\*Nz) k T/2, where KE = total kinetic energy of the group of -atoms (sum of 1/2 m v\^2), dim = 2 or 3 = dimensionality of the -simulation, N = number of atoms in the group, k = Boltzmann constant, -and T = temperature. The dim\*Nx\*Ny\*Nz term are degrees of freedom -subtracted to adjust for the removal of the center-of-mass velocity in -each of Nx\*Ny\*Nz bins, as discussed in the :ref:`(Evans) ` paper. +each atom, the temperature is calculated by the formula +KE = (dim\*N - stream\*Nx\*Ny\*Nz - extra ) k T/2, where KE = total +kinetic energy of the group of atoms (sum of 1/2 m v\^2), dim = 2 +or 3 = dimensionality of the simulation, stream = 0, 1, 2 or 3 for +streaming velocity subtracted in 0, 1, 2 or 3 dimensions, extra = extra +degrees-of-freedom, N = number of atoms in the group, k = Boltzmann +constant, and T = temperature. The stream\*Nx\*Ny\*Nz term is degrees +of freedom subtracted to adjust for the removal of the center-of-mass +velocity in each direction of the Nx\*Ny\*Nz bins, as discussed in the +:ref:`(Evans) ` paper. The extra term defaults to (dim - stream) +and accounts for overall conservation of center-of-mass velocity across +the group in directions where streaming velocity is not subtracted. This +can be altered using the *extra* option of the +:doc:`compute_modify ` command. If the *out* keyword is used with a *tensor* value, which is the default, a kinetic energy tensor, stored as a 6-element vector, is @@ -123,10 +130,13 @@ needed, the subtracted degrees-of-freedom can be altered using the .. note:: When using the *out* keyword with a value of *bin*\ , the - calculated temperature for each bin does not include the - degrees-of-freedom adjustment described in the preceding paragraph, - for fixes that constrain molecular motion. It does include the - adjustment due to the *extra* option, which is applied to each bin. + calculated temperature for each bin includes the degrees-of-freedom + adjustment described in the preceding paragraph for fixes that + constrain molecular motion, as well as the adjustment due to + the *extra* option (which defaults to dim - stream as described above), + by fractionally applying them based on the fraction of atoms in each + bin, so that the degrees-of-freedom summed over all bins is consistent + with the degrees-of-freedom in the scalar temperature calculation. See the :doc:`Howto thermostat ` doc page for a discussion of different ways to compute temperature and perform