Defining the Simulation Setup

The Simulation Setup command defines the preferences of the simulation.

This task shows you how to:


Before you begin:
  1. In the tree, click the scenario to select it.
    Note: The simulation setup parameters are specific for each scenario.
  2. Click this command.

Customize General Options

You can customize the following options in the General tab.

Select the General tab:
OptionDescription
Simulation Interval Enter positive time values in Start time and Stop time boxes. Enter the time with units such as 1s or 2m.

If you are working with a Dymola Behavior Modeling model and import initial values, Time point to consider replaces the Start time value.

The default value of Start time is 0s and that of Stop time is 1s.

Store complete Modelica results Select this check box to store complete Modelica results.

By default, this option is selected.

Trajectories > Record 3D trajectories This option is available for functional or logical models. Select this option to record the position of each simulation step into the results.

By default, this option is cleared.

Trajectories > Store view point This option is available when the Record 3D trajectories option is selected.

By default, this option is cleared.

Customize Integration Options

You can customize the following options in the Integration tab.

Select the Integration tab:
OptionDescription
Output Interval > Interval length Specifies an interval length as the storage rate of the result.

Enter the time with units such as 1s or 2m.

By default, this option is cleared. If selected, the default value is 0.01s.

Output Interval > Number of intervals Enter the number of intervals as the storage rate of the result.

By default, this option is selected and the default value is 500.

Integration > Algorithm Enter the Algorithm used to solve the differential equations.

By default, the selected algorithm is Dassl.

When switching from a new solver, such as Radau Ila, to a traditional solver, such as Lsodar; or when linearizing a model, the model is recompiled but not totally translated.

Therefore, before you perform a simulation, select the integration algorithm.

Integration > Tolerance Enter the accuracy of the integration.

The default value is 0.0001.

Integration > Fixed integrator step If the selected algorithm is a fixed-step integrator, such as Euler, this option specifies it.

Enter the time with unit, for example 1m.

By default, this option is not selected. The default when selected is 0s.

Integration > Runge Kutta order for inline integration This option is available when selecting Inline Explicit Runge Kutta or Inline Implicit Runge Kutta as the algorithm. It lets you specify the Runge Kutta order for inline integration.

By default, this option is not selected. The default when selected is 2.

Note: You need the Export for HILS license (HIS) to use inline integration.

Customize Translation Options

You can customize the following options in the Translation tab.

Select the Translation tab:
OptionDescription
Evaluate parameters to reduce models (improve virtual execution speed) Evaluates all parameters except top-level parameters at translation.

By default, this option is cleared.

Also evaluate top-level parameters Evaluates all parameters with the top-level parameters at translation.

By default, this option is cleared.

Include a variable for elapsed CPU time during virtual execution Introduces CPU time as a new variable along with the accumulated CPU time during simulation. The slope of this signal is an indirect measure of the computational complexity of the simulation.

By default, this option is cleared.

Warn about parameters with no default Lists all free parameters which have no explicit value in the model.

By default, this option is selected.

Pedantic mode for checking Modelica semantics Turns all warnings corresponding to semantic errors in the Modelica code (compared to Modelica Language Specification) into errors instead of warnings. This forces the programmer to use compliant Modelica code.

By default, this option is cleared.

Provide variable dependencies Enables use of variable dependencies.

By default, this option is cleared.

Generate Analytic Jacobian for the ODE problem Enables the use of analytic ODE Jacobians for simulation and linearization.

By default, this option is cleared.

Start a PLM Update before every model translation Starts a PLM update before every model translation.

By default, this option is cleared.

List continuous time states selected Lists the selected continuous time state.

By default, this option is selected.

List non-linear iteration variables Lists the non-linear iteration variables.

By default, this option is cleared.

Log default connections Logs diagnostics when unconnected connectors receive a default value according to the Modelica semantics. This helps in finding an incorrectly composed model.

By default, this option is selected.

Log bus signal sets Logs information about connections of bus signals (expandable connectors), for tracing of bus signals. If this option is active, and you have bus signals in your model, you get an entry Bus signal sets in the translation log. This helps in searching connection of bus signals.

By default, this option is cleared.

