From 7de2073e8ebd7d7c83fa54d558f5eb925f87b111 Mon Sep 17 00:00:00 2001 From: Steve Plimpton Date: Wed, 21 Aug 2024 12:46:45 -0600 Subject: [PATCH] better explanations of vector outputs for compute temp commands --- doc/src/compute_temp.rst | 33 ++++++++------- doc/src/compute_temp_asphere.rst | 25 ++++++++--- doc/src/compute_temp_body.rst | 29 +++++++------ doc/src/compute_temp_chunk.rst | 28 +++++++------ doc/src/compute_temp_com.rst | 31 ++++++++------ doc/src/compute_temp_cs.rst | 51 ++++++++++++----------- doc/src/compute_temp_deform.rst | 30 ++++++++------ doc/src/compute_temp_deform_eff.rst | 33 ++++++++------- doc/src/compute_temp_partial.rst | 28 +++++++------ doc/src/compute_temp_profile.rst | 64 +++++++++++++++++------------ doc/src/compute_temp_ramp.rst | 36 +++++++++------- doc/src/compute_temp_region.rst | 44 +++++++++++--------- doc/src/compute_temp_region_eff.rst | 29 ++++++------- doc/src/compute_temp_rotate.rst | 30 ++++++++------ doc/src/compute_temp_sphere.rst | 24 ++++++++--- doc/src/compute_viscosity_cos.rst | 37 +++++++++-------- 16 files changed, 322 insertions(+), 230 deletions(-) diff --git a/doc/src/compute_temp.rst b/doc/src/compute_temp.rst index e081280496..4c7a46b822 100644 --- a/doc/src/compute_temp.rst +++ b/doc/src/compute_temp.rst @@ -48,14 +48,18 @@ the group, :math:`N_\mathrm{fix DOFs}` is the number of degrees of freedom removed by fix commands (see below), :math:`k_B` is the Boltzmann constant, and :math:`T` is the resulting computed temperature. -A kinetic energy tensor, stored as a six-element vector, is also -calculated by this compute for use in the computation of a pressure -tensor. The formula for the components of the tensor is the same as the -above expression for :math:`E_\mathrm{kin}`, except that :math:`v_i^2` is -replaced by :math:`v_{i,x} v_{i,y}` for the :math:`xy` component, and so on. -The six components of the vector are ordered :math:`xx`, :math:`yy`, -:math:`zz`, :math:`xy`, :math:`xz`, :math:`yz`. - +A symmetric tensor, stored as a six-element vector, is also calculated +by this compute for use in the computation of a pressure tensor by the +:doc:`compute pressue ` command. The formula for +the components of the tensor is the same as the above expression for +:math:`E_\mathrm{kin}`, except that the 1/2 factor is NOT included and +the :math:`v_i^2` is replaced by :math:`v_{i,x} v_{i,y}` for the +:math:`xy` component, and so on. Note that because it lacks the 1/2 +factor, these tensor components are twice those of the traditional +kinetic energy tensor. The six components of the vector are ordered +:math:`xx`, :math:`yy`, :math:`zz`, :math:`xy`, :math:`xz`, +:math:`yz`. + The number of atoms contributing to the temperature is assumed to be constant for the duration of the run; use the *dynamic* option of the :doc:`compute_modify ` command if this is not the case. @@ -94,16 +98,17 @@ Output info """"""""""" This compute calculates a global scalar (the temperature) and a global -vector of length six (KE tensor), which can be accessed by indices -1--6. These values can be used by any command that uses global scalar -or vector values from a compute as input. See the :doc:`Howto output -` page for an overview of LAMMPS output options. +vector of length six (symmetric tensor), which can be accessed by +indices 1--6. These values can be used by any command that uses +global scalar or vector values from a compute as input. See the +:doc:`Howto output ` page for an overview of LAMMPS +output options. The scalar value calculated by this compute is "intensive". The vector values are "extensive". -The scalar value will be in temperature :doc:`units `. The -vector values will be in energy :doc:`units `. +The scalar value is in temperature :doc:`units `. The vector +values are in energy :doc:`units `. Restrictions """""""""""" diff --git a/doc/src/compute_temp_asphere.rst b/doc/src/compute_temp_asphere.rst index 5741db76aa..c9b1e51532 100644 --- a/doc/src/compute_temp_asphere.rst +++ b/doc/src/compute_temp_asphere.rst @@ -90,6 +90,19 @@ for the :math:`xy` component, and the appropriate elements of the moment of inertia tensor are used. The six components of the vector are ordered :math:`xx`, :math:`yy`, :math:`zz`, :math:`xy`, :math:`xz`, :math:`yz`. +A symmetric tensor, stored as a six-element vector, is also calculated +by this compute for use in the computation of a pressure tensor by the +:doc:`compute pressue ` command. The formula for +the components of the tensor is the same as the above expression for +:math:`E_\mathrm{kin}`, except that the 1/2 factor is NOT included and +the :math:`v_i^2` and :math:`\omega^2` are replaced by :math:`v_x v_y` +and :math:`\omega_x \omega_y` for the :math:`xy` component, and so on. +And the appropriate elements of the moment of inertia tensor are used. +Note that because it lacks the 1/2 factor, these tensor components are +twice those of the traditional kinetic energy tensor. The six +components of the vector are ordered :math:`xx`, :math:`yy`, +:math:`zz`, :math:`xy`, :math:`xz`, :math:`yz`. + The number of atoms contributing to the temperature is assumed to be constant for the duration of the run; use the *dynamic/dof* option of the :doc:`compute_modify ` command if this is not the @@ -131,17 +144,17 @@ Output info """"""""""" This compute calculates a global scalar (the temperature) and a global -vector of length 6 (KE tensor), which can be accessed by indices 1--6. -These values can be used by any command that uses global scalar or -vector values from a compute as input. -See the :doc:`Howto output ` page for an overview of LAMMPS +vector of length 6 (symmertic tensor), which can be accessed by +indices 1--6. These values can be used by any command that uses +global scalar or vector values from a compute as input. See the +:doc:`Howto output ` page for an overview of LAMMPS output options. The scalar value calculated by this compute is "intensive". The vector values are "extensive". -The scalar value will be in temperature :doc:`units `. The -vector values will be in energy :doc:`units `. +The scalar value is in temperature :doc:`units `. The vector +values are in energy :doc:`units `. Restrictions """""""""""" diff --git a/doc/src/compute_temp_body.rst b/doc/src/compute_temp_body.rst index f29ca5c39b..ef536c1af7 100644 --- a/doc/src/compute_temp_body.rst +++ b/doc/src/compute_temp_body.rst @@ -62,12 +62,17 @@ kinetic energy is computed as :math:`\frac12 I \omega^2`, where :math:`I` is the moment of inertia tensor for the aspherical particle and :math:`\omega` is its angular velocity, which is computed from its angular momentum. -A kinetic energy tensor, stored as a 6-element vector, is also calculated by -this compute. The formula for the components of the tensor is the same as the -above formula, except that :math:`v^2` and :math:`\omega^2` are -replaced by :math:`v_x v_y` and :math:`\omega_x \omega_y` for the -math:`xy` component, and the appropriate elements of the inertia tensor are -used. The six components of the vector are ordered :math:`xx`, :math:`yy`, +A symmetric tensor, stored as a six-element vector, is also calculated +by this compute for use in the computation of a pressure tensor by the +:doc:`compute pressue ` command. The formula for +the components of the tensor is the same as the above expression for +:math:`E_\mathrm{kin}`, except that the 1/2 factor is NOT included and +the :math:`v_i^2` and :math:`\omega^2` are replaced by :math:`v_x v_y` +and :math:`\omega_x \omega_y` for the :math:`xy` component, and so on. +And the appropriate elements of the moment of inertia tensor are used. +Note that because it lacks the 1/2 factor, these tensor components are +twice those of the traditional kinetic energy tensor. The six +components of the vector are ordered :math:`xx`, :math:`yy`, :math:`zz`, :math:`xy`, :math:`xz`, :math:`yz`. The number of atoms contributing to the temperature is assumed to be @@ -111,17 +116,17 @@ Output info """"""""""" This compute calculates a global scalar (the temperature) and a global -vector of length 6 (KE tensor), which can be accessed by indices 1--6. -These values can be used by any command that uses global scalar or -vector values from a compute as input. -See the :doc:`Howto output ` page for an overview of LAMMPS +vector of length 6 (symmetric tensor), which can be accessed by +indices 1--6. These values can be used by any command that uses +global scalar or vector values from a compute as input. See the +:doc:`Howto output ` page for an overview of LAMMPS output options. The scalar value calculated by this compute is "intensive". The vector values are "extensive". -The scalar value will be in temperature :doc:`units `. -The vector values will be in energy :doc:`units `. +The scalar value is in temperature :doc:`units `. The vector +values are in energy :doc:`units `. Restrictions """""""""""" diff --git a/doc/src/compute_temp_chunk.rst b/doc/src/compute_temp_chunk.rst index c92b4e36e9..33eab04343 100644 --- a/doc/src/compute_temp_chunk.rst +++ b/doc/src/compute_temp_chunk.rst @@ -85,12 +85,14 @@ By default, *adof* = 2 or 3 = dimensionality of system, as set via the :doc:`dimension ` command, and *cdof* = 0.0. This gives the usual formula for temperature. -A kinetic energy tensor, stored as a six-element vector, is also -calculated by this compute for use in the computation of a pressure -tensor. The formula for the components of the tensor is the same as -the above formula, except that :math:`v^2` is replaced by -:math:`v_x v_y` for the :math:`xy` component, and so on. -The six components of the vector are ordered :math:`xx`, :math:`yy`, +A symmetric tensor, stored as a six-element vector, is also calculated +by this compute. The formula for the components of the tensor is the +same as the above expression for :math:`E_\mathrm{kin}`, except that +the 1/2 factor is NOT included and the :math:`v_i^2` is replaced by +:math:`v_{i,x} v_{i,y}` for the :math:`xy` component, and so on. Note +that because it lacks the 1/2 factor, these tensor components are +twice those of the traditional kinetic energy tensor. The six +components of the vector are ordered :math:`xx`, :math:`yy`, :math:`zz`, :math:`xy`, :math:`xz`, :math:`yz`. Note that the number of atoms contributing to the temperature is @@ -227,10 +229,10 @@ Output info """"""""""" This compute calculates a global scalar (the temperature) and a global -vector of length 6 (KE tensor), which can be accessed by indices 1--6. -These values can be used by any command that uses global scalar or -vector values from a compute as input. -See the :doc:`Howto output ` page for an overview of LAMMPS +vector of length 6 (symmetric tensor), which can be accessed by +indices 1--6. These values can be used by any command that uses +global scalar or vector values from a compute as input. See the +:doc:`Howto output ` page for an overview of LAMMPS output options. This compute also optionally calculates a global array, if one or more @@ -245,9 +247,9 @@ page for an overview of LAMMPS output options. The scalar value calculated by this compute is "intensive". The vector values are "extensive". The array values are "intensive". -The scalar value will be in temperature :doc:`units `. The -vector values will be in energy :doc:`units `. The array values -will be in temperature :doc:`units ` for the *temp* value, and in +The scalar value is in temperature :doc:`units `. The vector +values are in energy :doc:`units `. The array values will be +in temperature :doc:`units ` for the *temp* value, and in energy :doc:`units ` for the *kecom* and *internal* values. Restrictions diff --git a/doc/src/compute_temp_com.rst b/doc/src/compute_temp_com.rst index d54fa7dfa6..e94c911dfa 100644 --- a/doc/src/compute_temp_com.rst +++ b/doc/src/compute_temp_com.rst @@ -44,12 +44,17 @@ where KE is the total kinetic energy of the group of atoms (sum of simulation, :math:`N` is number of atoms in the group, :math:`k_B` is the Boltzmann constant, and :math:`T` is the absolute temperature. -A kinetic energy tensor, stored as a six-element vector, is also -calculated by this compute for use in the computation of a pressure -tensor. The formula for the components of the tensor is the same as -the above formula, except that :math:`v^2` is replaced by :math:`v_x v_y` -for the :math:`xy` component, and so on. The six components of the vector are -ordered :math:`xx`, :math:`yy`, :math:`zz`, :math:`xy`, :math:`xz`, :math:`yz`. +A symmetric tensor, stored as a six-element vector, is also calculated +by this compute for use in the computation of a pressure tensor by the +:doc:`compute pressue ` command. The formula for +the components of the tensor is the same as the above expression for +:math:`E_\mathrm{kin}`, except that the 1/2 factor is NOT included and +the :math:`v_i^2` is replaced by :math:`v_{i,x} v_{i,y}` for the +:math:`xy` component, and so on. Note that because it lacks the 1/2 +factor, these tensor components are twice those of the traditional +kinetic energy tensor. The six components of the vector are ordered +:math:`xx`, :math:`yy`, :math:`zz`, :math:`xy`, :math:`xz`, +:math:`yz`. The number of atoms contributing to the temperature is assumed to be constant for the duration of the run; use the *dynamic* option of the @@ -81,17 +86,17 @@ Output info """"""""""" This compute calculates a global scalar (the temperature) and a global -vector of length 6 (KE tensor), which can be accessed by indices 1--6. -These values can be used by any command that uses global scalar or -vector values from a compute as input. See the -:doc:`Howto output ` page for an overview of LAMMPS output -options. +vector of length 6 (symmetric tensor), which can be accessed by +indices 1--6. These values can be used by any command that uses +global scalar or vector values from a compute as input. See the +:doc:`Howto output ` page for an overview of LAMMPS +output options. The scalar value calculated by this compute is "intensive". The vector values are "extensive". -The scalar value will be in temperature :doc:`units `. -The vector values will be in energy :doc:`units `. +The scalar value is in temperature :doc:`units `. The vector +values is in energy :doc:`units `. Restrictions """""""""""" diff --git a/doc/src/compute_temp_cs.rst b/doc/src/compute_temp_cs.rst index a33fbf7ffb..0620fea9b7 100644 --- a/doc/src/compute_temp_cs.rst +++ b/doc/src/compute_temp_cs.rst @@ -67,26 +67,31 @@ the velocity of each core or shell atom used in the KE calculation is the velocity of the center-of-mass (COM) of the core/shell pair the atom is part of. -A kinetic energy tensor, stored as a six-element vector, is also calculated by -this compute for use in the computation of a pressure tensor. The formula for -the components of the tensor is the same as the above formula, except that -:math:`v^2` is replaced by :math:`v_x v_y` for the :math:`xy` component, and so -on. The six components of the vector are ordered :math:`xx`, :math:`yy`, -:math:`zz`, :math:`xy`, :math:`xz`, :math:`yz`. In contrast to the temperature, -the velocity of each core or shell atom is taken individually. +A symmetric tensor, stored as a six-element vector, is also calculated +by this compute for use in the computation of a pressure tensor by the +:doc:`compute pressue ` command. The formula for +the components of the tensor is the same as the above expression for +:math:`E_\mathrm{kin}`, except that the 1/2 factor is NOT included and +the :math:`v_i^2` is replaced by :math:`v_{i,x} v_{i,y}` for the +:math:`xy` component, and so on. Note that because it lacks the 1/2 +factor, these tensor components are twice those of the traditional +kinetic energy tensor. The six components of the vector are ordered +:math:`xx`, :math:`yy`, :math:`zz`, :math:`xy`, :math:`xz`, +:math:`yz`. The change this fix makes to core/shell atom velocities is essentially -computing the temperature after a "bias" has been removed from the velocity of -the atoms. This "bias" is the velocity of the atom relative to the -center-of-mass velocity of the core/shell pair. If this compute is used with a -fix command that performs thermostatting then this bias will be subtracted from -each atom, thermostatting of the remaining center-of-mass velocity will be -performed, and the bias will be added back in. This means the thermostatting -will effectively be performed on the core/shell pairs, instead of on the -individual core and shell atoms. Thermostatting fixes that work in this way -include :doc:`fix nvt `, :doc:`fix temp/rescale `, -:doc:`fix temp/berendsen `, and -:doc:`fix langevin `. +computing the temperature after a "bias" has been removed from the +velocity of the atoms. This "bias" is the velocity of the atom +relative to the center-of-mass velocity of the core/shell pair. If +this compute is used with a fix command that performs thermostatting +then this bias will be subtracted from each atom, thermostatting of +the remaining center-of-mass velocity will be performed, and the bias +will be added back in. This means the thermostatting will effectively +be performed on the core/shell pairs, instead of on the individual +core and shell atoms. Thermostatting fixes that work in this way +include :doc:`fix nvt `, :doc:`fix temp/rescale +`, :doc:`fix temp/berendsen `, +and :doc:`fix langevin `. The internal energy of core/shell pairs can be calculated by the :doc:`compute temp/chunk ` command, if chunks are defined @@ -97,15 +102,15 @@ Output info """"""""""" This compute calculates a global scalar (the temperature) and a global -vector of length 6 (KE tensor), which can be accessed by indices 1--6. -These values can be used by any command that uses global scalar or -vector values from a compute as input. +vector of length 6 (symmertric tensor), which can be accessed by +indices 1--6. These values can be used by any command that uses +global scalar or vector values from a compute as input. The scalar value calculated by this compute is "intensive". The vector values are "extensive". -The scalar value will be in temperature :doc:`units `. The -vector values will be in energy :doc:`units `. +The scalar value is in temperature :doc:`units `. The vector +values are in energy :doc:`units `. Restrictions """""""""""" diff --git a/doc/src/compute_temp_deform.rst b/doc/src/compute_temp_deform.rst index adf76564a8..1c8c2da096 100644 --- a/doc/src/compute_temp_deform.rst +++ b/doc/src/compute_temp_deform.rst @@ -73,12 +73,16 @@ simulation, :math:`N` is the number of atoms in the group, :math:`k_B` is the Boltzmann constant, and :math:`T` is the temperature. Note that :math:`v` in the kinetic energy formula is the atom's velocity. -A kinetic energy tensor, stored as a six-element vector, is also -calculated by this compute for use in the computation of a pressure -tensor. The formula for the components of the tensor is the same as -the above formula, except that :math:`v^2` is replaced by :math:`v_x v_y` for -the :math:`xy` component, and so on. The six components of the vector are -ordered :math:`xx`, :math:`yy`, :math:`zz`, :math:`xy`, :math:`xz`, +A symmetric tensor, stored as a six-element vector, is also calculated +by this compute for use in the computation of a pressure tensor by the +:doc:`compute pressue ` command. The formula for +the components of the tensor is the same as the above expression for +:math:`E_\mathrm{kin}`, except that the 1/2 factor is NOT included and +the :math:`v_i^2` is replaced by :math:`v_{i,x} v_{i,y}` for the +:math:`xy` component, and so on. Note that because it lacks the 1/2 +factor, these tensor components are twice those of the traditional +kinetic energy tensor. The six components of the vector are ordered +:math:`xx`, :math:`yy`, :math:`zz`, :math:`xy`, :math:`xz`, :math:`yz`. The number of atoms contributing to the temperature is assumed to be @@ -128,17 +132,17 @@ Output info """"""""""" This compute calculates a global scalar (the temperature) and a global -vector of length 6 (KE tensor), which can be accessed by indices 1--6. -These values can be used by any command that uses global scalar or -vector values from a compute as input. See the -:doc:`Howto output ` page for an overview of LAMMPS output -options. +vector of length 6 (symmetric tensor), which can be accessed by +indices 1--6. These values can be used by any command that uses +global scalar or vector values from a compute as input. See the +:doc:`Howto output ` page for an overview of LAMMPS +output options. The scalar value calculated by this compute is "intensive". The vector values are "extensive". -The scalar value will be in temperature :doc:`units `. -The vector values will be in energy :doc:`units `. +The scalar value is in temperature :doc:`units `. The vector +values are in energy :doc:`units `. Restrictions """""""""""" diff --git a/doc/src/compute_temp_deform_eff.rst b/doc/src/compute_temp_deform_eff.rst index 83535f4727..3c22ad8045 100644 --- a/doc/src/compute_temp_deform_eff.rst +++ b/doc/src/compute_temp_deform_eff.rst @@ -29,17 +29,20 @@ model, after subtracting out a streaming velocity induced by the simulation box changing size and/or shape, for example in a non-equilibrium MD (NEMD) simulation. The size/shape change is induced by use of the :doc:`fix deform ` command. A -compute of this style is created by the -:doc:`fix nvt/sllod/eff ` command to compute the thermal -temperature of atoms for thermostatting purposes. A compute of this -style can also be used by any command that computes a temperature -(e.g., :doc:`thermo_modify `, :doc:`fix npt/eff `). +compute of this style is created by the :doc:`fix nvt/sllod/eff +` command to compute the thermal temperature of +atoms for thermostatting purposes. A compute of this style can also +be used by any command that computes a temperature (e.g., +:doc:`thermo_modify `, :doc:`fix npt/eff +`). The calculation performed by this compute is exactly like that described by the :doc:`compute temp/deform ` -command, except that the formula for the temperature includes the -radial electron velocity contributions, as discussed by the :doc:`compute temp/eff ` command. Note that only the -translational degrees of freedom for each nuclei or electron are +command, except that the formulas for the temperature (scalar) and +diagonal components of the symmetric tensor (vector) include the +radial electron velocity contributions, as discussed by the +:doc:`compute temp/eff ` command. Note that only +the translational degrees of freedom for each nuclei or electron are affected by the streaming velocity adjustment. The radial velocity component of the electrons is not affected. @@ -47,17 +50,17 @@ Output info """"""""""" This compute calculates a global scalar (the temperature) and a global -vector of length 6 (KE tensor), which can be accessed by indices 1--6. -These values can be used by any command that uses global scalar or -vector values from a compute as input. See the -:doc:`Howto output ` page for an overview of LAMMPS output -options. +vector of length 6 (symmetric tensor), which can be accessed by +indices 1--6. These values can be used by any command that uses +global scalar or vector values from a compute as input. See the +:doc:`Howto output ` page for an overview of LAMMPS +output options. The scalar value calculated by this compute is "intensive". The vector values are "extensive". -The scalar value will be in temperature :doc:`units `. The -vector values will be in energy :doc:`units `. +The scalar value is in temperature :doc:`units `. The vector +values are in energy :doc:`units `. Restrictions """""""""""" diff --git a/doc/src/compute_temp_partial.rst b/doc/src/compute_temp_partial.rst index d5628e0d60..d98558c159 100644 --- a/doc/src/compute_temp_partial.rst +++ b/doc/src/compute_temp_partial.rst @@ -44,12 +44,16 @@ constant, and :math:`T` = temperature. The calculation of KE excludes the is 0. The dim parameter is adjusted to give the correct number of degrees of freedom. -A kinetic energy tensor, stored as a six-element vector, is also -calculated by this compute for use in the calculation of a pressure -tensor. The formula for the components of the tensor is the same as -the above formula, except that :math:`v^2` is replaced by :math:`v_x v_y` for -the :math:`xy` component, and so on. The six components of the vector are -ordered :math:`xx`, :math:`yy`, :math:`zz`, :math:`xy`, :math:`xz`, +A symmetric tensor, stored as a six-element vector, is also calculated +by this compute for use in the computation of a pressure tensor by the +:doc:`compute pressue ` command. The formula for +the components of the tensor is the same as the above expression for +:math:`E_\mathrm{kin}`, except that the 1/2 factor is NOT included and +the :math:`v_i^2` is replaced by :math:`v_{i,x} v_{i,y}` for the +:math:`xy` component, and so on. Note that because it lacks the 1/2 +factor, these tensor components are twice those of the traditional +kinetic energy tensor. The six components of the vector are ordered +:math:`xx`, :math:`yy`, :math:`zz`, :math:`xy`, :math:`xz`, :math:`yz`. The number of atoms contributing to the temperature is assumed to be @@ -88,17 +92,17 @@ Output info """"""""""" This compute calculates a global scalar (the temperature) and a global -vector of length 6 (KE tensor), which can be accessed by indices 1--6. -These values can be used by any command that uses global scalar or -vector values from a compute as input. -See the :doc:`Howto output ` page for an overview of LAMMPS +vector of length 6 (symmetric tensor), which can be accessed by +indices 1--6. These values can be used by any command that uses +global scalar or vector values from a compute as input. See the +:doc:`Howto output ` page for an overview of LAMMPS output options. The scalar value calculated by this compute is "intensive". The vector values are "extensive". -The scalar value will be in temperature :doc:`units `. The -vector values will be in energy :doc:`units `. +The scalar value is in temperature :doc:`units `. The vector +values are in energy :doc:`units `. Restrictions """""""""""" diff --git a/doc/src/compute_temp_profile.rst b/doc/src/compute_temp_profile.rst index 566d8cf3fc..47725cdcbc 100644 --- a/doc/src/compute_temp_profile.rst +++ b/doc/src/compute_temp_profile.rst @@ -97,21 +97,27 @@ 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 six-element vector, is also calculated by -this compute for use in the computation of a pressure tensor. The formula for -the components of the tensor is the same as the above formula, except that -:math:`v^2` is replaced by :math:`v_x v_y` for the :math:`xy` component, and -so on. The six components of the vector are ordered :math:`xx`, :math:`yy`, +If the *out* keyword is used with a *tensor* value, which is the +default, then a symmetric tensor, stored as a six-element vector, is +also calculated by this compute for use in the computation of a +pressure tensor by the :doc:`compute pressue ` +command. The formula for the components of the tensor is the same as +the above expression for :math:`E_\mathrm{kin}`, except that the 1/2 +factor is NOT included and the :math:`v_i^2` is replaced by +:math:`v_{i,x} v_{i,y}` for the :math:`xy` component, and so on. Note +that because it lacks the 1/2 factor, these tensor components are +twice those of the traditional kinetic energy tensor. The six +components of the vector are ordered :math:`xx`, :math:`yy`, :math:`zz`, :math:`xy`, :math:`xz`, :math:`yz`. -If the *out* keyword is used with a *bin* value, the count of atoms and -computed temperature for each bin are stored for output, as an array of values, -as described below. The temperature of each bin is calculated as described -above, where the bias velocity is subtracted and only the remaining thermal -velocity of atoms in the bin contributes to the temperature. See the note -below for how the temperature is normalized by the degrees-of-freedom of atoms -in the bin. +If the *out* keyword is used with a *bin* value, the count of atoms +and computed temperature for each bin are stored for output, as an +array of values, as described below. The temperature of each bin is +calculated as described above, where the bias velocity is subtracted +and only the remaining thermal velocity of atoms in the bin +contributes to the temperature. See the note below for how the +temperature is normalized by the degrees-of-freedom of atoms in the +bin. The number of atoms contributing to the temperature is assumed to be constant for the duration of the run; use the *dynamic* option of the @@ -166,16 +172,17 @@ Output info This compute calculates a global scalar (the temperature). Depending on the setting of the *out* keyword, it also calculates a global vector or array. For *out* = *tensor*, it calculates a vector of -length 6 (KE tensor), which can be accessed by indices 1--6. For *out* -= *bin* it calculates a global array which has 2 columns and :math:`N` rows, -where :math:`N` is the number of bins. The first column contains the number -of atoms in that bin. The second contains the temperature of that -bin, calculated as described above. The ordering of rows in the array -is as follows. Bins in :math:`x` vary fastest, then :math:`y`, then -:math:`z`. Thus for a :math:`10\times 10\times 10` 3d array of bins, there -will be 1000 rows. The bin with indices :math:`(i_x,i_y,i_z) = (2,3,4)` would -map to row :math:`M = 10^2(i_z-1) + 10(i_y-1) + i_x = 322`, where the rows are -numbered from 1 to 1000 and the bin indices are numbered from 1 to 10 in each +length 6 (symmetric tensor), which can be accessed by indices 1--6. +For *out* = *bin* it calculates a global array which has 2 columns and +:math:`N` rows, where :math:`N` is the number of bins. The first +column contains the number of atoms in that bin. The second contains +the temperature of that bin, calculated as described above. The +ordering of rows in the array is as follows. Bins in :math:`x` vary +fastest, then :math:`y`, then :math:`z`. Thus for a :math:`10\times +10\times 10` 3d array of bins, there will be 1000 rows. The bin with +indices :math:`(i_x,i_y,i_z) = (2,3,4)` would map to row :math:`M = +10^2(i_z-1) + 10(i_y-1) + i_x = 322`, where the rows are numbered from +1 to 1000 and the bin indices are numbered from 1 to 10 in each dimension. These values can be used by any command that uses global scalar or @@ -186,9 +193,9 @@ options. The scalar value calculated by this compute is "intensive". The vector values are "extensive". The array values are "intensive". -The scalar value will be in temperature :doc:`units `. The -vector values will be in energy :doc:`units `. The first column -of array values are counts; the values in the second column will be in +The scalar value us in temperature :doc:`units `. The vector +values are in energy :doc:`units `. The first column of array +values are counts; the values in the second column will be in temperature :doc:`units `. Restrictions @@ -203,7 +210,10 @@ will be for most thermostats. Related commands """""""""""""""" -:doc:`compute temp `, :doc:`compute temp/ramp `, :doc:`compute temp/deform `, :doc:`compute pressure ` +:doc:`compute temp `, :doc:`compute temp/ramp + `, :doc:`compute temp/deform + `, :doc:`compute pressure + ` Default """"""" diff --git a/doc/src/compute_temp_ramp.rst b/doc/src/compute_temp_ramp.rst index 2e170316fb..d89a98fbea 100644 --- a/doc/src/compute_temp_ramp.rst +++ b/doc/src/compute_temp_ramp.rst @@ -63,12 +63,17 @@ command (e.g., :math:`\AA` for units = real or metal). A velocity in lattice spacings per unit time). The :doc:`lattice ` command must have been previously used to define the lattice spacing. -A kinetic energy tensor, stored as a six-element vector, is also calculated by -this compute for use in the computation of a pressure tensor. The formula for -the components of the tensor is the same as the above formula, except that -:math:`v^2` is replaced by :math:`v_x v_y` for the :math:`xy` component, and -so on. The six components of the vector are ordered :math:`xx`, :math:`yy`, -:math:`zz`, :math:`xy`, :math:`xz`, :math:`yz`. +A symmetric tensor, stored as a six-element vector, is also calculated +by this compute for use in the computation of a pressure tensor by the +:doc:`compute pressue ` command. The formula for +the components of the tensor is the same as the above expression for +:math:`E_\mathrm{kin}`, except that the 1/2 factor is NOT included and +the :math:`v_i^2` is replaced by :math:`v_{i,x} v_{i,y}` for the +:math:`xy` component, and so on. Note that because it lacks the 1/2 +factor, these tensor components are twice those of the traditional +kinetic energy tensor. The six components of the vector are ordered +:math:`xx`, :math:`yy`, :math:`zz`, :math:`xy`, :math:`xz`, +:math:`yz`. The number of atoms contributing to the temperature is assumed to be constant for the duration of the run; use the *dynamic* option of the @@ -100,17 +105,17 @@ Output info """"""""""" This compute calculates a global scalar (the temperature) and a global -vector of length 6 (KE tensor), which can be accessed by indices 1--6. -These values can be used by any command that uses global scalar or -vector values from a compute as input. See the -:doc:`Howto output ` page for an overview of LAMMPS output -options. +vector of length 6 (symmetric tensor), which can be accessed by +indices 1--6. These values can be used by any command that uses +global scalar or vector values from a compute as input. See the +:doc:`Howto output ` page for an overview of LAMMPS +output options. The scalar value calculated by this compute is "intensive". The vector values are "extensive". -The scalar value will be in temperature :doc:`units `. The -vector values will be in energy :doc:`units `. +The scalar value is in temperature :doc:`units `. The vector +values are in energy :doc:`units `. Restrictions """""""""""" @@ -119,7 +124,10 @@ Restrictions Related commands """""""""""""""" -:doc:`compute temp `, :doc:`compute temp/profie `, :doc:`compute temp/deform `, :doc:`compute pressure ` +:doc:`compute temp `, :doc:`compute temp/profie + `, :doc:`compute temp/deform + `, :doc:`compute pressure + ` Default """"""" diff --git a/doc/src/compute_temp_region.rst b/doc/src/compute_temp_region.rst index 77954e8898..d2fc8a1633 100644 --- a/doc/src/compute_temp_region.rst +++ b/doc/src/compute_temp_region.rst @@ -49,12 +49,17 @@ where KE = is the total kinetic energy of the group of atoms (sum of :math:`N` is the number of atoms in both the group and region, :math:`k_B` is the Boltzmann constant, and :math:`T` temperature. -A kinetic energy tensor, stored as a six-element vector, is also -calculated by this compute for use in the computation of a pressure -tensor. The formula for the components of the tensor is the same as -the above formula, except that :math:`v^2` is replaced by :math:`v_x v_y` -for the :math:`xy` component, and so on. The six components of the vector are -ordered :math:`xx`, :math:`yy`, :math:`zz`, :math:`xy`, :math:`xz`, :math:`yz`. +A symmetric tensor, stored as a six-element vector, is also calculated +by this compute for use in the computation of a pressure tensor by the +:doc:`compute pressue ` command. The formula for +the components of the tensor is the same as the above expression for +:math:`E_\mathrm{kin}`, except that the 1/2 factor is NOT included and +the :math:`v_i^2` is replaced by :math:`v_{i,x} v_{i,y}` for the +:math:`xy` component, and so on. Note that because it lacks the 1/2 +factor, these tensor components are twice those of the traditional +kinetic energy tensor. The six components of the vector are ordered +:math:`xx`, :math:`yy`, :math:`zz`, :math:`xy`, :math:`xz`, +:math:`yz`. The number of atoms contributing to the temperature is calculated each time the temperature is evaluated since it is assumed atoms can @@ -78,12 +83,13 @@ will operate only on atoms that are currently in the geometric region. Unlike other compute styles that calculate temperature, this compute does not subtract out degrees-of-freedom due to fixes that constrain -motion, such as :doc:`fix shake ` and :doc:`fix rigid `. This is because those degrees of freedom -(e.g., a constrained bond) could apply to sets of atoms that straddle -the region boundary, and hence the concept is somewhat ill-defined. -If needed the number of subtracted degrees of freedom can be set -explicitly using the *extra* option of the -:doc:`compute_modify ` command. +motion, such as :doc:`fix shake ` and :doc:`fix rigid +`. This is because those degrees of freedom (e.g., a +constrained bond) could apply to sets of atoms that straddle the +region boundary, and hence the concept is somewhat ill-defined. If +needed the number of subtracted degrees of freedom can be set +explicitly using the *extra* option of the :doc:`compute_modify +` command. See the :doc:`Howto thermostat ` page for a discussion of different ways to compute temperature and perform @@ -93,17 +99,17 @@ Output info """"""""""" This compute calculates a global scalar (the temperature) and a global -vector of length 6 (KE tensor), which can be accessed by indices 1--6. -These values can be used by any command that uses global scalar or -vector values from a compute as input. See the -:doc:`Howto output ` page for an overview of LAMMPS output -options. +vector of length 6 (symmetric tensor), which can be accessed by +indices 1--6. These values can be used by any command that uses +global scalar or vector values from a compute as input. See the +:doc:`Howto output ` page for an overview of LAMMPS +output options. The scalar value calculated by this compute is "intensive". The vector values are "extensive". -The scalar value will be in temperature :doc:`units `. -The vector values will be in energy :doc:`units `. +The scalar value is in temperature :doc:`units `. The vector +values are in energy :doc:`units `. Restrictions """""""""""" diff --git a/doc/src/compute_temp_region_eff.rst b/doc/src/compute_temp_region_eff.rst index b8cd73f4fd..12bc3f01a1 100644 --- a/doc/src/compute_temp_region_eff.rst +++ b/doc/src/compute_temp_region_eff.rst @@ -32,32 +32,33 @@ temperature (e.g., :doc:`thermo_modify `). The operation of this compute is exactly like that described by the :doc:`compute temp/region ` command, except that -the formula for the temperature itself includes the radial electron -velocity contributions, as discussed by the -:doc:`compute temp/eff ` command. +the formulas for the temperature (scalar) and diagonal components of +the symmetric tensor (vector) include the radial electron velocity +contributions, as discussed by the :doc:`compute temp/eff +` command. Output info -""""""""""" +"""""""""" This compute calculates a global scalar (the temperature) and a global -vector of length 6 (KE tensor), which can be accessed by indices 1--6. -These values can be used by any command that uses global scalar or -vector values from a compute as input. See the -:doc:`Howto output ` page for an overview of LAMMPS output -options. +vector of length 6 (symmetric tensor), which can be accessed by +indices 1--6. These values can be used by any command that uses +global scalar or vector values from a compute as input. See the +:doc:`Howto output ` page for an overview of LAMMPS +output options. The scalar value calculated by this compute is "intensive". The vector values are "extensive". -The scalar value will be in temperature :doc:`units `. The -vector values will be in energy :doc:`units `. +The scalar value is in temperature :doc:`units `. The vector +values are in energy :doc:`units `. Restrictions """""""""""" -This compute is part of the EFF package. It is only enabled if -LAMMPS was built with that package. -See the :doc:`Build package ` page for more info. +This compute is part of the EFF package. It is only enabled if LAMMPS +was built with that package. See the :doc:`Build package +` page for more info. Related commands """""""""""""""" diff --git a/doc/src/compute_temp_rotate.rst b/doc/src/compute_temp_rotate.rst index 7c445109a1..7fab9a1325 100644 --- a/doc/src/compute_temp_rotate.rst +++ b/doc/src/compute_temp_rotate.rst @@ -43,12 +43,17 @@ where KE is the total kinetic energy of the group of atoms (sum of :math:`N` is the number of atoms in the group, :math:`k_B` is the Boltzmann constant, and :math:`T` is the absolute temperature. -A kinetic energy tensor, stored as a six-element vector, is also calculated by -this compute for use in the computation of a pressure tensor. The formula for -the components of the tensor is the same as the above formula, except that -:math:`v^2` is replaced by :math:`v_x v_y` for the :math:`xy` component, and -so on. The six components of the vector are ordered :math:`xx`, :math:`yy`, -:math:`zz`, :math:`xy`, :math:`xz`, :math:`yz`. +A symmetric tensor, stored as a six-element vector, is also calculated +by this compute for use in the computation of a pressure tensor by the +:doc:`compute pressue ` command. The formula for +the components of the tensor is the same as the above expression for +:math:`E_\mathrm{kin}`, except that the 1/2 factor is NOT included and +the :math:`v_i^2` is replaced by :math:`v_{i,x} v_{i,y}` for the +:math:`xy` component, and so on. Note that because it lacks the 1/2 +factor, these tensor components are twice those of the traditional +kinetic energy tensor. The six components of the vector are ordered +:math:`xx`, :math:`yy`, :math:`zz`, :math:`xy`, :math:`xz`, +:math:`yz`. The number of atoms contributing to the temperature is assumed to be constant for the duration of the run; use the *dynamic* option of the @@ -80,17 +85,16 @@ Output info """"""""""" This compute calculates a global scalar (the temperature) and a global -vector of length 6 (KE tensor), which can be accessed by indices 1-6. -These values can be used by any command that uses global scalar or -vector values from a compute as input. See the -:doc:`Howto output ` page for an overview of LAMMPS output -options. +vector of length 6 (symmetric tensor), which can be accessed by +indices 1-6. These values can be used by any command that uses global +scalar or vector values from a compute as input. See the :doc:`Howto +output ` page for an overview of LAMMPS output options. The scalar value calculated by this compute is "intensive". The vector values are "extensive". -The scalar value will be in temperature :doc:`units `. The -vector values will be in energy :doc:`units `. +The scalar value is in temperature :doc:`units `. The vector +values are in energy :doc:`units `. Restrictions """""""""""" diff --git a/doc/src/compute_temp_sphere.rst b/doc/src/compute_temp_sphere.rst index d1891f64bf..5499b3aae9 100644 --- a/doc/src/compute_temp_sphere.rst +++ b/doc/src/compute_temp_sphere.rst @@ -77,6 +77,18 @@ tensor is the same as the above formulas, except that :math:`v^2` and vector are ordered :math:`xx`, :math:`yy`, :math:`zz`, :math:`xy`, :math:`xz`, :math:`yz`. +A symmetric tensor, stored as a six-element vector, is also calculated +by this compute for use in the computation of a pressure tensor by the +:doc:`compute pressue ` command. The formula for +the components of the tensor is the same as the above expression for +:math:`E_\mathrm{kin}`, except that the 1/2 factor is NOT included and +the :math:`v_i^2` and :math:`\omega^2` are replaced by :math:`v_x v_y` +and :math:`\omega_x \omega_y` for the :math:`xy` component, and so on. +Note that because it lacks the 1/2 factor, these tensor components are +twice those of the traditional kinetic energy tensor. The six +components of the vector are ordered :math:`xx`, :math:`yy`, +:math:`zz`, :math:`xy`, :math:`xz`, :math:`yz`. + The number of atoms contributing to the temperature is assumed to be constant for the duration of the run; use the *dynamic* option of the :doc:`compute_modify ` command if this is not the case. @@ -117,17 +129,17 @@ Output info """"""""""" This compute calculates a global scalar (the temperature) and a global -vector of length 6 (KE tensor), which can be accessed by indices 1--6. -These values can be used by any command that uses global scalar or -vector values from a compute as input. -See the :doc:`Howto output ` page for an overview of LAMMPS +vector of length 6 (symmetric tensor), which can be accessed by +indices 1--6. These values can be used by any command that uses +global scalar or vector values from a compute as input. See the +:doc:`Howto output ` page for an overview of LAMMPS output options. The scalar value calculated by this compute is "intensive". The vector values are "extensive". -The scalar value will be in temperature :doc:`units `. The -vector values will be in energy :doc:`units `. +The scalar value is in temperature :doc:`units `. The vector +values are in energy :doc:`units `. Restrictions """""""""""" diff --git a/doc/src/compute_viscosity_cos.rst b/doc/src/compute_viscosity_cos.rst index 87cfec56cf..bfc0c03d79 100644 --- a/doc/src/compute_viscosity_cos.rst +++ b/doc/src/compute_viscosity_cos.rst @@ -86,12 +86,17 @@ where KE is the total kinetic energy of the group of atoms (sum of :math:`N` is the number of atoms in the group, :math:`k_B` is the Boltzmann constant, and :math:`T` is the absolute temperature. -A kinetic energy tensor, stored as a six-element vector, is also -calculated by this compute for use in the computation of a pressure -tensor. The formula for the components of the tensor is the same as -the above formula, except that :math:`v^2` is replaced by :math:`v_x v_y` for -the :math:`xy` component, and so on. The six components of the vector are -ordered :math:`xx`, :math:`yy`, :math:`zz`, :math:`xy`, :math:`xz`, :math:`yz`. +A symmetric tensor, stored as a six-element vector, is also calculated +by this compute for use in the computation of a pressure tensor by the +:doc:`compute pressue ` command. The formula for +the components of the tensor is the same as the above expression for +:math:`E_\mathrm{kin}`, except that the 1/2 factor is NOT included and +the :math:`v_i^2` is replaced by :math:`v_{i,x} v_{i,y}` for the +:math:`xy` component, and so on. Note that because it lacks the 1/2 +factor, these tensor components are twice those of the traditional +kinetic energy tensor. The six components of the vector are ordered +:math:`xx`, :math:`yy`, :math:`zz`, :math:`xy`, :math:`xz`, +:math:`yz`. The number of atoms contributing to the temperature is assumed to be constant for the duration of the run; use the *dynamic* option of the @@ -126,21 +131,21 @@ Output info """"""""""" This compute calculates a global scalar (the temperature) and a global -vector of length 7, which can be accessed by indices 1--7. -The first six elements of the vector are the KE tensor, -and the seventh is the cosine-shaped velocity amplitude :math:`V`, -which can be used to calculate the reciprocal viscosity, as shown in the example. -These values can be used by any command that uses global scalar or -vector values from a compute as input. -See the :doc:`Howto output ` page for an overview of LAMMPS output options. +vector of length 7, which can be accessed by indices 1--7. The first +six elements of the vector are those of the symmetric tensor discussed +above. The seventh is the cosine-shaped velocity amplitude :math:`V`, +which can be used to calculate the reciprocal viscosity, as shown in +the example. These values can be used by any command that uses global +scalar or vector values from a compute as input. See the :doc:`Howto +output ` page for an overview of LAMMPS output options. The scalar value calculated by this compute is "intensive". The first six elements of vector values are "extensive", and the seventh element of vector values is "intensive". -The scalar value will be in temperature :doc:`units `. -The first six elements of vector values will be in energy :doc:`units `. -The seventh element of vector value will be in velocity :doc:`units `. +The scalar value is in temperature :doc:`units `. The first +six elements of vector values are in energy :doc:`units `. The +seventh element of vector value us in velocity :doc:`units `. Restrictions """"""""""""