fix contact/atom/counter/wall command
Warning
This command is deprecated, please use calculate collision_statistics instead.
Syntax
fix ID group-ID contact/atom/counter/wall keyword value ...
ID, group-ID are documented in fix command
contact/atom/counter/wall = style name of this fix command
zero or more keyword/value pairs may be appended to args
keyword = region or primitive or mesh or histogram_vel
region value = region-ID region-ID = ID of region atoms must be in to be counted primitive value = wall-ID wall-ID = ID of a fix wall/gran of primitive type mesh value = mesh-ID mesh-ID = ID of a fix mesh/surface that is used in a fix wall/gran histogram_vel value = histogramtype min min-value max max-value nbin nbin-value histogramtype = vn or vt or vmag min = obligatory word min-value = minimum velocity for histogram binning (velocity units) max = obligatory word max-value = maximum velocity for histogram binning (velocity units) nbin = obligatory word nbin-value = number of histogram bins (dimensionless integer) output_collision_details values = one or more out of: step pos v vn id angle every ev step = output time-step when collision takes place (1 value) pos = output particle position when collision takes place (3 values) v = output velocities of particle and wall when collision takes place (6 values) vn = output relative normal velocity when collision takes place (3 values) ids = output IDs of particle and mesh element if applicable, -1 for primitive wall when collision takes place (2 values) angle = output collision angle in rad when collision takes place (1 value) every ev = provide the data every ev time-steps for local output
Examples
fix 1 all contact/atom/counter/wall primitive zwalls
fix 2 all contact/atom/counter/wall mesh cad histogram_vel vn min 0. max 5. nbin 5 histogram_vel vt min 0. max 10. nbin 5
Description
Define a fix that calculates (a) the total number of particle-wall contacts since simulation start, (b) the total number of particle-wall contacts since simulation start for each atom and (c) one or more histograms of particle-wall collision statistics.
In this context, “wall” can either mean a fix wall/gran of primitive type or a fix mesh/surface that is used in a fix wall/gran. Either the primitive or the mesh keyword has to be used to specify this.
One or more histograms of particle-wall collision statistics can be generated by using keyword histogram_vel. histogramtype can be ‘vn’, ‘vt’, or ‘vmag’. In the first case, the relative normal particle-wall velocity upon collision is recorded. In the second case, the relative tangential particle-wall velocity upon collision is recorded. In the last case, the relative particle-wall velocity magnitude upon collision is recorded.
A contact is defined as an overlap between a particle and a wall (or wall element in case of mesh walls).
The value of 0.0 will be assigned for atoms not in the specified fix group.
The region keyword can be used to only count contacts that happen in the specified region.
Warning
This fix will work as intended for all particle shapes, but will significantly overestimate the number of contacts for compound particles (multispheres, multiplespheres and concave) since the contacts themselves are counted per primary particle and not per compound.
Keyword output_collision_details can be used to buffer collision data for local output. The time-step, the particle positions, the particle velocities, the relative normal velocity, the particle IDs, the collision angle and the frequency of output can be set. Please note that setting the output frequency via every will cause the buffer to be flushed every ev time-steps. So local output should be performed with the same frequency as specified in this command by keyword every.
Output info:
This fix computes a global scalar, which corresponds to the total number of atom-wall contacts since simulation start. It also computes a global array, where the value for indices i-j corresponds to total number of atom-wall contacts between atoms of type i and j since simulation start. These values can be accessed by any command that uses global scalars and array values from a fix as input. See Section_howto 15 for an overview of Aspherix® output options.
The total number of contacts since simulation start for each atom is stored in a separate fix as a part of a per-atom array, and can be accessed via f_collision_counter_FIXID[1] in several by output commands which take per-atom arrays as input, see Section_howto 8. FIXID here is the id of the fix whose data should be accessed.
The total number of contacts since simulation start with each atom type for each atom is stored in a separate fix as part of a per-atom array, and can be accessed via f_collision_counter_FIXID[1+itype] in several by output commands which take per-atom arrays as input, see Section_howto 8.
In case keyword histogram_vel is used once or multiple times, the total number of contacts for each bin since simulation start is stored in a separate fix as part of a per-atom array, and can be accessed via f_collision_counter_histogram_FIXID_histogramtype[ibin]. Here, FIXID is the ID of this fix and histogramtype can be either vn, vt, or vmag and ibin is the bin index. Access is possible by several output commands which take per-atom arrays as input, see Section_howto 15.
If keyword output_collision_details is used, this fix stores values for local output. The order of the values is defined by the order of specification in the input script.
Restrictions
This fix requires that atoms store a radius as defined by the atom_style sphere command, and use a granular pair style with history, see pair gran Only one fix of this style may be used at a time.