Data Type: Analytic Vector Field ()
This data class represents a user-defined 3D vector field based on an arithmetic expression. It provides ports X, Y, Z by which arithmetic expressions can be entered that define the component mappings with respect to Cartesian coordinates x, y, and z. The (default) domain is the unit cube, thus for each point (x,y,z) in it, the associated vector (X,Y,Z) is given by scalar functions X(x,y,z), Y(x,y,z), and Z(x,y,z) which can be specified by the user in the same way as a function for a Analytic Scalar Field data object.The range of vector magnitudes, defined as Euclidean vectors lengths, is indicated as Magnitude.
A data object of type HxAnnaVectorField2 has three additional input ports named InputA, InputB, InputC that can be connected to other data objects representing scalar or vector fields. There are some predefined variables for referencing such connected data objects in the arithmetic expressions, namely a, b, c for scalar fields and ax, ay, az, bx, by, bz, cx, cy, cz for x-, y-, and z-components respectively of vector fields. This way a vector field depending on other scalar and/or vector fields can be defined. Whenever an evaluation of the three expressions is triggered to compute the vector associated with a point (x,y,z), each of the variables mentioned that occurs in them will be substituted by the corresponding input values at the same point (x,y,z). For instance the component values of a vector associated with a single point may be obtained by attaching a Point Probe module to the HxVectorField3 data object, entering the point's coordinates by the Coord port of that module and setting the Vector toggle to all.
If inputs contain undefined values, each of them will be used during the expression evaluation. If an undefined value is found, 0 will be used during this evaluation instead of the real undefined value. Therefore, the undefined value isn't propagated to the result.
An expression consists of variables and mathematical and logical operators, the syntax is basically the same as for C expressions. The following variables are always defined:
- x: the x-coordinate of the current point
- y: the y-coordinate of the current point
- z: the z-coordinate of the current point
If a scalar data object is connected to any of the ports InputA, InputB, InputC a corresponding variable for access to the data values is also defined, namely:
- a: the values of input object A
- b: the values of input object B
- c: the values of input object C
If a vector data object is connected to any of the ports InputA, InputB, InputC corresponding component variables for access to the data values are also defined, namely:
- ax, ay, az: the xyz vector components of input object A
- bx, by, bz: the xyz vector components of input object B
- cx, cy, cz: the xyz vector components of input object C
The same C style mathematical and logical operators as well as built-in functions that are available for arithmetic expressions can be used here, see Arithmetic module description.
InputA [optional]
Optional scalar or vector field.InputB [optional]
Optional second scalar or vector field.InputC [optional]
Optional third scalar or vector field.
X
Input field for arithmetic expression defining the x-component field values.Y
Input field for arithmetic expression defining the y-component field values.Z
Input field for arithmetic expression defining the z-component field values.Domain
This port is only visible if other fields are connected as input a, b or c. These input fields might not be defined everywhere. If set to unrestricted the field can be evaluated everywhere, a value of 0 is used for the input fields of a, b or c if evaluated outside their domain. If set to dependent field, the field is only evaluated inside all domains of the dependent fields a,b and c.