diff --git a/doc/Eqs/pressure.jpg b/doc/Eqs/pressure.jpg index 63255c6915..69a92daa0c 100644 Binary files a/doc/Eqs/pressure.jpg and b/doc/Eqs/pressure.jpg differ diff --git a/doc/Eqs/pressure.tex b/doc/Eqs/pressure.tex index b3c029c30a..7a9a4e297b 100644 --- a/doc/Eqs/pressure.tex +++ b/doc/Eqs/pressure.tex @@ -3,7 +3,7 @@ \begin{document} $$ - P = \frac{N k_B T}{V} + \frac{\sum_{i}^{N} r_i \bullet f_i}{3V} + P = \frac{N k_B T}{V} + \frac{\sum_{i}^{N} r_i \bullet f_i}{dV} $$ \end{document} \ No newline at end of file diff --git a/doc/compute_pressure.html b/doc/compute_pressure.html index 6cb0ae6179..5c68cec50f 100644 --- a/doc/compute_pressure.html +++ b/doc/compute_pressure.html @@ -36,10 +36,13 @@ in your system.

where N is the number of atoms in the system (see discussion of DOF -below), Kb is the Boltzmann constant, T is the temperature, V is the -system volume, and the second term is the virial, computed within -LAMMPS for all pairwise as well as 2-body, 3-body, 4-body bonded -interactions. +below), Kb is the Boltzmann constant, T is the temperature, d is the +dimensionality of the system (2 or 3 for 2d/3d), V is the system +volume (or area in 2d), and the second term is the virial, computed +within LAMMPS for all pairwise as well as 2-body, 3-body, 4-body, and +long-range interactions. Fixes that impose constraints +(e.g. the fix shake command) also contribute to the +virial term.

A 6-component pressure tensor is also calculated by this compute which can be output by the thermo_style custom command. @@ -55,7 +58,7 @@ temperature of all atoms for consistency with the virial term, but any compute style that calculates temperature can be used, e.g. one that excludes frozen atoms or other degrees of freedom.

-

Note that the N is the above formula is really degrees-of-freedom/3 +

Note that the N is the above formula is really degrees-of-freedom/d where the DOF is specified by the temperature compute. See the various compute temperature styles for details.

diff --git a/doc/compute_pressure.txt b/doc/compute_pressure.txt index c36ad297e9..726f658a31 100644 --- a/doc/compute_pressure.txt +++ b/doc/compute_pressure.txt @@ -33,10 +33,13 @@ The pressure is computed by the standard formula :c,image(Eqs/pressure.jpg) where N is the number of atoms in the system (see discussion of DOF -below), Kb is the Boltzmann constant, T is the temperature, V is the -system volume, and the second term is the virial, computed within -LAMMPS for all pairwise as well as 2-body, 3-body, 4-body bonded -interactions. +below), Kb is the Boltzmann constant, T is the temperature, d is the +dimensionality of the system (2 or 3 for 2d/3d), V is the system +volume (or area in 2d), and the second term is the virial, computed +within LAMMPS for all pairwise as well as 2-body, 3-body, 4-body, and +long-range interactions. "Fixes"_fix.html that impose constraints +(e.g. the "fix shake"_fix_shake.html command) also contribute to the +virial term. A 6-component pressure tensor is also calculated by this compute which can be output by the "thermo_style custom"_thermo_style.html command. @@ -52,7 +55,7 @@ temperature of all atoms for consistency with the virial term, but any compute style that calculates temperature can be used, e.g. one that excludes frozen atoms or other degrees of freedom. -Note that the N is the above formula is really degrees-of-freedom/3 +Note that the N is the above formula is really degrees-of-freedom/d where the DOF is specified by the temperature compute. See the various "compute temperature"_compute.html styles for details. diff --git a/doc/fix_nph.html b/doc/fix_nph.html index 8c7cc9328a..1126337099 100644 --- a/doc/fix_nph.html +++ b/doc/fix_nph.html @@ -78,23 +78,26 @@ by the p-style argument. In each case, the desired pressure at each timestep is a ramped value during the run from the starting value to the end value.

-

Style xyz means couple all 3 dimensions together when pressure is -computed (isotropic pressure), and dilate/contract the 3 dimensions +

Style xyz means couple all dimensions together when pressure is +computed (isotropic pressure), and dilate/contract the dimensions together.

Styles xy or yz or xz means that the 2 specified dimensions are coupled together, both for pressure computation and for dilation/contraction. The 3rd dimension dilates/contracts independently, using its pressure component as the driving force. +These styles cannot be used for a 2d simulation.

-

For style aniso, all 3 dimensions dilate/contract independently -using their individual pressure components as the 3 driving forces. +

For style aniso, all dimensions dilate/contract independently using +their individual pressure components as the driving forces.

