2007-02-10 05:40:32 +08:00
|
|
|
"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
|
|
|
|
|
|
|
|
:link(lws,http://lammps.sandia.gov)
|
|
|
|
:link(ld,Manual.html)
|
|
|
|
:link(lc,Section_commands.html#comm)
|
|
|
|
|
|
|
|
:line
|
|
|
|
|
|
|
|
compute stress/atom command :h3
|
|
|
|
|
|
|
|
[Syntax:]
|
|
|
|
|
2007-12-01 07:16:45 +08:00
|
|
|
compute ID group-ID stress/atom keyword ... :pre
|
|
|
|
|
|
|
|
ID, group-ID are documented in "compute"_compute.html command
|
|
|
|
stress/atom = style name of this compute command
|
|
|
|
zero or more keywords may be appended
|
2012-02-15 04:13:00 +08:00
|
|
|
keyword = {ke} or {pair} or {bond} or {angle} or {dihedral} or {improper} or {kspace} or {fix} or {virial} :ul
|
2007-02-10 05:40:32 +08:00
|
|
|
|
|
|
|
[Examples:]
|
|
|
|
|
2008-02-07 23:17:25 +08:00
|
|
|
compute 1 mobile stress/atom
|
2007-12-01 07:16:45 +08:00
|
|
|
compute 1 all stress/atom pair bond :pre
|
2007-02-10 05:40:32 +08:00
|
|
|
|
|
|
|
[Description:]
|
|
|
|
|
2007-12-01 07:16:45 +08:00
|
|
|
Define a computation that computes the symmetric per-atom stress
|
|
|
|
tensor for each atom in a group. The tensor for each atom has 6
|
2009-12-04 07:58:11 +08:00
|
|
|
components and is stored as a 6-element vector in the following order:
|
|
|
|
xx, yy, zz, xy, xz, yz. See the "compute
|
2007-12-01 07:16:45 +08:00
|
|
|
pressure"_compute_pressure.html command if you want the stress tensor
|
2009-12-04 07:58:11 +08:00
|
|
|
(pressure) of the entire system.
|
2007-02-10 05:40:32 +08:00
|
|
|
|
2007-12-01 07:36:27 +08:00
|
|
|
The stress tensor for atom {I} is given by the following formula,
|
|
|
|
where {a} and {b} take on values x,y,z to generate the 6 components of
|
|
|
|
the symmetric tensor:
|
2007-02-10 05:40:32 +08:00
|
|
|
|
|
|
|
:c,image(Eqs/stress_tensor.jpg)
|
|
|
|
|
2007-07-03 03:59:42 +08:00
|
|
|
The first term is a kinetic energy contribution for atom {I}. The
|
2007-12-01 07:36:27 +08:00
|
|
|
second term is a pairwise energy contribution where {n} loops over the
|
2007-12-01 07:16:45 +08:00
|
|
|
{Np} neighbors of atom {I}, {r1} and {r2} are the positions of the 2
|
2007-12-01 07:36:27 +08:00
|
|
|
atoms in the pairwise interaction, and {F1} and {F2} are the forces on
|
|
|
|
the 2 atoms resulting from the pairwise interaction. The third term
|
|
|
|
is a bond contribution of similar form for the {Nb} bonds which atom
|
2008-01-10 05:57:06 +08:00
|
|
|
{I} is part of. There are similar terms for the {Na} angle, {Nd}
|
2012-02-15 04:13:00 +08:00
|
|
|
dihedral, and {Ni} improper interactions atom {I} is part of. There
|
|
|
|
is also a term for the KSpace contribution from long-range Coulombic
|
|
|
|
interactions, if defined. Finally, there is a term for the {Nf}
|
|
|
|
"fixes"_fix.html that apply internal constraint forces to atom {I}.
|
|
|
|
Currently, only the "fix shake"_fix_shake.html and "fix
|
|
|
|
rigid"_fix_rigid.html commands contribute to this term.
|
2007-12-01 07:36:27 +08:00
|
|
|
|
|
|
|
As the coefficients in the formula imply, a virial contribution
|
|
|
|
produced by a small set of atoms (e.g. 4 atoms in a dihedral or 3
|
|
|
|
atoms in a Tersoff 3-body interaction) is assigned in equal portions
|
|
|
|
to each atom in the set. E.g. 1/4 of the dihedral virial to each of
|
2008-01-10 05:57:06 +08:00
|
|
|
the 4 atoms, or 1/3 of the fix virial due to SHAKE constraints applied
|
|
|
|
to atoms in a a water molecule via the "fix shake"_fix_shake.html
|
|
|
|
command.
|
2007-12-01 07:16:45 +08:00
|
|
|
|
|
|
|
If no extra keywords are listed, all of the terms in this formula are
|
|
|
|
included in the per-atom stress tensor. If any extra keywords are
|
2009-03-06 05:17:05 +08:00
|
|
|
listed, only those terms are summed to compute the tensor. The
|
|
|
|
{virial} keyword means include all terms except the kinetic energy
|
|
|
|
{ke}.
|
2007-12-01 07:16:45 +08:00
|
|
|
|
|
|
|
Note that the stress for each atom is due to its interaction with all
|
|
|
|
other atoms in the simulation, not just with other atoms in the group.
|
|
|
|
|
|
|
|
The "dihedral_style charmm"_dihedral_charmm.html style calculates
|
|
|
|
pairwise interactions between 1-4 atoms. The virial contribution of
|
|
|
|
these terms is included in the pair virial, not the dihedral virial.
|
|
|
|
|
2012-02-16 23:49:48 +08:00
|
|
|
The KSpace contribution is calculated using the method in
|
2013-02-15 00:24:40 +08:00
|
|
|
"(Heyes)"_#Heyes for the Ewald method and by the methodology described
|
|
|
|
in "(Sirk)"_#Sirk for PPPM. The choice of KSpace solver is specified
|
|
|
|
by the "kspace_style pppm"_kspace_style.html command. Note that for
|
|
|
|
PPPM, the calcluation requires 6 extra FFTs each timestep that
|
2012-02-16 23:49:48 +08:00
|
|
|
per-atom stress is calculated. Thus it can significantly increase the
|
|
|
|
cost of the PPPM calculation if it is needed on a large fraction of
|
|
|
|
the simulation timesteps.
|
2012-02-15 04:13:00 +08:00
|
|
|
|
2007-12-01 07:16:45 +08:00
|
|
|
Note that as defined in the formula, per-atom stress is the negative
|
2010-01-24 08:08:59 +08:00
|
|
|
of the per-atom pressure tensor. It is also really a stress*volume
|
2008-02-07 23:17:25 +08:00
|
|
|
formulation, meaning the computed quantity is in units of
|
2010-01-24 08:08:59 +08:00
|
|
|
pressure*volume. It would need to be divided by a per-atom volume to
|
2008-02-07 23:17:25 +08:00
|
|
|
have units of stress (pressure), but an individual atom's volume is
|
2010-01-24 07:33:43 +08:00
|
|
|
not well defined or easy to compute in a deformed solid or a liquid.
|
|
|
|
Thus, if the diagonal components of the per-atom stress tensor are
|
|
|
|
summed for all atoms in the system and the sum is divided by dV, where
|
|
|
|
d = dimension and V is the volume of the system, the result should be
|
|
|
|
-P, where P is the total pressure of the system.
|
2007-12-01 07:16:45 +08:00
|
|
|
|
2009-03-04 01:19:44 +08:00
|
|
|
These lines in an input script for a 3d system should yield that
|
|
|
|
result. I.e. the last 2 columns of thermo output will be the same:
|
2007-12-01 07:16:45 +08:00
|
|
|
|
|
|
|
compute peratom all stress/atom
|
2008-06-18 21:47:22 +08:00
|
|
|
compute p all reduce sum c_peratom\[1\] c_peratom\[2\] c_peratom\[3\]
|
2008-01-17 03:17:20 +08:00
|
|
|
variable press equal -(c_p\[1\]+c_p\[2\]+c_p\[3\])/(3*vol)
|
2008-01-04 03:03:15 +08:00
|
|
|
thermo_style custom step temp etotal press v_press :pre
|
2007-12-01 07:16:45 +08:00
|
|
|
|
2008-01-04 08:56:10 +08:00
|
|
|
[Output info:]
|
|
|
|
|
2009-12-05 05:04:00 +08:00
|
|
|
This compute calculates a per-atom array with 6 columns, which can be
|
|
|
|
accessed by indices 1-6 by any command that uses per-atom values from
|
2011-12-14 04:43:36 +08:00
|
|
|
a compute as input. See "Section_howto
|
|
|
|
15"_Section_howto.html#howto_15 for an overview of LAMMPS output
|
|
|
|
options.
|
2008-01-04 08:56:10 +08:00
|
|
|
|
2010-01-24 07:33:43 +08:00
|
|
|
The per-atom array values will be in pressure*volume
|
|
|
|
"units"_units.html as discussed above.
|
2010-01-24 07:20:05 +08:00
|
|
|
|
2008-02-07 23:17:25 +08:00
|
|
|
[Restrictions:] none
|
2007-02-10 05:40:32 +08:00
|
|
|
|
2007-12-01 07:16:45 +08:00
|
|
|
[Related commands:]
|
2007-02-10 05:40:32 +08:00
|
|
|
|
2009-03-04 01:03:38 +08:00
|
|
|
"compute pe"_compute_pe.html, "compute pressure"_compute_pressure.html
|
2007-07-03 03:59:42 +08:00
|
|
|
|
2007-12-01 07:16:45 +08:00
|
|
|
[Default:] none
|
2012-02-16 23:49:48 +08:00
|
|
|
|
|
|
|
:line
|
|
|
|
|
|
|
|
:link(Heyes)
|
|
|
|
[(Heyes)] Heyes, Phys Rev B 49, 755 (1994),
|
2013-02-15 00:24:40 +08:00
|
|
|
|
|
|
|
:link(Sirk)
|
2013-02-15 00:29:54 +08:00
|
|
|
[(Sirk)] Sirk, Moore, Brown, J Chem Phys, 138, 064505 (2013).
|