fix voronoi/atom command

Syntax

fix ID group-ID voronoi/atom keyword arg ...
  • ID, group-ID are documented in fix command

  • voronoi/atom = style name of this fix command

  • zero or more keyword/value pairs may be appended

  • keyword = only_group or surface or radius or edge_histo or edge_threshold or face_threshold or neighbors or peratom

only_group = no arg
face_threshold arg = minarea
  minarea = minimum area for a face to be counted
area_cap_factor arg = area_cap_factor
  area_cap_factor = factor to cap face areas
volume_cap_factor arg = volume_cap_factor
  volume_cap_factor = factor to cap cell volumes
use_meshes arg = yes or no
nevery arg = nevery
  nevery = compute Voronoi cells this every timesteps
write_every arg = write_every
  write_every = write Voronoi cells to pvtm file this every timesteps
outfile_base arg = outfile_base
  outfile_base = filename base for the pvtm file

Examples

fix voro all voronoi/atom
fix voro vorogroup voronoi/atom only_group
fix voro_with_output all voronoi/atom nevery 10 write_every 100 outfile_base post/voro
fix clipped_voro all voronoi/atom area_cap_factor 1.3
fix voro_mesh all voronoi/atom use_meshes yes

Description

Define a computation that calculates the radius weighted Voronoi tessellation of the particles in the simulation box. The tessellation is calculated using all atoms in the simulation, but non-zero values are only stored for atoms in the group.


If the only_group keyword is specified the tessellation is performed only with respect to the atoms contained in the fix group. This is equivalent to deleting all atoms not contained in the group prior to evaluating the tessellation.

The face_threshold keyword allow the suppression of faces below a given minimum area. Ultra small faces can occur as artifacts of the Voronoi tessellation.

The volume_cap_factor keyword allows to set a maximum volume for a Voronoi cell. Each Voronoi cell is initialized to a cube with edge length 2*maxrad*volume_cap_factor, where maxrad is the maximum particle radius in the simulation. The default value for volume_cap_factor is 3.

The maximum values are computed relative to the particle crosssection and volume, respectively. Larger cells/faces will be stored with the maximum values obtained by volume_cap_factor*v_part and area_cap_factor*r_part^2*pi.

The use_meshes keyword enables cutting of Voronoi cells by mesh elements. If set to yes, the Voronoi cells of particles close to mesh elements are cut off by a plane defined by the closest point on the mesh element and the contact normal. This ensures that no Voronoi cell extends over a mesh element, but might reduce in too small cells around nonconvex edges in the mesh. A fix wall/gran needs to be defined for this feature to work, and all meshes defined in this fix are used to cut the Voronoi cells.

The Voronoi cells computed by this fix can be written to .pvtm files. This can be achieved using the write_every and outfile_base keywords. The former sets the output interval, and the latter the base of the output file(s). Both keywords need to be set to write data; if one is omitted, fix voronoi/atom will exit with an error message. A setting ‘outfile_base foo/bar’ will result in several files being written per timestep: one controller file foo/bar_%timestep.pvtm and one actual data file foo/bar_%timestep_%proc.vtm per processor. To visualize the data, load the .pvtm files in ParaView. The data file contains the cell id (identical to the corresponding particle id), cell volume, cell surface, number of faces and number of neighbors. The latter two are not necessarily equal: if a cell is cut off by either the domain boundary or a mesh element, a face is created, but no neighbor cell exists. Thus, if number of faces < number of neighbors, the cell might be a surface cell.

Note

Note that you have to link against VTK libraries to use the output feature.


The Voronoi calculation is performed by the freely available Voro++ package, written by Chris Rycroft at UC Berkeley and LBL. Set USE_VORO=”ON” in your Makefile.user to enable this fix.

Note

The calculation of Voronoi volumes is performed by each processor for the atoms it owns, and includes the effect of ghost atoms stored by the processor. This assumes that the Voronoi cells of owned atoms are not affected by atoms beyond the ghost atom cut-off distance. This is usually a good assumption for dense systems, but may lead to underestimation of Voronoi volumes in low density systems. By default, the set of ghost atoms stored by each processor is determined by the cutoff used for pair_style interactions. For more details on the cutoff distance see the communicate command. The Voronoi cells for atoms adjacent to empty regions will extend into those regions up to the communication cutoff in x, y, or z. In that situation, an exterior face is created at the cutoff distance normal to the x, y, or z direction. For triclinic systems, the exterior face is parallel to the corresponding reciprocal lattice vector.

Output info:

The results of this computation are available in multiple fix property/atom. These can be accessed using f_fixid for output and further processing. Fixes named voronoi_volume_, voronoi_totalarea_ store the volume and total surface area of each cell. voronoi_numfaces_ and voronoi_num_neigh_ store the number of faces per cell and the number of neighbors. The difference between both is that the latter is the number of faces a cell has with another particle. so, the difference between the two can be used eg. to detect surfaces. All these fixes contain a per-atom scalar. A per-atom vector of all face areas is stored in a fix with id voronoi_area_.

Restrictions

It also requires you have a copy of the Voro++ library built and installed on your system. See instructions on obtaining and installing the Voro++ software in the src/VORONOI/README file.