Summary of Built-In Variables with Reserved Names
This section is an overview of the built-in elements of the following categories as defined by the underlying COMSOL Multiphysics language:
These language elements are built-in or user-defined. In addition, there are operators that cannot be user-defined, and expressions, which are always user-defined.
About Reserved Names
Built-in variables have reserved names, names that cannot or should not be redefined by the user. It is not recommended to use a reserved variable name for a user-defined variable, parameter, or function. For some of the most common reserved variable names, such as pi, i, and j, the text where you enter the name turns orange and you get a tooltip message if you select the text string. Reserved function names are reserved only for function names, which means that such names can be used for variable and parameter names, and vice versa. The following tables list most built-in elements and hence those reserved names.
Constants and Parameters
There are three different types of constants: built-in mathematical and numerical constants, built-in physical constants, and parameters. Parameters are user-defined constants that can vary over parameter sweeps. Constants are scalar valued. The following table lists the built-in physical constants. Constants and parameters can have units.
Built-in Physical Constants
Summary of General Built-In Variables and Constants
The following table summarizes the built-in variables and constants that are generally available in all COMSOL Multiphysics models. Some are only available in certain geometries or in time-dependent models, for example. These variable names are reserved names and appear in orange in the Settings windows for parameters and variables.
x, y, z, r, X, Y, Z, R
s, s1, s2
n, nx, ny, nz, nr
tx, ty, tz, tr
t1x, t1y, t1z, t2x, t2y, t2z
un, unx, uny, unz
dn, dnx, dny, dnz
eps, i, j, pi, inf, Inf, nan, NaN
The minimum value of the reldetjac variable in each element.
The suffixes x, y, z, and r in some of the variables are the default names for the spatial coordinates, which you can change if desired.
The following user-defined variables generate built-in variables such as space and time derivatives. See Shape Function Variables for information about those built-in variables.
x, y, z
r, z
u, T, and so on