Parameters
Parameters nodes () are available under Global Definitions for creating and defining global parameters. One Parameter node is always available, and it cannot be moved or deleted. Additional Parameter nodes can be added as desired, if you would like to group parameters in several Parameter nodes, perhaps with descriptive labels. This is also useful if you want to use some parameters for preprocessing only and then not include them in parametric sweeps for example (see the Visibility section below). You can move and delete Parameter nodes that you have added. If you group nodes by type, the Parameters nodes appear under Global Definitions>Parameters. Right-click a Parameters Node and choose Parameter Case to add Case subnodes for parameter cases, which can be useful for parameter switching in a Parametric Sweep node (see Parameter Cases).
The parameter namespace is global, so you cannot use the same parameter name in different Parameter nodes. If you do, the parameter name turns red and a Name already used tooltip appears.
You can also add a Parameters node () under Results () for parameters that you want to use for results analysis and postprocessing without the need to update the solution.
Parameters are useful in the following context:
The Settings window for Parameters includes the following sections.
Parameters
Enter values in the Parameters table to define parameters used throughout the entire model (or in nodes under Results only). In the Parameters section you can enter parameters manually or import them from a text file.
In the Parameters table or the field under the table, enter a parameter Name.
In the Expression column or field, enter a parameter expression that defines the parameter value, including a unit if desired. You can define a parameter as an expression in terms of numbers, other parameters defined in the same context (and global parameters in the Parameters node under Results), built-in constants, built-in functions of parameters, built-in constants, and user-defined functions (to access user-defined functions defined under a component use a component scope; that is prefix them with the component’s name, such as comp1.an1(fpar)). Also add a unit using unit syntax, unless the parameter is unitless. Press Ctrl+Space or use the Insert Expression button () below the table to choose from previously defined parameters, mathematical constants and functions, operators, and physical constants that you can insert into the expression at the position of the cursor.
The Value column displays the value of the parameter in the base unit system.
In the Description column or field, enter an optional description.
You can select one or more parameters and right-click to move them inside this table or to another existing or new Parameters node (by choosing Move>Move to Parameters 2, for example, or Move>Move to New Parameters), delete the parameters, or cut, copy, and paste the expressions. If there are Case subnodes (see Parameter Cases) added as parameter cases, you can also choose from which Case node the parameter values are taken (using the Set From submenu).
You can also use the buttons underneath the table to move and remove rows and to clear the table. Also, use the Move To button () to move selected parameters to any other available Parameters node or to a new Parameters node. If there are Case subnodes, use the Set From button () to pick the parameter values from one of the parameter cases.
Additionally, you can save the parameters to a text file to reuse in other models. Click the Save to File button () and enter a File name in the Save to File dialog box, including the extension .txt. Click Save to store the parameters in a text file or in a Microsoft Excel Workbook spreadsheet if the license includes LiveLink™ for Excel®. The information is saved in space-separated columns in the same order as displayed on screen. When saving to Excel, an Excel Save dialog box appears where you can specify the sheet and range and whether to overwrite existing data, include a header, use a separate column for units, or include the calculated values for the parameters.
You can import or load data in files from a spreadsheet program, for example, with the Load from File button () and the Load from File dialog box that appears. Data must be separated by spaces or tabs. If there is already data in the table, imported parameters are added after the last row. Move or edit rows as needed. If the license includes LiveLink™ for Excel® you can also load parameters from a Microsoft Excel® Workbook spreadsheet. Then an Excel Load dialog box appears where you can specify the sheet and range and whether to overwrite existing data. It is also possible to import from a spreadsheet containing a separate column for units.
Visibility
The Show in parameter selections check box is selected by default. Clear it if the parameters in this Parameters node should not be available for selections in, for example, a Parametric Sweep node’s Settings window.
This section is not available for the Parameters node under Results.