Home / Show Results / Result Field / User-Defined Field / Operator and Function List Usable in User-defined Field
Operator and Function List Usable in User-defined Field
The usable operators and functions are listed below.
* Both upper-case and lower-case letters can be used for them.
Operator
The calculation order of operators is the same as VB / VBA. In the table below, the operators in the upper rows have the higher priority than the ones in the lower rows.
|
Operator |
Note |
|
^ |
Power |
|
* / |
Multiplication Division |
|
+ - |
Addition Subtraction |
|
= <> < <= > >= |
Comparison
|
|
And |
Bitwise AND (fractional parts are truncated) |
|
Or |
Bitwise OR (fractional parts are truncated) |
Vector/Tensor Operator
|
Operator |
Note |
|
+ |
Vector + Vector = Vector |
|
- |
Vector - Vector = Vector |
|
* |
Scalar * Vector = Vector
Vector :* Vector = Scalar The same result is given as the function INNER_PRODUCT.
The following functions are provided to calculate the multiplication of vectors. Function INNER_PRODUCT_CONJ (Inner product with complex conjugate) Function OUTER_PRODUCT (Outer product) Function OUTER_PRODUCT_CONJ (Outer product with complex conjugate)
Calculates multiplication of a tensor and a vector.
Calculates multiplication of a transposed tensor and a vector.
Tensor * Tensor = Tensor
The following functions are provided to calculate multiplication of tensors. Tensor contraction can be calculated using the inner product function. Function INNER_PRODUCT (Inner product) Function INNER_PRODUCT_CONJ (Inner product with complex conjugate)
|
|
/ |
Vector / Scalar = Vector Tensor / Scalar = Tensor Calculates division of each component of a scalar, vector, or tensor by a scalar.
Other combinations are not supported. |
Functions (Basic)
|
Function |
Argument |
Return value |
Note |
|
SIN |
Scalar/Vector/Tensor (in radians) |
Argument: Scalar (in radians) -> Scalar |
Returns the sine of the argument. |
|
COS |
Scalar/Vector/Tensor (in radians) |
Argument: Scalar (in radians) -> Scalar |
Returns the cosine of the argument. In the case of a vector, returns the cosine of each component. |
|
TAN |
Scalar/Vector/Tensor (in radians) |
Argument: Scalar (in radians) -> Scalar |
Returns the tangent of the argument. In the case of a vector, returns the tangent of each component. |
|
ASIN |
Scalar/Vector/Tensor |
Argument: Scalar -> Scalar (in radians) |
Returns the arcsine (in radians) of the argument. |
|
ACOS |
Scalar/Vector/Tensor
|
Argument: Scalar -> Scalar (in radians) |
Returns the arccosine (in radians) of the argument. |
|
ATN |
Scalar/Vector/Tensor |
Argument: Scalar -> Scalar (in radians) |
Returns the arctangent (in radians) of the argument. |
|
LOG |
Scalar/Vector/Tensor |
Argument: Scalar -> Scalar |
Returns the natural logarithm of the argument. |
|
LOG10 |
Scalar/Vector/Tensor |
Argument: Scalar -> Scalar |
Returns the common logarithm of the argument.
|
|
SQR |
Scalar/Vector/Tensor |
Argument: Scalar -> Scalar |
Returns the square root of the argument. |
|
POW |
Argument 1: Argument 2: |
Argument 1: Scalar -> Scalar |
Returns the Argument 1 raised to the power of the Argument 2. The delimiter between arguments is a comma. |
|
EXP |
Scalar/Vector/Tensor
|
Argument: Scalar -> Scalar |
Returns Napier's constant raised to the power of the second argument |
|
F_IF |
Argument 1: Scalar Argument 2, Argument 3: |
Argument 2. 3: Scalar -> Scalar |
This function changes the return value depending on the conditions.
It includes three arguments. If the result from the Argument 1 is not 0.0, returns the Argument 2, and if the result is 0.0, returns the Argument 3. The delimiter between arguments is a comma.
Example: F_IF(WATT_TEMPERATURE>50,1,0) If the temperature is higher than 50, returns 1; otherwise, return 0. |
|
ABS |
Scalar/Vector/Tensor |
Argument: Scalar -> Scalar |
Returns the absolute value of the complex number. If the argument is a vector or tensor, calculates the absolute value of each component and returns a vector or tensor with these absolute values as components. |
|
REAL |
Scalar/Vector/Tensor |
Argument: Scalar -> Scalar |
Returns the real part of the complex number. If the argument is a vector or tensor, calculates the real part of each component and return a vector or tensor with these real parts as components. |
|
IMAG |
Scalar/Vector/Tensor |
Argument: Scalar -> Scalar |
Returns the imaginary part of the complex number. If the argument is a vector or tensor, calculates the imaginary part of each component and return a vector or tensor with these imaginary parts as components. |
|
CONJ |
Scalar/Vector/Tensor |
Argument: Scalar -> Scalar |
Returns the complex conjugate of the complex number. If the argument is a vector or tensor, calculates the complex conjugate of each component and return a vector or tensor with these complex conjugates as components. |
|
PHASE |
Argument 1: Real Number Scalar/Vector/Tensor |
Argument 2: Scalar -> Scalar |
Returns the magnitude of the complex number (Argument 2) at a particular phase (Argument 1 [deg]). If Argument 2 is a vector or tensor, calculates the magnitude of each component at the phase of Argument 1 and return a vector or tensor with these magnitudes as components. |
|
PHASE_VALUE |
Scalar/Vector/Tensor |
Argument: Scalar -> Scalar (deg) |
Returns the phase [deg] of the complex number. If the argument is a vector or tensor, calculates the phase of each component and return a vector or tensor with these phases as components. |
|
COORD |
No arguments required. |
Vector Real Number |
Return the coordinates. |
|
GAS_CONSTANT |
No arguments required. |
Scalar Real Number |
Returns the gas constant, R = 8.314462618 [J/deg/mol]. |
|
AMBIENT_PRESSURE |
No arguments required. |
Scalar Real Number |
Returns the ambient pressure defined on the fluid analysis tab. |
Functions (Vector/Tensor)
|
Function |
Argument |
Return Value |
Note |
|
VEC_X |
Vector |
Scalar |
Returns the X component of the vector argument. |
|
VEC_Y |
Vector |
Scalar |
Returns the Y component of the vector argument. |
|
VEC_Z |
Vector |
Scalar |
Returns the Z component of the vector argument. |
|
VEC_LENGTH |
Vector |
Scalar |
Returns the magnitude of the vector argument. If the argument is a complex number, returns a real number |
|
TEN_XX |
Tensor |
Scalar |
Returns the XX component of the tensor argument (X-direction normal component). |
|
TEN_YY |
Tensor |
Scalar |
Returns the YY component of the tensor argument (Y-direction normal component). |
|
TEN_ZZ |
Tensor |
Scalar |
Returns the ZZ component of the tensor argument (Z-direction normal component). |
|
TEN_YZ |
Tensor |
Scalar |
Returns the YZ component of the tensor argument (Shear component). |
|
TEN_ZX |
Tensor |
Scalar |
Returns the ZX component of the tensor argument (Shear component). |
|
TEN_XY |
Tensor |
Scalar |
Returns the XY component of the tensor argument (Shear component). |
|
TEN_ZY |
Tensor |
Scalar |
Returns the ZY component of the tensor argument (Shear component). |
|
TEN_XZ |
Tensor |
Scalar |
Returns the XZ component of the tensor argument (Shear component). |
|
TEN_YX |
Tensor |
Scalar |
Returns the YX component of the tensor argument (Shear component). |
|
TEN_P1 |
Tensor |
Scalar |
Returns the maximum principal value of the tensor argument (if the display type is stress type, maximum principal stress; if it is strain type, maximum principal strain). If the argument is a complex number, returns a real number
|
|
TEN_P2 |
Tensor |
Scalar |
Returns the intermediate principal value of the tensor argument (if the display type is stress type, intermediate principal stress; if it is strain type, intermediate principal strain). If the argument is a complex number, unable to output.
|
|
TEN_P3 |
Tensor |
Scalar |
Returns the minimum principal value of the tensor argument (if the display type is stress type, minimum principal stress; if it is strain type, minimum principal strain). If the argument is a complex number, returns a real number
|
|
TEN_XZ_P1 |
Tensor |
Scalar |
Returns the XZ in-plane maximum principal value of the tensor argument (if the display type is stress type, maximum principal stress; if it is strain type, maximum principal strain). If the argument is a complex number, returns a real number
|
|
TEN_XZ_P2 |
Tensor |
Scalar |
Returns the XZ in-plane minimum principal value of the tensor argument (if the display type is stress type, minimum principal stress; if it is strain type, minimum principal strain). If the argument is a complex number, returns a real number
|
|
TEN_XY_P1 |
Tensor |
Scalar |
Returns the XY in-plane maximum principal value of the tensor argument (if the display type is stress type, maximum principal stress; if it is strain type, maximum principal strain). If the argument is a complex number, returns a real number
|
|
TEN_XY_P2 |
Tensor |
Scalar |
Returns the XY in-plane minimum principal value of the tensor argument (if the display type is stress type, minimum principal stress; if it is strain type, minimum principal strain). If the argument is a complex number, returns a real number
|
|
TEN_VOLUME |
Tensor |
Scalar |
Returns the volumetric value of the tensor argument (if the display type is stress type, hydrostatic pressure; if it is strain type, volume strain). |
|
TEN_EQUIV |
Tensor |
Scalar |
Returns the equivalent value of the tensor argument (if the display type is stress type, von Mises equivalent stress; if it is strain type, equivalent strain). If the argument is a complex number, returns a real number
|
|
TEN_R |
Tensor |
Scalar |
Returns the difference between the maximum and minimum principal values (if the display type is stress type, maximum shear stress; if it is strain type, maximum shear strain). If the argument is a complex number, returns a real number
|
|
MAKE_VEC |
Arguments 1 to 3: |
Vector |
Constructs a vector from three arguments. Example: MAKE_VEC(1,2,3) |
|
MAKE_TEN |
Arguments 1 to 9: |
Tensor |
Constructs a tensor from nine arguments. Example: MAKE_TEN(1.2, 3.4, 5.6, 1,2,9) |
|
UNIT_TEN |
No arguments required. |
Tensor |
Creates a unit tensor (diagonal elements are 1, and all other elements are 0). |
|
INNER_PRODUCT |
Argument 1, Argument 2: |
Scalar |
Calculates the inner product of two scalar arguments, vector arguments, and tensor arguments. For a vector or tensor argument, sum the products of their respective components. If the argument is a complex number, returns a real number
Example: 0.5*INNER_PRODUCT(GALILEO_STRAIN_E,GALILEO_STRESS) Calculates the strain energy density (static analysis). |
|
INNER_PRODUCT_CONJ |
Argument 1: Argument 2: |
Scalar |
Calculates the inner product of two scalar arguments, vector arguments, and tensor arguments. For a vector or tensor argument, sum the products of their respective components. If the arguments are complex numbers, returns a real number calculated using the complex conjugate of the second argument.
Example: 0.25*INNER_PRODUCT(GALILEO_STRAIN_E,GALILEO_STRESS) Calculates the strain energy density (average). |
|
CROSS_PRODUCT |
Argument 1: Argument 2: |
Vector |
Calculates the outer product of two vector arguments.
Example: 0.5*CROSS_PRODUCT(HERTZ_ELECTRIC_FIELD,HERTZ_MAGNETIC_FIELD) Calculates the poynting vector (vibration). |
|
CROSS_PRODUCT_CONJ |
Argument 1: Argument 2: |
Vector |
Calculates the outer product of two vector arguments. If the arguments are complex numbers, returns a real number calculated using the complex conjugate of the second argument.
Example: 0.5*CROSS_PRODUCT(HERTZ_ELECTRIC_FIELD,HERTZ_MAGNETIC_FIELD) Calculates the poynting vector (average). |
|
TRANS |
Tensor |
Tensor |
Converts the tensor argument to a transposed matrix. |
|
INVERSE |
Tensor |
Tensor |
Converts the tensor argument to an inverse matrix. |
|
DET |
Tensor |
Scalar |
Calculates the determinant of the tensor argument. |


