Connect variables
- Last UpdatedSep 10, 2025
- 4 minute read
You can connect two variables so that they behave as a single variable called a Variable Connection. The specification status and badges of the connected variables are always the same, making it easier to specify your simulation and to find specification changes. The solver treats the connected variables as one variable, which reduces the number of equations to solve and therefore makes the simulation run faster.
If two variable connections share a common variable, then all three variables act as one connected variable. You can make as many variable connections as you need to connect any number of variables in a model and the model's ports and submodels.
Model input checks for variable connections
When you add a variable connection in the Model Editor, the connection that you create must satisfy the following requirements. Otherwise, a red badge appears next to the connection to indicate the bad status.
-
Both variables must be of the same Variable Type.
-
Both variables must be scalar, or both variables must be arrays with the same dimension.
-
If you connect array variables that are dimensioned over a Fluid Type component list, the Fluid Types can be different, but the number of components in each Fluid Type must be the same. The components in the Fluid Types can be in different orders.
-
If you connect array variables that are dimensioned over a multi-port (that is, the array variable includes an element for each stream attached to the port), both array variables must be dimensioned over the same multi-port.
To save on processing time, AVEVA Process Simulation does not reprocess variable connections after you add model instances to your simulation. Therefore, you may encounter connection inconsistencies in your model instances between connected array variables if you change the parameter that one of the array variables uses for its dimension. For example, you may encounter connection inconsistencies in your model instances in the following cases:
-
The connected array variables are dimensioned over the component lists for two different Fluid Types, and you change the set of components (but not the number of components) in one Fluid Type without making the same change to the other Fluid Type.
-
The connected array variables are dimensioned over two different integer parameters, and you change the value of one parameter so that the two parameters now have different values.
Therefore, we recommend that your connected array variables use the same parameter for their dimension whenever possible. For array variables dimensioned over integer parameters, you can also add a parameter connection between the two parameters to ensure the two parameters always have the same value.
Attribute rules for variable connections
Connected variables can have different attributes defined in the Variables section of the Model Editor. However, the connected variables must use the same set of attributes in model instances to avoid inconsistent data and model errors. The software uses the following rules to select a common set of attributes for the connected variables:
-
If any of the variables are specified, then all the connected variables are specified.
-
If any of the variables are required, then all the connected variables are required.
-
If any of the variables are specified, then the software uses the default value from the first specified variable added to the set of connected variables as the default value for all the connected variables.
-
If no variable is specified, then the software uses the greatest default value as the default value for all the connected variables.
-
The software uses the most restrictive bounds for the connected variables:
-
The software uses the least of the variables' maximum (Max) values as the maximum value for all the connected variables.
-
The software uses the greatest of the variables' minimum (Min) values as the minimum value for all the connected variables.
If the maximum value for the connected variables is less than the minimum value, then warning badges appear on the connected variables in any model instances to indicate that the bounds may not be valid.
-
-
If any of the variables reference a value from a Fluid Type (for example, FluidType.Tmax or FluidType.Tmin) instead of using a constant, specified value for their maximum or minimum values, the software uses the Fluid Type value as the maximum or minimum regardless of any constant, specified values for the other variables.
The following display attributes remain unique:
-
Each connected variable follows its individual Favorites attribute.
-
Each connected variable displays its individual Description.
The order of the variable connections does not matter.
Connect two variables
-
Ensure that the Model Writing role is selected. See Roles, Roles.
-
Open the Model Editor for the desired Model Type.
-
Expand the Connections section.
-
Select Add Connection
.
A new connection appears in the list of connections.
-
(Optional) Rename the new connection.
-
In the Type list, select Variable.
-
In the From and To boxes, enter the names of the variables that you want to connect.
-
(Recommended) Enter a Description for the connection.