Entering Names
All variable names that you write in an expression are first assumed to be a variable defined by the physics interface, which means that it has a physics interface scope. If no variable is found with that scope, it checks the component scope and finally the root scope. If you want to access a variable in the root scope, but you are unsure if it exists in any other scope, enter the variable fully scoped, for example, root.lambda to access the eigenvalues from the solver.
You might also want to access the value of a user input in your equations without adding it as a variable. The syntax for this is to add par. before the input parameter name. For example, to access the input parameter sigma in an expression, type par.sigma. The par prefix is part of a name generation syntax that the builder interprets. This syntax is built up by a sequence of dot-separated items, where each position has a special meaning. The full syntax description can be defined by the following rule
[<prefix>].<identifier>.[<input>]*.[<integer>]*
All items within brackets mean that you do not have to specify them, and in some cases a default is used instead. An asterisk (*) means that you can write zero or several items. The par prefix in the mentioned above, is an example when the identifier position is a user input, and the value of that user input replaces the entire sequence. There are other similar reserved prefixes for accessing different scopes and specifying operators. You find the complete list in the following table:
Identifies the coordinate and is used together with number-dot. Can be prefixed by s, m, g, or M corresponding to the coordinate in the spatial, material, geometry, or mesh frame, respectively.
map.nsign is a variable for the normal sign, defined as 1 on all boundaries. To change the normal direction on some boundaries, redefine this variable to be -1 to flip the normal direction.
Usually replaced with the scope of the coordinate system currently selected in the Coordinate system list in the Settings window of the feature instance. In other cases it can represent more complex expressions; see The Input Base Vector System for more details.
If the prefix is left out, it is assumed to be phys for variable names, but not for dependent variables, operators, and functions (see below). After the identifier there can be a trailing sequence of integers. This sequence represents indices of a tensor element. Assume that there is a 3-by-3 tensor A with physics interface scope, and that it is used in a 2D axisymmetric model where the coordinate names are r, phi, and z. If you type
A.1.2
in a builder expression, it becomes
Arphi
in the 2D axisymmetric model. The standard naming convention for components of a vector or matrix is a base name concatenated with the coordinate names. You can override this naming convention using the Component Settings node.
Dependent variables are treated differently. Firstly, they always have component scope, so unscoped names get this scope. Secondly, the user can change their names, so you always specify them by their default name. The physics scope lookup has precedence over the default-name lookup of dependent variables, so if you want to use a dependent variable that has the same default name as the name of a variable, you must use the dep prefix.