Global Constants¶
Introduction¶
Global constants provide a mechanism for defining scalar values that can be reused across multiple user-defined functions (UDFs) in a model. Unlike variables, which may vary over space or time, constants are fixed throughout the simulation and are evaluated once at runtime. They are most often used for reaction rate coefficients, stoichiometric ratios, nondimensional groups, or other parameters that should remain uniform across all UDFs.
Constants are defined in the Edit Global Constants window within the context specific menu.

The form presents three editable fields per row:
Name: The symbolic identifier of the constant, referenced directly inside UDF expressions.
Value: The numerical value of the constant. Mathematical expressions are permitted, provided they resolve to a fixed value at runtime. All expressions must remain constant (no variables or time-dependent terms are allowed). Functions are parsed and evaluated using the same syntax as system UDF expressions. This includes the full library of built-in mathematical functions documented under CPU Expressions – Built-in Functions.
Note: An optional comment field for annotation or documentation purposes.
The form includes OK, Cancel, and Add Rows controls for saving, discarding, or extending the list. Once defined, constants may be used by name in any UDF expression.
Global Constants Toolbar¶
The context-specific toolbar launches forms in the property grid which are relevant to the selected parent and/or children.
Context-Specific Toolbar Forms |
Description |
---|---|
|
The Edit Global Constants window opens a spreadsheet to edit the global constants data in tabular form. |
|
The Help command launches the M-Star reference documentation in your web browser. |
For a full description of each option, see Context-Specific Toolbar selections.