General Module Function
The field_math module (only in MVS) is used to perform mathematical operations on nodal data fields and coordinates. This module integrates the functionality of both data_math and coordinate_math in a single module. Furthermore, data values can be used to affect coordinates (x, y, or z) and coordinates can be used to affect data values. This makes this module much more powerful than data_math or coordinate_math even when both are used.
Up to four fields can be input to field_math. Mathematical expressions can involve any or all of these input fields.
Nodal data input to each of the four 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 field_math. The output is always a scalar. If a data field contains more than one data component, you may select from any of them. If the Data toggle is selected your modified data will be prepended to the original data components input to the A port. If it is off, the original data components input to the A port will pass through unaffected.
Module Input Ports
field_math has eight input ports.
There are four identical input ports that can accept any type of mesh, but the meshes must have the same cell types and number of nodes (i.e., they must have identical geometries). At least one input port must be used and up to four can be used. The first port is closest to the left and the ports are numbered sequentially in ascending order to the right.
Nodal data passed to ports one, two, three and four are referred to as Anx, Bnx, Cnx and Dnx (where x refers to the number of the data component) in the appropriate mathematical expression.
Coordinate data passed to ports one, two, three and four are referred to as Ax, Bx, Cx and Dx (y, or z) in the appropriate mathematical expression. For example if you want to refer to X coordinate of the first input you would use Ax in the expression, if you want to refer to Z coordinate of the second input you should use Bz in the expression.
For example if you want to refer to third nodal data component of the first input you would use An2 (numbers start at zero) in the expression, if you want to refer to first nodal data component of the second input you should use Bn0 in the expression.
There are also four identical input ports that accept floating point numbers (variables). None of these are required to be used, but up to four can be used. The first of these ports is the fifth from the left and the ports are numbered sequentially in ascending order to the right. These variables are referred to as f1, f2, f3 and f4 in your mathematical expressions.
Module Output Ports
Field_math has six output ports. The first four output port (from the left) pass the four variables so they can be shared with other modules. The next port is the output mesh containing revised data and coordinates that are a result of the computation. The last (red) output port is renderable version of the output mesh.
Module Control Panel
The control panel for field_math is shown in the figure above.
The Run toggle will prevent the module from running when unchecked. This allows the user to make multiple changes to expressions without the module constantly running.
The X, Y, & Z type-in boxes are for inputting mathematical expressions to modify the coordinates..
For example, the following expressions (one for x and one for y) converts input coordinates specified in the Polar coordinate system (where the original x was radius and y was the angle in radians) into Cartesian coordinates:
X Ax*cos(Ay)
Y Ax*sin(Ay)
The Number of Calculations slider lets you specify one or more new data components to create based on input mathematical expressions.
The Name type-in box is used for defining the name of the new data being created data. It defaults to the name of the module, but allows you to give more descriptive names to the output data.
The Units type-in box allow the units to be set for newly created data component.
The Treat as Log Processed toggle will let modules downstream know to treat this data as log processed. This can make your network and application far more understandable.
The Data type in boxes are for inputting mathematical expressions to create one or more new data components to create based on input mathematical expressions.
An example of an equation to blend the values of (interpolate between) two different fields having nodal data with a logarithmic distributions as f1 ranges from 1 to 0.0 is:
log10(pow(10,An0)*f1+pow(10,Bn0)*(1.0-f1))
You can also use
interplog(An0, Bn0,f1)
To perform interpolation between non-log processed data use:
An0 * f1 + Bn0 * (1.0-f1) OR interp(An0, Bn0,f1)
Pop-UpAvailable Mathematical Operators here.
Jump to a list of availableMathematical Operators
Related Modules
© 1994-2018 ctech.com