node computation
The node computation module is used to perform mathematical operations on nodal data fields and coordinates. Data values can be used to affect coordinates (x, y, or z) and coordinates can be used to affect data values.
Up to two fields can be input to node computation. Mathematical expressions can involve one or both of the input fields. Fields must be identical grids, meaning they must have the same number of nodes and cells, otherwise the results will not make sense.
Nodal data input to each of the ports is normally scalar, however if a vector data component is used, the values in the expression are automatically the magnitude of the vector (which is a scalar). If you want a particular component of a vector, insert an extract scalar module before connecting a vector data component to node computation. The output is always a 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 and/or coordinates must be input as part of a Python script. Each nodal data component from Input Field 1 is assigned as a variable (An0, An1, An2, etc.), and from Input Field 2 as Bn0, Bn1, Bn2, etc. Coordinate variables (Ax, Ay, Az for Field 1 and Bx, By, Bz for Field 2) and min/max range variables are also available.
Ports
| Direction | Name | Type | Description |
|---|---|---|---|
| Input | Input Field 1 | Field | A field. |
| Input | Input Field 2 | Field | A field. |
| Input | Input Value N1 | Number | A value to use as a variable. |
| Input | Input Value N2 | Number | A value to use as a variable. |
| Input | Input Value N3 | Number | A value to use as a variable. |
| Input | Input Value N4 | Number | A value to use as a variable. |
| Output | Output Value N1 | Number | A value to use as a variable. |
| Output | Output Value N2 | Number | A value to use as a variable. |
| Output | Output Value N3 | Number | A value to use as a variable. |
| Output | Output Value N4 | Number | A value to use as a variable. |
| Output | Output Field | Field | The Output Field with solved expression data. |
| Output | Output Object | Renderable | A renderable object displaying the solved expression data. |
Properties
| Property | Type | Description |
|---|---|---|
| Allow Run | Boolean | Determines whether the module is allowed to execute. Set to True to allow this module to run. |
| Filename | String | The script which is run once per node, and the values set within the script are assigned to the coordinates and data of the resulting field. |
| Execute | Button | Accept all values and perform computation. If this button is clicked and the application saved, the module will run when the application is loaded. |
Output
| Property | Type | Description |
|---|---|---|
| Affect Coordinates | Boolean | When on, the script can set the X, Y, and Z coordinates. Leaving this off results in more efficient operation when the script only creates data. |
| Mode | Choice: Expression, Script | Expression mode allows inline expressions per data component. Script mode uses a Python script file. |
| Data Definitions | Data Definitions | The data you wish to generate in addition to coordinates. |
Variables
| Property | Type | Description |
|---|---|---|
| N1 | Double | Number passed into script. |
| N2 | Double | Number passed into script. |
| N3 | Double | Number passed into script. |
| N4 | Double | Number passed into script. |
| Nodal Computation Variables 1 | Display | The variables available for computation from Input Field 1. Shows coordinate variables, node number, min/max range variables, and all nodal data components. |
| Nodal Computation Variables 2 | Display | The variables available for computation from Input Field 2. Shows coordinate variables, node number, min/max range variables, and all nodal data components. |