fix contact/atom/counter command

Warning

This command is deprecated, please use calculate collision_statistics instead.

Syntax

fix ID group-ID contact/atom/counter keyword value ...
  • ID, group-ID are documented in fix command

  • contact/atom/counter = style name of this fix command

  • zero or more keyword/value pairs may be appended to args

keyword = region or output_type or histogram_vel or output_contact_details:l
  region value = region-ID
    region-ID = ID of region atoms must be in to be counted
  output_type value = yes or no
    yes = do output global statistics for per-type collisions
    no = do not output global statistics for per-type collisions
  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 positions when collision takes place (6 values)
    v = output velocities when collision takes place (6 values)
    vn = output relative normal velocity when collision takes place (3 values)
    ids = output IDs 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
fix stats all contact/atom/counter region bc output_type no 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 atom-atom contacts since simulation start, (b) the total number of atom-atom contacts for each pair of atom types since the simulation start (c) the total number of contacts since simulation start for each atom, (d) the total number of contacts with each atom type since simulation start for each atom, and (e) one or more histograms of particle-particle collision statistics.

One or more histograms of particle-particle 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 velocity upon collision is recorded. In the second case, the relative tangential particle velocity upon collision is recorded. In the last case, the relative particle velocity magnitude upon collision is recorded.

Warning

In case keyword histogram_vel is used, output of per-type global statistics has to be turned off by using output_type = no.

A contact is defined for finite-size spherical particles as a neighbor atoms which overlaps the central particle, meaning that their distance of separation is less than or equal to the sum of the radii of the two particles.

The value of 0.0 will be assigned for atoms not in the specified fix group.

Note that the total number of atom-atom contacts for each pair of atom type since the simulation start is symmetric, i.e. the number of i-j collisions is equal to the number of j-i collisions.

The region keyword can be used to only count contacts that happen in the specified region.

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-atom contacts since simulation start. In case of output_type = yes, it also computes a global array, where the value for indices i-j corresponds to total number of atom-atom contacts between atoms of type i and j since simulation start. In case of output_type = no and keyword histogram_vel is used once or multiple times, a global array is computed, where the i-j value corresponds to the total number of collisions for histogram i and bin index j. The histogram index i starts from 1 and is ordered in the same order than the histograms in the command.

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 is the id of the fix contact/atom/counter whose data you wish to access.

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 of output_type = no and 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, 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.

As a fix can have only one global array output, either the histogram or per-type global statistics can be output at a time.

Default

output_type = yes