"LIGGGHTS WWW Site"_lws - "LIGGGHTS Documentation"_ld - "LIGGGHTS Commands"_lc :c

:link(lws,http://www.cfdem.com)
:link(ld,Manual.html)
:link(lc,Section_commands.html#comm)

:line

compute pair/gran/local command :h3
compute wall/gran/local command :h3

[Syntax:]

compute ID group-ID pair/gran/local keywords ... 
compute ID group-ID wall/gran/local keywords ... :pre

ID, group-ID are documented in "compute"_compute.html command :ulb,l
pair/gran/local or wall/gran/local = style name of this compute command :l
zero or more keywords may be appended :l
keyword = {pos} or {id} or {force} or {torque} or {history} or {contactArea} :l
  {pos} = positions of particles in contact (6 values)
  {id} = IDs of particles in contact and a periodicity flag (3 values) or IDs of the mesh, the triangle and the particle (3 values)
  {force} = contact force (3 values)
  {torque} = torque divided by particle diameter (3 values)
  {history} = contact history (# depends on pair style, e.g. 3 shear history values)
  {contactArea} = area of the contact (1 value)
  {heatFlux} = conductive heat flux of the contact (1 value) :pre
:ule

[Examples:]

compute 1 all pair/gran/local
compute 1 all pair/gran/local pos force
compute 1 all wall/gran/local :pre

[Description:]

Define a computation that calculates properties of individual pairwise or 
particle-wall interactions of a granular pair style. The number of datums 
generated, aggregated across all processors, equals the number of pairwise 
interactions or particle-wall interactions in the system.

The local data stored by this command is generated by looping over the
pairwise neighbor list.  Info about an individual pairwise interaction
will only be included if both atoms in the pair are in the specified
compute group, and if the current pairwise distance is less than the
force cutoff distance for that interaction, as defined by the
"pair_style"_pair_style.html and "pair_coeff"_pair_coeff.html
commands.

IMPORTANT NOTE: For accessing particle-wall contact data, only mesh 
walls (see "fix mesh/gran"_fix_mesh_gran.html) can be used. 
For computing particle-wall (compute wall/gran/local), the code will 
automatically look for a "fix wall/gran"_fix_wall_gran.html command 
that uses mesh walls. The order of the meshes in the fix wall/gran 
command is called the mesh id (starting with 0), and the triangle id 
reflects the order of the triangles in the STL/VTK file read via the 
dedicated fix mesh/gran command. For how to output the trangle id, 
see "dump mesh/gran/VTK command"dump.html.

The output {pos} is the particle positions (6 values) in distance 
"units"_units.html. For computing pairwise data, the output {id} will 
be the two particle IDs (using this option requires to use an atom 
map) and a flag that is 1 for interaction over a periodic boundary 
and 0 otherwise. For computing particle-wall data, the output {id} 
will be the mesh id, the triangle id and the particle id. The output 
{force} and {torque} are the contact force and the torque divided by the 
particle diameter, both in force "units"_units.html. The output {history} 
will depend on what this history represents, according to the granular 
pair style used. The output {contactArea} will output the contact area, 
in distance^2 "units"_units.html. The output {heatFlux} (available only 
if a "fix heat/gran"_fix_heat_gran.html is used to compute  heat 
fluxes) will output the per-contact conductive heat flux area, in 
energy/time "units"_units.html.

Note that as atoms migrate from processor to processor, there will be
no consistent ordering of the entries within the local vector or array
from one timestep to the next.  The only consistency that is
guaranteed is that the ordering on a particular timestep will be the
same for local vectors or arrays generated by other compute commands.
For example, pair output from the "compute
property/local"_compute_property_local.html command can be combined
with data from this command and output by the "dump local"_dump.html
command in a consistent way.

[Output info:]

This compute calculates a local vector or local array depending on the
number of keywords.  The length of the vector or number of rows in the
array is the number of pairs.  If a single keyword is specified, a
local vector is produced.  If two or more keywords are specified, a
local array is produced where the number of columns = the number of
keywords.  The vector or array can be accessed by any command that
uses local values from a compute as input.  See "this
section"_Section_howto.html#4_15 for an overview of LAMMPS output
options.

For information on the "units"_units.html of the output, see above.

[Restrictions:] 

Can only be used together with a granular pair style.
For accessing particle-wall contact data, only mesh walls can be used.

[Related commands:]

"dump local"_dump.html, "compute property/local"_compute_property_local.html, 
"compute pair/local"_compute/pair/local.html

[Default:] 

By default, all of the outputs keywords (except the heat flux) are activated, 
i.e. when no keyword is used, positions, ids, forces, torques, history 
and contact area are output.
