Physics Builder Tools > Variables > Variable Declaration

Variable Declaration
A Variable Declaration () specifies a variety of properties for a variable. You can also right-click to add and define Variable Definition, Component Settings, and Disable in Solvers subnodes.
To add a Variable Declaration first add a Component, Feature, Property, Physics Interface, or Multiphysics Interface node then:
From the contextual toolbar for Component, Feature, Property, Physics Interface, or Multiphysics Interface, click the Variable Declaration () button. For example, add a Component node under Building Blocks>Components. Then on the Component 1 toolbar, click Variable Declaration (). Or
Right-click the Component, Feature, Property, or Physics Interface node and select it from the Variables submenu.
To find the definitions of the variable, click the Find Declarations of this Variable button () on the Settings window, or click the node and press F7, or right-click the node and choose Search>Find Definitions.
The Settings window has the following sections:
Declaration
Enter a Variable name and a Description to include text for the variable when shown in analysis and variable listings.
Enter a LaTeX-encoded string in the Symbol (LaTeX encoded) field to define a symbol (\mu, for example, to display the Greek letter μ).
Select a Dimension: Scalar, Vector (3x1), Matrix (3x3), or Custom. For Custom, you can specify a nonstandard dimension as an MxN[xKxL] array, where M, N, K, and L are integers, and K an L are optional (for example, 3x3x3 if you need a tensor of rank 3 with indices of dimension 3).
For Custom you can enter two special formats for dynamically setting the size:
Enter par.<name> or arg.<name>, where <name> is a valid user input or argument, to use the size specification stored in the value of the user input named <name>. If the value of the user input is 3x4, this variable is a 3-by-4 matrix. Make sure that the user input only can contain valid size strings (NxMx...) before using this format.
Enter size(<prefix>.<name>), where <prefix> is par or arg. It tries to evaluate the size of the given argument to the size operator. In case of <prefix> = par, this returns the size of the referenced user input. This can also be used to use the size of a different variable, although this usage is not recommended. The variable muse be declared before this size evaluation, which cannot be guaranteed. All unknown variables return a scalar size.
The Physical quantity list defines the unit of the variable and is the same as a Dependent Variable Declaration.
If you have defined a customized Physical Quantity, choose Locally defined from the Physical quantity list and then choose the customized option from the Link list.
Entering Names and Expressions you can find more detailed information about how you can customize variable names with scopes and parameter values.
Preferences
In this section, specify options about the variable.
Operation Between Multiple Definitions
Select an option from the Operation between multiple definitions list: Replace, Add, Multiply, Logical or, or Logical and.
Any variable definition for this variable uses the selected operator to combine multiple variable definitions of the same variable. You typically use the option Add when several contributing features add contributions to the same variable (heat sources, for example).
Interpret as Right-Hand Side
Select the Interpret as right-hand side check box if you use the variable in any right-hand side of an expression. Such variables get an extra factor
that enables plotting and animations of the entire harmonic cycle in frequency-domain simulations. It is also used to identify right-hand-sides for harmonic perturbation features; see Harmonic Perturbation.
Include in Load Groups
Select the Include in load groups check box if the variable should be affected by load grouping. To enable load groups for a feature add an Auxiliary Settings node and select the setting Enable load groups.
Matrix Symmetry for Square Matrix
If the matrix is square (for example, if you select Matrix (3x3) from the Dimension list), you can force a matrix symmetry with the options in the Matrix symmetry for square matrix list. The choices are Diagonal, Symmetric, and Anisotropic (the default), and controls the cells that the user can edit. This option also adds a check to the data field, so the user cannot enter a matrix structure that is more complex than the selected option. For example, choosing Symmetric does not allow an anisotropic matrix but it allows both isotropic and diagonal matrices.
Show in Plot Menu
Select the Show in plot menu check box (the default) if you want the variable to show up when a user clicks the Insert expression () and Replace expression () buttons in any of the Results nodes during a Model Builder session. Edit the Menu field to group the variable into a submenu. The default setting is to place the variable directly under a the menu of the physics interface.
Announce Variable to Feature Inputs
Select the Announce variable to feature inputs check box so the variable notifies its existence to all physics interfaces. The variable uses the selected physical quantity as an identifier. Any feature input parameter with the same physical quantity can pick up an announced variable, so that the variable can be used by the physics interface that the feature input belongs to.
An example of a feature input is any of the model input parameters in the Model Inputs section of a physics feature instance in the Model Builder. It is also possible to supply an extra Match tag to the announced variable. The predefined options here are None (the default), and all physical quantity field names. None is equivalent to an empty tag and should be used unless it is necessary to limit the matching in some sense. In such cases, enter an arbitrary but relevant tag — for example, relative or absolute to distinguish between pressure fluctuations and absolute pressure levels. You typically need physical quantity options for synchronized matching.
Advanced
This section contains advanced options that you do not have to change in most cases. In the Base vector system list you can override the base vector system specified by the parent (for example, a feature or property) by choosing something other that the option Same as parent.