Creating and exporting FMU > The Export Tool in detail
Numerical solver settings relevant to co-simulation
Handling of Run Parameters
Almost all the solver settings that appear in theRun Parameters dialog box and are relevant to co-simulation, are mapped to:
FMI scalar variables with parameter variability and none causality in FMI 1.0,
FMI scalar variables with parameter causality and fixed variability in FMI 2.0 or 3.0.
These parameters are not part of the model, but of the simulator. The value of a solver setting entered interactively in the Run Parameter dialog box is translated into the start value of the corresponding FMI scalar variable. As these variables have a start value, their value can be changed at runtime by the FMI for Co-simulation environment which imports the FMU, right before initialization.
The solver settings that are actually used depend on the type of integrator selected. This is controlled by the integratorType FMI scalar variable which can take two values: standard or fixed. Standard means the variable-step size solver of Simcenter Amesim (either explicit or implicit; this depends on the nature of the model), and fixed means one of the fixed step size solvers.
The exported solver settings are summarized in the following table:
| FMI Scalar Variable Name | Description | Unit | Type | Values1 | Default value |
|---|---|---|---|---|---|
| integratorType | integrator type | Enumeration | standard (1) | standard | |
| maxTimeStep | maximum time step | s | Real | >0 | 1e+30 |
| tolerance | solver tolerance | Real | >0 | 1e-07 | |
| errorType | type of error control | Enumeration | mixed (1) relative (2) absolute (3) | mixed | |
| solverType | solver type | Enumeration | regular (1) cautious (2) | regular |
The other solver settings are not exported and thus have no influence on the co-simulation.
Switching between variable-step and fixed-step solver
When the system is explicit, i.e. when all the variables of the model are only explicit state variables or basic variables, it is usually permitted to switch from the standard variable step size solver to a fixed step size solver2. This can be done interactively by selecting Fixed step integrator in the Run Parameters dialog box (see the figure below). Then, the fixed step options (integration method, step size, method order) can be defined in the corresponding tab of the dialog box.
Figure 60: Run Parameters window, with the Fixed step integrator option enabled
If the FMU is later generated with these settings, the fixed step size solver will be automatically used during co-simulation.
Switching to fixed step size solver before the creation of the FMU is considered the best way to proceed. Indeed, at this time, it is still possible to test the model without the FMI for Co-simulation block and ensure that it can be integrated with a fixed step size solver without having to take a too small step size that would result in a very long computation time.
However, once the FMU is created, it is possible to switch to a fixed step size solver at co-simulation runtime, before initialization by setting the integratorType FMI scalar variable to fixed. This has to be done with models which are proven to be integrated with a given fixed step size. No checks are performed by the Export Tool. This means that if the FMI for co-simulation environment requires the FMU to use a too large fixed step size, convergence of the numerical solver may fail. Therefore it is up to the FMU provider and the FMU user to ensure that the model enclosed in an FMU can be integrated with a given fixed step size. This has to be stated in the model documentation, although the best way to proceed is to preselect the integration method and step size before creating the FMU, as explained above. That way, the FMU user has just to switch on the fixed step size solver and accept the default method and step size. Be aware however that instabilities can occur in the co-simulation process itself, regardless of the local convergence of the numerical solvers involved in the co-simulation. Checking the convergence of a model locally before exporting it as an FMU for co-simulation is a necessary but not sufficient condition for co-simulation convergence.
To enable the fixed step size solver at runtime, the FMI for Co-simulation environment has to set the value of the following FMI scalar variables:
| FMI Scalar Variable Name | Description | Unit | Type | Values | Default value |
|---|---|---|---|---|---|
| integratorType | integrator type | Enumeration | fixed (2) | Standard | |
| fixedStep | fixed step size | s | Real | >0 | 0.001 |
| integrationMethod | fixed step integration method | Enumeration | Forward Euler (1) Adams Bashforth (2) Runge-Kutta (3), | forward Euler | |
| fixedOrder | order of fixed step integration method | Integer | 1 (Euler only), 2, 3, 4 (for Adams Bashforth and Runge-Kutta) | 1 |
Conversely, if the fixed step size solver is preselected in an FMU for co-simulation, switching back to variable-step size method at runtime is possible by assigning the value standard to the integratorType FMI Scalar variable.
1
Some FMI for Co-simulation importing environments may have limited support for the Enumeration FMI type. In that case, an enumerated variable is usually displayed as an integer variable, and the enumeration item names are shown as integer numbers. For each possible enumeration item name, the corresponding integer number is defined between parentheses. For example, “mixed (1)” means that the item name “mixed” for the enumerated variable
errorType
may be assigned the integer number 1.
2
In
Simcenter Amesim
, a fixed-step size solver is not allowed with implicit systems.
Source: https://docs.sw.siemens.com/en-US/doc/254352342/PL20250521841123434.amesim_collection.Functional_Mockup_Interface/Numerical_solver_settings · retrieved 2026-07-17