For any of the styles except xyz, any of the independent pressure components (e.g. z in xy, or any dimension in aniso) can have their target pressures (both start and stop values) specified as NULL. This means that no pressure control is applied to that dimension so -that the box dimension remains unchanged. +that the box dimension remains unchanged. For a 2d simulation the z +pressure components must be specified as NULL when using style +aniso.

In some cases (e.g. for solids) the pressure (volume) and/or temperature of the system can oscillate undesirably when a Nose/Hoover diff --git a/doc/fix_nph.txt b/doc/fix_nph.txt index 7e94babce0..1688ea9f81 100644 --- a/doc/fix_nph.txt +++ b/doc/fix_nph.txt @@ -69,23 +69,26 @@ by the {p-style} argument. In each case, the desired pressure at each timestep is a ramped value during the run from the starting value to the end value. -Style {xyz} means couple all 3 dimensions together when pressure is -computed (isotropic pressure), and dilate/contract the 3 dimensions +Style {xyz} means couple all dimensions together when pressure is +computed (isotropic pressure), and dilate/contract the dimensions together. Styles {xy} or {yz} or {xz} means that the 2 specified dimensions are coupled together, both for pressure computation and for dilation/contraction. The 3rd dimension dilates/contracts independently, using its pressure component as the driving force. +These styles cannot be used for a 2d simulation. -For style {aniso}, all 3 dimensions dilate/contract independently -using their individual pressure components as the 3 driving forces. +For style {aniso}, all dimensions dilate/contract independently using +their individual pressure components as the driving forces. For any of the styles except {xyz}, any of the independent pressure components (e.g. z in {xy}, or any dimension in {aniso}) can have their target pressures (both start and stop values) specified as NULL. This means that no pressure control is applied to that dimension so -that the box dimension remains unchanged. +that the box dimension remains unchanged. For a 2d simulation the z +pressure components must be specified as NULL when using style +{aniso}. In some cases (e.g. for solids) the pressure (volume) and/or temperature of the system can oscillate undesirably when a Nose/Hoover diff --git a/doc/fix_npt.html b/doc/fix_npt.html index 140f0883fd..72d6ec68b7 100644 --- a/doc/fix_npt.html +++ b/doc/fix_npt.html @@ -82,23 +82,26 @@ by the p-style argument. In each case, the desired pressure at each timestep is a ramped value during the run from the starting value to the end value.

-

Style xyz means couple all 3 dimensions together when pressure is -computed (isotropic pressure), and dilate/contract the 3 dimensions +

Style xyz means couple all dimensions together when pressure is +computed (isotropic pressure), and dilate/contract the dimensions together.

Styles xy or yz or xz means that the 2 specified dimensions are coupled together, both for pressure computation and for dilation/contraction. The 3rd dimension dilates/contracts independently, using its pressure component as the driving force. +These styles cannot be used for a 2d simulation.

-

For style aniso, all 3 dimensions dilate/contract independently -using their individual pressure components as the 3 driving forces. +

For style aniso, all dimensions dilate/contract independently using +their individual pressure components as the driving forces.

For any of the styles except xyz, any of the independent pressure components (e.g. z in xy, or any dimension in aniso) can have their target pressures (both start and stop values) specified as NULL. This means that no pressure control is applied to that dimension so -that the box dimension remains unchanged. +that the box dimension remains unchanged. For a 2d simulation the z +pressure components must be specified as NULL when using style +aniso.

In some cases (e.g. for solids) the pressure (volume) and/or temperature of the system can oscillate undesirably when a Nose/Hoover diff --git a/doc/fix_npt.txt b/doc/fix_npt.txt index 23fc1c8908..27173ef32d 100644 --- a/doc/fix_npt.txt +++ b/doc/fix_npt.txt @@ -71,23 +71,26 @@ by the {p-style} argument. In each case, the desired pressure at each timestep is a ramped value during the run from the starting value to the end value. -Style {xyz} means couple all 3 dimensions together when pressure is -computed (isotropic pressure), and dilate/contract the 3 dimensions +Style {xyz} means couple all dimensions together when pressure is +computed (isotropic pressure), and dilate/contract the dimensions together. Styles {xy} or {yz} or {xz} means that the 2 specified dimensions are coupled together, both for pressure computation and for dilation/contraction. The 3rd dimension dilates/contracts independently, using its pressure component as the driving force. +These styles cannot be used for a 2d simulation. -For style {aniso}, all 3 dimensions dilate/contract independently -using their individual pressure components as the 3 driving forces. +For style {aniso}, all dimensions dilate/contract independently using +their individual pressure components as the driving forces. For any of the styles except {xyz}, any of the independent pressure components (e.g. z in {xy}, or any dimension in {aniso}) can have their target pressures (both start and stop values) specified as NULL. This means that no pressure control is applied to that dimension so -that the box dimension remains unchanged. +that the box dimension remains unchanged. For a 2d simulation the z +pressure components must be specified as NULL when using style +{aniso}. In some cases (e.g. for solids) the pressure (volume) and/or temperature of the system can oscillate undesirably when a Nose/Hoover