cell computation

cell computation

The cell computation module is used to perform mathematical operations on cell data in fields. Unlike node computation, it cannot affect coordinates.

Though data values cannot be used to affect coordinates (x, y, or z), the cell center (average of nodes) coordinates can be used to affect data values.

Up to two fields can be input to cell computation. Mathematical expressions can involve one or both of the input fields. Cell data input to each of the ports is scalar. If a data field contains more than one data component, you may select from any of them.

The equation(s) used to modify data must be input as part of a Python script. Each cell data component from Input Field 1 is assigned as a variable (Ac0, Ac1, Ac2, etc.), and from Input Field 2 as Bc0, Bc1, Bc2, etc. Cell center coordinate variables (Ax, Ay, Az for Field 1 and Bx, By, Bz for Field 2) and min/max range variables are also available.

Ports

DirectionNameTypeDescription
InputInput Field 1FieldA field.
InputInput Field 2FieldA field.
InputInput Value N1NumberA value to use as a variable.
InputInput Value N2NumberA value to use as a variable.
InputInput Value N3NumberA value to use as a variable.
InputInput Value N4NumberA value to use as a variable.
OutputOutput Value N1NumberA value to use as a variable.
OutputOutput Value N2NumberA value to use as a variable.
OutputOutput Value N3NumberA value to use as a variable.
OutputOutput Value N4NumberA value to use as a variable.
OutputOutput FieldFieldThe Output Field with solved expression data.
OutputOutput ObjectRenderableA renderable object displaying the solved expression data.

Properties

PropertyTypeDescription
Allow RunBooleanDetermines whether the module is allowed to execute. Set to True to allow this module to run.
FilenameStringThe script which is run once per cell, and the values set within the script are assigned to the cell data of the resulting field.
ExecuteButtonAccept all values and perform computation. If this button is clicked and the application saved, the module will run when the application is loaded.

Output

PropertyTypeDescription
ModeChoice: Expression, ScriptExpression mode allows inline expressions per data component. Script mode uses a Python script file.
Data DefinitionsData DefinitionsThe data you wish to generate in addition to coordinates.

Variables

PropertyTypeDescription
N1DoubleNumber passed into script.
N2DoubleNumber passed into script.
N3DoubleNumber passed into script.
N4DoubleNumber passed into script.
Cell Computation Variables 1DisplayThe variables available for computation from Input Field 1. Shows cell center coordinate variables, cell number, min/max range variables, and all cell data components.
Cell Computation Variables 2DisplayThe variables available for computation from Input Field 2. Shows cell center coordinate variables, cell number, min/max range variables, and all cell data components.