:orphan: .. index:: compute_gas_reaction_grid .. _compute-gas-reaction-grid: .. _compute-gas-reaction-grid-command: ################################# compute gas/reaction/grid command ################################# .. _compute-gas-reaction-grid-syntax: ******* Syntax: ******* :: compute ID gas/reaction/grid group-ID mix-ID mode value1 value2 ... - ID is documented in :ref:`compute` command - gas/collision/grid = style name of this compute command - group-ID = group ID for which grid cells to perform calculation on - mix-ID = mixture ID to perform calculation on - mode = *all* or *every* or *select* :: *all* = single count of all reactions in each grid cell *values* = none *every* = count of each defined reaction in each grid cell *values* = none *select* = count of selected reactions in each grid cell *values* = one or more numeric indices from 1 to M where M = # of defined reactions .. _compute-gas-reaction-grid-examples: ********* Examples: ********* :: compute 1 gas/reaction/grid all all all compute 2 gas/reaction/grid subset mymixture all compute 4 gas/reaction/grid all all every compute 4 gas/reaction/grid all all select 5 7 14 .. _compute-gas-reaction-grid-descriptio: ************ Description: ************ Count the number of gas-phase reactions bewteen pairs of particles which occur in each grid cell during the current timestep. Only gas collisions which result in chemical reactions are counted by this command, as defined by the :ref:`react` command and the list of reactions it reads from a file. See the related :ref:`compute gas/collision/grid` command to count collisions which do not induce reactions. Only reactions within grid cells in the grid group specified by *group-ID* and pairs of reactant particles with both species in the mixture specified by *mix-ID* are included. See the :ref:`group grid` command for info on how grid cells can be assigned to grid groups. The results of this compute can be used by different commands in different ways. The values for a single timestep can be output by the :ref:`dump grid` command or used as inputs to the :ref:`compute reduce` command. The values can also be time averaged by the :ref:`fix ave/grid` command. The *mode* argument determines how the reactions in each grid cell are counted. If *mode* is specified as *all* then a single count of all reactions is produced for each grid cell. The compute calculates this count as a per-grid vector. If *mode* is specified as *every* then an individual count for each reaction is produced for each grid cell. The number of possible reactions M are those listed in the file read by the :ref:`react` commmand. The compute calculates these counts as a per-grid array, even if M = 1. If *mode* is specified as *select* then a count for each reaction in the specified list of numeric indices is produced for each grid cell. Each index must be a number from 1 to M, where M is the number of reactions listed in the file read by the :ref:`react` commmand. The compute calculates these counts as a per-grid array, even if only a single index is specified. .. _compute-gas-reaction-grid-output: ************ Output info: ************ If no numeric keywords are used, then this compute calculates a per-grid vector with the count of all reactions for each grid cell. If one or more numeric keywords are used, then this compute calculates a per-grid array. The first column wlll be the count of all reactions. The remaining columns (one per numeric keyword) will be the counts of only the specific reactions listed. The vector or array can be accessed by any command that uses per-grid values from a compute as input. See :ref:`Section 6.4` for an overview of SPARTA output options. .. _compute-gas-reaction-grid-restrictio: ************* Restrictions: ************* none .. _compute-gas-reaction-grid-related: ***************** Related commands: ***************** :ref:`compute gas/collision/grid`, :ref:`compute gas/reaction/tally`, :ref:`dump grid` .. _compute-gas-reaction-grid-default: ******** Default: ******** none