•
|
From the Home (Windows users) or Main (macOS and Linux users) toolbar click Variables and choose Global Variables or Local Variables.
|
•
|
•
|
Under Component right-click Definitions and choose Variables, or click Local Variables in the Definitions toolbar (Windows users).
|
Variables defined in a Component but with Geometric entity level set to Entire model are in fact global; they can be used anywhere using their full name. For example, if you define variable a in Component 1 in this way, you can refer to it in another Component as comp1.a.
|
If a variable is defined on the boundary (with the same name as a variable defined in a domain), it will take precedence, when evaluated on a boundary, over the variable in the domain. If you define a variable v, for example, and the selection is Entire model, you actually define four different variables, representing v in domains, boundaries, edges (3D only), and points.
|
It is only possible to move variables within Variable nodes in the same component or between global Variables nodes.
|
For an example of global variables, see Effective Diffusivity in Porous Materials: Application Library path COMSOL_Multiphysics/Diffusion/effective_diffusivity
|