Creating Variables
A variable is essentially defined by an expression of other variables, dependent variables, user input parameters, or entered values. You can use variables for many important purposes, including the following:
•
To add a quantity for plotting and results evaluation.
•
To simplify the writing and readability of expressions.
•
To make evaluation of long expressions more efficient, especially if an expression occurs in several places.
All variables in the Physics Builder are tensors that are first declared and then defined. You typically do the declaration once in a central place.
It is possible to do several declarations for the same variable, but then it is important that they are consistent.
An example of two inconsistent declarations is when they have different dimensions, and this gives an error message when you try the physics interface in the Model Builder. A declaration does not specify anything about the value of a variable. This is what you use the variable definition for. A variable definition declares the expression or shape function for the variable, and where (a selection) the definition is valid.