field_math

image\fieldmathmod_new.jpg

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.

image\fieldmathpanel_new.jpg

Module Control Panel

The control panel for field_math is shown in the figure above.

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)

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

 ->coordinate_math

© 1994-2018 ctech.com