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. This means 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.
Module Input Ports
- Input Field 1[Field] Accepts a data field.
- Input Field 2[Field / minor] Accepts a data field.
- Input Value N1 [Number / minor] Accepts a number to be used in the field computations.
- Input Value N2 [Number / minor] Accepts a number to be used in the field computations.
- Input Value N3 [Number / minor] Accepts a number to be used in the field computations.
- Input Value N4 [Number / minor] Accepts a number to be used in the field computations.
Module Output Ports
- Output Field [Field] Outputs the subsetted field as faces.
- Output Value N1 [Number / minor] Outputs a number used in the field computations.
- Output Value N2 [Number / minor] Outputs a number used in the field computations.
- Output Value N3 [Number / minor] Outputs a number used in the field computations.
- Output Value N4 [Number / minor] Outputs a number used in the field computations.
- Output Object [Renderable]: Outputs to the viewer.
Module Parameters
- Data Definitions: You can have more than one new data component computed from each pass of node_computation. By default there is only Data0.
- Add/Remove buttons allow you to add or remove Data Definitions
- Name: The data component name (e.g. Total Hydrocarbons)
- Units : The units of the data component (e.g. mg/kg)
- Log Process: When your input data is log processed, the values within node_computation will always be exponentiated.
- In other words, even when your data is log processed, you will always see actual (not log) values.
- This toggle should be ON whenever you are dealing with Log data.
- If you want to perform math operations on the "Log" data, you must take the log of the An* or Bn* values within node_computation
- If you do take the log of those values, you should always exponentiate the end results before exiting node_computation.
Each nodal data component from Input Field 1 is assigned as a variable to be used in the script. For example:
- An0 : First input data component
- An1 : Second input data component
- An2 : Third input data component
- AnN : Nth input data component
The min and max of these components are also added as variables :
- Min_An0 : Minimum of An0 data
- Max_An0 : Maximum of An0 data
- Min_An* : Minimum of An* data
For Input Field 2 the variable names change to:
- Bn0 : First input data component
- Bn1 : Second input data component
- Bn2 : Third input data component
- BnN : Nth input data component
An interesting and simple example of using node_computation can be found here.
The equation(s) used to modify data and/or coordinates must be input as part of a Python Script. The module will generate a default script and by modifying only one line (for the X coordinate)we get:
which with the following application:
Gives us the ability to view densely sampled data as line plots beside each boring