compute stress/atom command

Syntax

compute ID group-ID stress/atom general_keyword general_values keyword ...
  • ID, group-ID are documented in compute command

  • stress/atom = style name of this compute command

  • general_keywords general_values are documented in compute

  • zero or more keywords may be appended

  • keyword = ke or pair or virial

Examples

compute 1 mobile stress/atom
compute 1 all stress/atom pair bond

Description

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 and is stored as a 6-element vector in the following order: xx, yy, zz, xy, xz, yz.

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:

S_{ab} = -m v_a v_b + \frac{1}{2} \sum_{n=1}^{N_p} \left( r_{1_a} F_{1_b} +
r_{2_a} F_{2_b} \right)

The first term is a kinetic energy contribution for atom I. The second term is a pairwise energy contribution where n loops over the Np neighbors of atom I, r1 and r2 are the positions of the 2 atoms in the pairwise interaction, and F1 and F2 are the forces on the 2 atoms resulting from the pairwise interaction.

Note

Forces coming from a cohesion model bond are included in the pairwise contribution.

Warning

For granular systems, this formula neglects the contribution of average velocity in the kinetic energy contribution. This is corrected in the compute ave/euler command (currently no doc available).

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. The virial keyword means include all terms except the kinetic energy ke.

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.

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 formulation, meaning the computed quantity is in units of pressure*volume. It would need to be divided by a per-atom volume to have units of stress (pressure), but an individual atom’s volume is 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.

These lines in an input script for a 3d system should yield that result. I.e. the last 2 columns of status output will be the same:

compute              peratom all stress/atom
compute              p all reduce sum c_peratom[1] c_peratom[2] c_peratom[3]
variable     press equal -(c_p[1]+c_p[2]+c_p[3])/(3*vol)
status_style custom step temp etotal press v_press

Output info:

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 a compute as input. See the HowTo document on output for an overview of Aspherix® output options.

The per-atom array values will be in pressure*volume units as discussed above.

Restrictions

none

Default: none


(Heyes) Heyes, Phys Rev B 49, 755 (1994),

(Sirk) Sirk, Moore, Brown, J Chem Phys, 138, 064505 (2013).