SPARTA WWW Site - SPARTA Documentation - SPARTA Commands

compute property/surf command

Syntax:

compute ID property/surf group-ID input1 input2 ... 

Examples:

compute 1 property/surf all id xc yc zc 

Description:

Define a computation that simply stores surface element attributes for each explicit surface element in a surface group. This is useful for values which can be used by other output commands that take computes as inputs. See for example, the compute reduce, fix ave/surf, dump surf, and surf-style variable commands.

Only surface elements in the surface group specified by group-ID are included in the calculation. See the group surf command for info on how surface elements can be assigned to surface groups.

This command can only be used for simulations with explicit surface elements. 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 Section 4.9 of the manual for details.


Id is the surface element ID, as defined in the surface data file read by the read_surf comand.

The v1x, v1y, v1z attributes are the coordinates of the first end point of a line segment (2d) or first corner point of a triangle (3d). Likewise, the v2x, v2y, v2z attributes are the coordinates of the second end point of a line segment (2d) or second corner point of a triangle (3d). The v3x, v3y, v23z attributes are the coordinates of the third corner point of a triangle (3d).

The xc, yc, zc attributes are the coordinates of the center point of a line segment or tringle.

The area attribute is the length of a line segment (distance units in 2d), or area of a triangle (area units in 3d).

The normx, normy, normz attributes are components of a unit normal perpendicular to the line segment or face of the trangle. It points into the flow volume of the simulation.


Output info:

This compute calculates a per-surf vector or per-surf array depending on the number of input values. If a single input is specified, a per-surf vector is produced. If two or more inputs are specified, a per-surf array is produced where the number of columns = the number of inputs.

This compute performs calculations for each explicit surface element in the simulation.

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

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

The vector or array values will be in whatever units the corresponding attribute is in, e.g. distance units for v1x or xc, length units for area in 2d, area units for area in 3d.


Restrictions:

For 2d simulations, none of the attributes which refer to the 3rd dimension may be used. Likewise v3x, v3y, v3z may not be used since they refer to triangles.

Related commands:

dump surf, fix ave/surf

Default: none