Log selected default initial conditions When initial conditions are missing, Systems Virtual Execution selects the default initial conditions. This option reports the result of the automatic selection of default initial conditions.

By default, this option is cleared.

Log deduced units Outputs deduced units.

By default, this option is cleared.

Output information when differentiating for index reduction Reports about which equations are differentiated.

By default, this option is selected.

Output read classes to screen during parsing Outputs read classes during parsing. You can select this option to get information in the log about what classes are read when you for example open a package or a model.
Note: This information is only available in the command log, after you have performed a translation or simulation.

By default, this option is cleared.

Customize Output Options

You can customize the following options in the Output tab.

Select the Output tab:
OptionDescription
Format > Textual data format Stores results in textual format instead of binary.

By default, this option is not selected.

Format > Double precision Stores results in double precision instead of single precision.

By default, this option is not selected.

Store > State variables Enter the Algorithm used to solve the differential equations.

By default, the selected algorithm is Dassl.

When switching from a new solver, such as Radau Ila, to a traditional solver, such as Lsodar; or when linearizing a model, the model is recompiled but not totally translated.

Therefore, before you perform a simulation, select the integration algorithm.

Store > Derivatives Enter the accuracy of the integration.

The default value is 0.0001.

Store Stores the selected variables.

The Protected variables option stores non-selected variables when selections are present in a model. You can control the storage of protected variables during simulation, using one of the following methods:

  • Select the Protected variables option.
  • Use the Advanced.StoreProtectedVariables=False flag.
  • Use annotation(Hide=true) annotation to hide a variable.

    The annotation(Hide=false) annotation overrides the Advanced.StoreProtectedVariables=False flag.

Output Selection > Equidistant time grid Stores results equidistantly.

By default, this option is selected.

Output Selection > Store variables at events Stores variables before and after events.

By default, this option is selected.

Customize Debug Options

You can customize the following options in the Debug tab.

In the Debug tab, customize the following options:
OptionDescription
General Information > Normal warning messages Enables all warning and error messages.

By default, this option is selected.

General Information > Store variables after failed initialization Enables plotting of variables even if initialization fails.

By default, this option is cleared.

Events Logging > Events during simulation Logs events during the simulation. This can be useful for finding errors in the event logic, including chattering.

By default, this option is cleared.

Events Logging > Events during initialization Logs events during the initial phase.

By default, this option is not selected.

Non-linear Solver Diagnostics > Non-linear solution summary Adds a non-linear solution summary to the log in the following cases:
  • When solving a non-linear equation fails
  • When initialization fails
  • When using profiling
    Note: The summary also contains the tip that to also log used CPU time you must set the flag Advanced.GenerateBlockTimers=true. (This flag activates the profiling.)

By default, this option is not selected.

Non-linear Solver Diagnostics > Non-linear solutions Logs solutions of non-linear systems.

By default, this option is not selected.

Non-linear Solver Diagnostics > Non-linear iterations Logs iterations of non-linear systems.

By default, this option is not selected.

Non-linear Solver Diagnostics > Details Logs iterations of non-linear systems in detail.

By default, this option is not selected.

Non-linear Solver Diagnostics > Log singular linear Logs linear systems if they are consistently over-determined.

By default, this option is not selected.

State Variable Logging > Which states that dominate error Sometimes, tolerance requirements for some state variable can slow the simulation. Selecting this option logs these critical states.

By default, this option is not selected.

State Variable Logging > Dynamic state selection Logs the changes to the selection of states.
Note: The format of the logged changes is similar to the format of a fixed-state selection when editing a model.

By default, this option is not selected.

State Variable Logging > Final selection of states Logs the final selection of state variables.
Note: The format of the logged changes is similar to the format of a fixed-state selection when editing a model.

By default, this option is not selected.

Min./Max. Assertions > All variables Dynamically checks that variables are within the minimum and maximum bounds.

By default, this option is not selected.

Min./Max. Assertions > Nonlinear iterations variables Checks that non-linear iteration variables are within the minimum and maximum bounds.

By default, this option is not selected.

Min./Max. Assertions > Tolerance Defines the tolerance when checking minimum/maximum values.

By default, the value is 0.

Function Context > Include function call in error messages Reports the errors that are found in the functions with the call and with variable names.

By default, this option is not selected.