compute reduce/mesh command
Syntax
compute ID group-ID reduce/mesh keyword args ...
ID, group-ID are documented in compute command
one or more keyword/value pairs must be appended
keyword = mode or meshes or mesh_properties or property_weights (optional) or final_update (optional)
mode value = reduce_mode
reduce_mode = on of the following: sum or minimum or maximum or average
meshes value = mesh_list
mesh_list = the string all to include all meshes, or a brace enclosed list with mesh ids: {mesh1,mesh2,...}
mesh_properties value = property_list
property_list = brace enclosed list of mesh properties: {mesh_property1,mesh_property2,...}
property_weights value = property_weight_list
property_weight_list = brace enclosed list of weights for each mesh property: {weight1,weight2,...} which can
be set to none (default), area or volume
final_update yes/no
yes = value is recomputed at the last step of a simulate command (default)
no = value is only recomputed when needed during the simulation
Examples
compute mesh_avg all reduce/mesh mode average meshes {plate,cad} mesh_properties {Temp,liquidContent} property_weights {area,volume}
compute mesh_sum all reduce/mesh mode sum meshes {plate,cad} mesh_properties {liquidContent} property_weights {volume}
compute mesh_sum all reduce/mesh mode sum meshes {plate,cad} mesh_properties {Temp,impactCount.total} property_weights {area,none}
compute mesh_sum all reduce/mesh mode sum meshes {plate,cad} mesh_properties {impactCount.total}
Description
This compute defines a calculation that “reduces” one or more mesh properties for all meshes defined by meshes. The reduction operation is specified by the mode setting. The sum option adds for each mesh property its values of all mesh elements into a global total. The minimum or maximum options find the minimum or maximum mesh property value across all mesh elements. The average setting computes the global total for each mesh property, which is then divided by the a property weight dependent divisor (see below).
The optional property_weights defines for each mesh property in mesh_properties how the values are weighted. Valid property weights are none, area and volume. With none the mesh property values are used as they are stored (a weight of 1 is used), and for mode average the total number of mesh elements is used as a divisor. The area (volume) property weights will for each mesh element multiply the mesh property value with the mesh element area (volume). For mode average the the total area (volume) of all meshes will be used as a divisor. As shown in the examples above, one would use volume weighing for mesh properties like liquidContent (because the liquid volume is stored as a fraction of the mesh element volume: mesh element area times the wall thickness). If the wall thickness is not defined explicitly, an unity wall thickness is used. For other properties like Temp (temperature) and impactCount.total one would usually apply area and none property scaling, respectively.
Output information
This compute calculates a global vector of length N where N is the number of mesh_properties, which can be accessed by the indices 1 to N. The calculated reduced mesh property values can be accessed via the command ID: id_CMDID[N] or id_CMDID.property_name. Here CMDID is the id given by the user, N is the numeric position of the mesh property in the mesh_properties list and property_name the (string) mesh property name in the mesh_properties list.
The calculated values can be used by any command that uses global scalar or vector values from a compute as input. See Section_howto 15 for an overview of Aspherix® output options. The scalar or vector values will be in whatever units the quantities being reduced are in.
Restrictions
none
Defaults
final_update yes, property_weight none (for all mesh_properties)