detect_surface command

Warning

GPU support for this command has not been tested and may not work as expected.

Syntax

detect_surface id command-ID keywords values ...
  • id = obligatory keyword

  • command-ID = user-assigned name for the command call (used for referencing this command in the variable command)

  • exactly one of the following keywords must be appended: normal_vector or end_point

normal_vector values = (nx, ny, nz)
  nx, ny, nz = components of the normal upward vector (length units)
end_point values = (px, py, pz)
  px, py, pz = coordinates of end point of the normal upward vector (length units)
  • obligatory keywords = angle and max_distance

angle values = ang
  ang = maximum contact angle of particle (degrees)
max_distance values = dist
  dist = search distance for neighboring particles (length units)
  • zero or more optional keyword/value pairs can be appended

  • command specific optional keywords = particle_group or region

particle_group value = group-ID
  group-ID = ID of the group of particles to apply this command to (default: all)
region value = region-ID
  region-ID = ID of region atoms must be in to have their
  (angular) velocity set (default: whole domain)
  • general optional keywords are the keyword/value pairs documented in compute

Examples

detect_surface id mySurface normal_vector (1.0, 1.0, 0.0) angle 30 max_distance 0.002
detect_surface id mySurface end_point (0.05, 0.05, 0.05) angle 30 max_distance 0.002

Description

Define a calculation that computes if a particle is on the surface of a particle packing, based on two very simple geometric criteria, which are based on a normal upward pointing (NUP) vector, and the center of mass (COM) of the chosen particle group.

The detection is based on the following criterion:

The particle must not have any neighboring particle, where the angle of the neighboring particle to NUP is smaller than angle. Neighboring particles are particles that can be found within the maximal distance defined by the max_distance value. Please note that this value is crucial for the correct detection of the surface - too small values can lead to the mis-identification of particles as surface particles.

The NUP vector can be defined in 2 ways: (a) directly via the normal_vector keyword, or (b) as the vector between the center of mass (COM) of the fix group to an end_point.

A note on keywords: angle and max_distance must always be defined, combined with either - for case (a) - normal_vector, or - for case (b) - end_point.

If the keyword region is used a region ID must be provided as argument to this keyword. In this case the particles considered in the algorithm described above must be contained in the specified region in order to be considered.

Please note that the list of neighbors is looped to calculate the max_distance criterion, which will depend on your neighbor and neigh_modify settings.

Warning

Please take into account that this is a very coarse approach, and also “inner surfaces” within the particle packing may be detected.

Output info:

This compute calculates a compute calculates a global scalar and a per-atom vector. The former is the number of all atoms on the surface, the latter equals 1 if the particle is on the surface, and 0 if the particle is not on the surface. These values can be used by any command that uses per-atom vector values from a compute as input. See Section_howto 15 for an overview of Aspherix® output options. To use these variables it is advisable to use the .global and .atom identifiers to avoid any disambiguity (see the variable command for details).

Restrictions

none

Related commands: none

Default: none