Simulation: Specifications

Mandatory element

After the equation system was loaded and the indices were specified, the model can be specified.

Purpose

The specifications allow the user to 

  • assign variables to a specific group
  • assign values to variables and parameters
  • look at the used namespaces within the equation system
  • save the variable and parameter specification for later use

Explanation of the editor

As there are many aspects to discuss in the variable and parameter specification, both tabs are explained individually.

Variable specification

Once your equation system is instantiated, all variables that are not added to a parameter list appear in the window in Figure 1 (usually as unspecified). Is is then up to you to assign them their respective type. You can do that by selecting the type in the respective column. The variable specification differs between many different types of variables, i.e.,

  • design values: fixed variables
  • iteration values: (algebraic) variables that are (iteratively) solved in the simulation
  • parameter: parameters that are not (for some reason) part of the parameter list
  • Calculated values: these variables are those calculated by defined functions
  • differential variables: the independent variable in differential equations, usually time or space
  • state variables: these variables appear in differentials 
  • unspecified: all variables are initialized with this type
  • optimization var: degrees of freedom in an optimization problem
  • objective var: variable that is minimized or maximized in an optimization
  • control: variable that can be manipulated for control purposes
  • measurement: variable that is measured
  • timepoint: a variable characterizing a time poit during the solution, e.g., a switch function

Note that some of these types are only necessary for optimization. The differentiation of these variables is of particular advantage when you want to design your own user-defined language specificator. If you only want to solve your model in a simulation, the design, iteration, and state variables usually suffice.

In each window, you see the namespace of the variable, its name, and its index (an internal value). Furthermore, you can manipulate the type (as explained above), the value, and the lower and upper bound. Additional capabilities include marking a variable as integer (for optimization), changing the scaling, selecting the engineering unit, marking a variable as independent initial condition, and entering the OPC UA name (for online applications). If you want to change the current value for more than one variable, you can always select them and right-click. Table 2 describes all element in the variable specification.

Figure 1: Editor of the variable specification.
ElementExplanation
Var SpecsFilename of your variable specification once you have saved or loaded it. You can save several variable specifications for the same simulation, but the simulation always saves which specification was loaded last
Type of Equation SystemTells you which type of equation system you have loaded, e.g., nonlinear equation system (NLE) or differential-algebraic equation system (DAE)
Degrees of FreedomDetermines the degree of freedom by subtracting the number of equations from the number of non-fixed variables
Get Analysis ResultsCurrently disabled
Import ValuesAllows you to import a list of variables as long as these naming of these variables follows the syntax of the selected programming language within MOSAICmodeling. You can simultaneously import the values and lower and upper bounds
Test IterationPerforms a calculation of the residuals of all equations based on the currently set values for all variables. This feature is not automatically available for all users. If you cannot see this, please contact us
Calculate FunctionsTriggers a call to all functions within the model using the currently assigned values of the variables
Differential VariableLets you specify initial and end point of the differential variable. You can also enter how many reported points are created
Table 1: Elements of the variable specification.

Parameter specification

The parameter specification is similar to the variable specification in its structure as shown in Figure 2. You can also save parameter specifications. The available parameter types include

  • unspecified: every parameter is initialized with this type
  • fixed: parameter cannot be changed, e.g., universal constants
  • adjustable: parameters that can be changed, e.g., the number of tubes in a fixed-bed reactor. This is specifically relevant when you want to export your system as a unit operation in ACM or other tools
  • as decision: parameters that shall be decision variables in an optimization problem
  • as control: parameters that shall be controls in an optimization problem

The parameters have basically the same columns as the variables. Note that some of these types are only necessary for optimization. The differentiation of these parameter types is of particular advantage when you want to design your own user-defined language specificator. If parameters shall be used in a parameter estimation, the assigment of lower and upper bounds can be of use. All elements of the parameter specification are explained in Table 2.

Figure 2: Editor of the parameter specification.
ElementExplanation
Par SpecsFilename of your parameter specification once you have saved or loaded it. You can save several parameter specifications for the same simulation, but the simulation always saves which specification was loaded last
Import ValuesAllows you to import parameter values in the same way as in the variable specification
PropertiesCurrently no use
Table 2: Elements of the parameter specification.