Physics Builder Tools > Properties > Tensor-Valued Function

Tensor-Valued Function
The Tensor-Valued Function node () adds a possibility to create functions with tensor-valued arguments and output. It is very similar to the scalar analytical function in the Model Builder.
Settings
Enter a name for the tensor-valued function in the Function name field. To use this function in an expression, type phb.<function name>.
Add the arguments to the function in the Argument column. An argument can have an arbitrary dimension, so it depends on the actual argument passed to the function. To use a specific dimension, select the check box in the Force dimension column, and enter the desired dimension in the Dimension column (as 2x2x3, for example, for a 2-by-2-by-3 tensor dimension). This last column is ignored when the Force dimension check box is cleared.
Specify the output with the Specify output list, which has the options From expression and Specify size and template:
With From expression the output evaluates the tensor expression in the Expression field. The dimension of the output depends on the expression.
Use the Specify size and template option when you want to control the size of the output and enter the expression of each component in the output. Such an expression should always evaluate to a scalar, and it supports the index variables i, j, k, and l, which represent the index in the output tensor currently evaluated. If an argument has the same dimension as the output it is also possible to use these in index variables to pick up an element of the argument; for example, use arg.i.j to get the i:th row and j:th column in the argument tensor named arg.