Exporting a model as an FMU

November 27, 2026

Konjugate can turn your model into an FMU: a single file that other simulation tools can run, in the standard format called FMI. The FMU contains your model and our solver, compiled, so it steps the way Konjugate does.

Exporting is a desktop app feature and needs a C++ compiler on your computer, the same one C++ relationships use.

Before you export

Run your model once. If you press Close and edit and then Keep them to compare, you can check the FMU against that run afterwards.

Export

Press Export simulation code (the ‹/› button in the title bar) and set Format to FMU (FMI 2.0 Co-Simulation) or FMU (FMI 3.0 Co-Simulation).

The Export as an FMU dialog for the spring mass damper example, summarising outputs, parameters, inputs, step size and platform
Read this summary before you export. It is what a tool running your FMU will get.

Press Export… and choose where to save.

FMI 2.0 or FMI 3.0?

Both are built from the same model and give the same numbers. Choose by what the receiving tool accepts. The visible difference is that our FMI 3.0 export declares your units and our FMI 2.0 export does not.

What the FMU offers

For a model without ports:

In your model In the FMU
Every state An output, named Node.State
A constant parameter A tunable parameter, starting at its value
A live parameter An input
A parameter on a stored schedule Worked out inside the FMU

Parameters are named by their symbol. When two share a symbol, the node or relationship name is added in front.

Declaring an interface with ports

If your model declares input and output ports, the FMU offers exactly that interface:

  • Each input port is an input and each output port an output.
  • Each exposed parameter is a tunable parameter.
  • Other states can be read by the receiving tool but not set.
  • Other parameters are built in at their current values. The dialog counts them and Expose them makes them tunable.

An input port must be an Update state that nothing inside the model sets. The dialog names any port that breaks this rule. A port that goes both ways becomes an output, since FMI has no variable that does both.

Konjugate, importing such an FMU, reads its inputs, outputs and parameters but not the other states.

The step size

The receiving tool must step the FMU by a whole multiple of your model's global step. With a global step of 0.01 s, steps of 0.01 s or 0.1 s work and 0.015 s is refused with an explanation.

Both versions record the model's output interval as the suggested step. They also record the end time of your last run when you have made one.

Check it before you send it

After exporting, press Try it as a node on the notice.

The FMU exported notice with a Try it as a node button
A new window opens with the FMU placed as a node, ready to run.

Run it there to the same time, then compare it with the original.

The Compare with original panel reporting that the run is identical, with a largest difference of 0 for each of four outputs
Our spring mass damper example, exported and run as a node: identical to the model it came from at every sample.

Check it without Konjugate

FMPy is an independent, free FMI tool written in Python. After pip install fmpy:

fmpy info springMassDamper.fmu
fmpy validate springMassDamper.fmu
fmpy simulate springMassDamper.fmu --stop-time 10 --step-size 0.05 --output-file results.csv

Make it run on other computers

An export holds a binary for the computer you export on. Konjugate does not cross-compile.

To support several systems:

  1. Open the same project on each system and export it there, in the same FMI version.
  2. In the export dialog, press Merge platform FMUs… and select the files.
  3. Save the combined FMU.

The files must come from the identical model. If you change an equation, a value, a name or the step in between, export every platform again. Apple Silicon and Intel Mac exports can be combined too, giving a file that runs on both. Change a unit and export again on every platform too, so that the combined file describes it correctly.

Saving and restoring state

Many tools save an FMU's state and return to it, for example to retry a step. Our FMUs support this, including saving the state as bytes, with two exceptions:

  • Models run with a Stiff method.
  • Models with a program written in the older program format.

What can be exported

Model FMU export
Euler, node by node Yes
Stiff (Rodas4, Rodas5P or BDF) Yes, without saved state
Updates worked out once per step Yes, under Euler, node by node
C++ programs Yes, with limits under Stiff
Runge–Kutta 4 or Adaptive Not yet
A node using semi-implicit integration Not yet
Python programs No
A plugin reference No
A model containing an FMU node Not yet

When a model cannot be exported, the message names the node or relationship responsible and usually says what to change. If it asks you to change how a node works out its Updates, remember that this can change your results. Run the model again before comparing.

Replace a component with its FMU

Once you have exported a component that has ports, you can put the FMU in its place. Choose Replace with its FMU… on the component's card. Konjugate lists what matches by name and refuses while anything would be lost. One Undo brings the component back.

How we check exports

Our release checks have FMPy run exported FMUs and compare them with our engine on macOS, Windows and Linux. On Windows the checks built those FMUs with MinGW-w64's GCC rather than Visual Studio. We have not tested our exported FMUs with other FMI tools.

The current details are on our FMI compatibility page, which also has example FMUs with reference results.

Follow Konjugate on LinkedIn for updates, or subscribe via RSS.

Comments