2007-02-10 05:40:32 +08:00
|
|
|
<HTML>
|
|
|
|
<CENTER><A HREF = "http://lammps.sandia.gov">LAMMPS WWW Site</A> - <A HREF = "Manual.html">LAMMPS Documentation</A> - <A HREF = "Section_commands.html#comm">LAMMPS Commands</A>
|
|
|
|
</CENTER>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<HR>
|
|
|
|
|
|
|
|
<H3>compute stress/atom command
|
|
|
|
</H3>
|
|
|
|
<P><B>Syntax:</B>
|
|
|
|
</P>
|
2007-12-01 07:16:45 +08:00
|
|
|
<PRE>compute ID group-ID stress/atom keyword ...
|
2007-02-10 05:40:32 +08:00
|
|
|
</PRE>
|
2007-12-01 07:16:45 +08:00
|
|
|
<UL><LI>ID, group-ID are documented in <A HREF = "compute.html">compute</A> command
|
|
|
|
<LI>stress/atom = style name of this compute command
|
|
|
|
<LI>zero or more keywords may be appended
|
|
|
|
<LI>keyword = <I>ke</I> or <I>pair</I> or <I>bond</I> or <I>angle</I> or <I>dihedral</I> or <I>improper</I>
|
2007-02-10 05:40:32 +08:00
|
|
|
</UL>
|
|
|
|
<P><B>Examples:</B>
|
|
|
|
</P>
|
|
|
|
<PRE>compute 1 mobile stress/atom
|
|
|
|
</PRE>
|
2007-12-01 07:16:45 +08:00
|
|
|
<PRE>compute 1 all stress/atom pair bond
|
2007-07-03 03:59:42 +08:00
|
|
|
</PRE>
|
2007-02-10 05:40:32 +08:00
|
|
|
<P><B>Description:</B>
|
|
|
|
</P>
|
2007-12-01 07:16:45 +08:00
|
|
|
<P>Define a computation that computes the symmetric per-atom stress
|
|
|
|
tensor for each atom in a group. The tensor for each atom has 6
|
|
|
|
components: xx, yy, zz, xy, xz, yz. See the <A HREF = "compute_pressure.html">compute
|
|
|
|
pressure</A> command if you want the stress tensor
|
|
|
|
(pressure) of the entire system. The 6 components can be accessed by
|
|
|
|
indices 1-6 by any command that uses per-atom computes, e.g. the <A HREF = "dump.html">dump
|
2007-09-28 07:25:52 +08:00
|
|
|
custom</A> command or <A HREF = "fix_ave_spatial.html">fix ave/spatial</A>
|
2007-12-01 07:16:45 +08:00
|
|
|
command or <A HREF = "fix_ave_atom.html">fix ave/atom</A> command. See <A HREF = "Section_howto.html#4_15">this
|
|
|
|
section</A> for an overview.
|
2007-02-10 05:40:32 +08:00
|
|
|
</P>
|
2007-12-01 07:16:45 +08:00
|
|
|
<P>The stress tensor for each atom is given by the following formula.
|
|
|
|
where the ab component of stress on atom <I>I</I> is as shown where <I>a</I> and
|
|
|
|
<I>b</I> take on values x,y,z to generate the 6 components of the symmetric
|
|
|
|
tensor:
|
2007-02-10 05:40:32 +08:00
|
|
|
</P>
|
|
|
|
<CENTER><IMG SRC = "Eqs/stress_tensor.jpg">
|
|
|
|
</CENTER>
|
2007-07-03 03:59:42 +08:00
|
|
|
<P>The first term is a kinetic energy contribution for atom <I>I</I>. The
|
2007-12-01 07:16:45 +08:00
|
|
|
second term is a pairwise energy contribution where <I>N</I> loops over the
|
|
|
|
<I>Np</I> neighbors of atom <I>I</I>, <I>r1</I> and <I>r2</I> are the positions of the 2
|
|
|
|
atoms, and <I>F1</I> and <I>F2</I> are the forces on the 2 atoms. The third
|
|
|
|
term is a bond contribution for the <I>Nb</I> bonds whihc atom <I>I</I> is part
|
|
|
|
of. And similarly for the <I>Na</I> angle, <I>Nd</I> dihedral, and <I>Ni</I>
|
|
|
|
improper interactions atom <I>I</I> is part of.
|
|
|
|
</P>
|
|
|
|
<P>As the formula implies, 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 the 4 atoms.
|
|
|
|
</P>
|
|
|
|
<P>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
|
|
|
|
listed, only those terms are summed to compute the tensor.
|
|
|
|
</P>
|
|
|
|
<P>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.
|
|
|
|
</P>
|
|
|
|
<P>The <A HREF = "dihedral_charmm.html">dihedral_style charmm</A> style calculates
|
|
|
|
pairwise interactions between 1-4 atoms. The virial contribution of
|
|
|
|
these terms is included in the pair virial, not the dihedral virial.
|
|
|
|
</P>
|
|
|
|
<P>Note that as defined in the formula, per-atom stress is the negative
|
|
|
|
of the per-atom pressure tensor. It is also really a stress-volume
|
2007-02-10 05:40:32 +08:00
|
|
|
formulation. It would need to be divided by a per-atom volume to have
|
|
|
|
units of stress, but an individual atom's volume is not easy to
|
2007-12-01 07:16:45 +08:00
|
|
|
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 3V, where V is the volume of the
|
|
|
|
system, the result should be -P, where P is the total pressure of the
|
|
|
|
system.
|
|
|
|
</P>
|
|
|
|
<P>These lines in an input script should yield that result (assuming
|
|
|
|
there is no fix or long-range contribution to the stress):
|
|
|
|
</P>
|
|
|
|
<PRE>compute global all pressure thermo_temp
|
|
|
|
compute peratom all stress/atom
|
|
|
|
compute p all sum peratom
|
|
|
|
variable p equal div(add(add(c_p<B>1</B>,c_p<B>2</B>),c_p<B>3</B>),mult(3.0,vol))
|
|
|
|
thermo_style custom step temp etotal c_global v_p
|
|
|
|
</PRE>
|
|
|
|
<P>IMPORTANT NOTE: The per-atom stress does NOT include contributions due
|
|
|
|
to fixes (e.g. <A HREF = "fix_shake.html">SHAKE</A>) or long-range Coulombic
|
|
|
|
interactions (via the <A HREF = "kspace_style.html">kspace_style</A> command). The
|
|
|
|
former needs to be added to LAMMPS. We're not sure if the latter is
|
|
|
|
possible to compute. There are also a few pair styles for manybody
|
|
|
|
potentials that are not yet instrumented to yield per-atom stress.
|
|
|
|
See the Restrictions below.
|
2007-07-03 03:59:42 +08:00
|
|
|
</P>
|
|
|
|
<P><B>Restrictions:</B>
|
2007-02-10 05:40:32 +08:00
|
|
|
</P>
|
2007-12-01 07:16:45 +08:00
|
|
|
<P>These pair styles do not yet work with this compute: "airebo", "meam",
|
|
|
|
and "TIP4P".
|
2007-02-10 05:40:32 +08:00
|
|
|
</P>
|
2007-12-01 07:16:45 +08:00
|
|
|
<P><B>Related commands:</B>
|
2007-02-10 05:40:32 +08:00
|
|
|
</P>
|
2007-12-01 07:16:45 +08:00
|
|
|
<P><A HREF = "compute_pe.html">compute pe</A>, <A HREF = "compute_stress_atom.html">compute
|
|
|
|
stress/atom</A>
|
2007-07-03 03:59:42 +08:00
|
|
|
</P>
|
2007-12-01 07:16:45 +08:00
|
|
|
<P><B>Default:</B> none
|
2007-02-10 05:40:32 +08:00
|
|
|
</P>
|
|
|
|
</HTML>
|