Dymola allows to export Modelica native models in three different ways, depending on the usage they have been developed for:

Stand-Alone Executables:

Any Modelica native model can be exported as a stand-alone executable for running on the most common operative systems (Windows, Linux, MacOS), independently from the Dymola environment. When the binary executable is generated, a corresponding input file is also written automatically, which includes all the setup parameters and the simulation settings. It is possible to edit this input file for running the same model with different settings, without coming back to the Modelica native model.

Functional Mock-up Units (FMU):

Any Modelica native model can be exported as a stand-alone dynamic library encapsulated in a compressed file (FMU) according to the FMI standard. The most common OS (Windows, Linux and MacOS) are supported. Both the Co-Simulation and the Model-Exchange interfaces are supported, thus enabling to export either the entire native model (governing equations and solver) or only the governing equations.

The user should only select the desired option flag, and the corresponding FMU is built. The native model can then be run in several different environments, even embedded, thus enabling the Hardware-in-the-Loop (HiL).

Source Code:

Any Modelica native model can be exported as the corresponding C source code. The aim of this option is to provide the source code that the user can customize in accordance with the target platform where the model should run. A few options are available for customizing the generated source code:

  • a readable and well documented code can be produced, for simplifying the inspection, the debugging, the profiling, etc. This option is particularly useful for advanced applications, such as rapid prototyping;
  • real-time functionalities can be included;
  • an XML information table can be added, including all the used symbols, the model structure, the variable naming, the type and the units of measurements.