SPARTA WWW Site - SPARTA Documentation - SPARTA Commands

compute react/surf command

Syntax:

compute ID react/surf group-ID reaction-ID value1 value2 ... 

Examples:

surf_react air prob air.surf
compute 1 react/surf all air
compute 2 react/surf all air r:N/O/N2/O2 p:N/O/NO 

These commands will dump time averages for each surface element to a dump file every 1000 steps:

compute 2 react/surf all air r:N/O/N2/O2 p:N/O/NO
fix 1 ave/surf all 10 100 1000 c_2[*]
dump 1 surf all 1000 tmp.surf id f_1[*] 

Description:

Define a computation that tallies counts of reactions for each explicit surface element in a surface element group, based on the particles that collide with that element. Only surface elements in the surface group specified by group-ID are included in the tallying. See the group surf command for info on how surface elements can be assigned to surface groups. Likewise only surface elements assigned to the surface reaction model specified by reaction-ID are included in the tallying.

Explicit surface elements are triangles for 3d simulations and line segments for 2d simulations. Unlike implicit surface elements, each explicit triangle or line segment may span multiple grid cells. See the read_surf command for details.

This command can only be used for simulations with explicit surface elements. See the similar compute react/isurf/grid command for use with simulations with implicit surface elements.

Note that when a particle collides with a surface element, it can bounce off (possibly as a different species), be captured by the surface (vanish), or a 2nd particle can also be emitted.

The doc page for the surf_react command explains the different reactions that can occur for each specified style.

If no values are specified each reaction specified by the surf_react style is tallied individually for each surface element.

If M values are specified, then M tallies are made for each surface element, one per value. If the value starts with "r:" then any reaction which occurs with one (or more) of the listed species as a reactant is counted as part of that tally. If the value starts with "p:" then any reaction which occurs with one (or more) of the listed species as a product is counted as part of that tally. Note that these rules mean that a single reaction may be tallied multiple times depending on which values it matches.

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 dump surf command.

The values over many sampling timesteps can be averaged by the fix ave/surf command.


Output info:

This compute calculates a per-surf array, with the number of columns either equal to the number of reactions defined by the surf_react style (if no values are specified) or equal to M = the # of values specified.

Surface elements not in the specified group-ID or not assigned to the specified reaction-ID will output zeroes for all their values.

The array can be accessed by any command that uses per-surf values from a compute as input. See Section 6.4 for an overview of SPARTA output options.

The per-surf array values are counts of the number of reactions that occurred.


Restrictions: none

Related commands:

fix ave/surf, dump surf, compute react/isurf/grid

Default: none