Using an FMU in Konjugate

November 27, 2026

An FMU (Functional Mock-up Unit) is a model packaged in a standard form, so that a tool other than the one that made it can run it. The standard is called FMI. In Konjugate an FMU becomes a node: a box with the model's inputs on one side and its outputs on the other, which you connect to the rest of your model.

This page covers everything from adding an FMU to running it, keeping it with your project and replacing it. For what is and is not supported, start at "FMI and FMUs in Konjugate".

FMUs run in the desktop app for macOS, Windows and Linux. Konjugate Web does not run them.

What you need

The examples below use PidController.fmu, a room temperature controller made in OpenModelica. It ships with our examples, in the pidController folder.

Only add FMUs from people you trust. An FMU contains compiled code, and running it is like running a downloaded program.

Add the FMU to your model

Open Add (the + button) and choose FMU…, then pick the file.

The Add menu with Node, Relationship, ports, Component from file and FMU entries
FMU… sits with the other things you can add to a model.

You can also drop an .fmu file onto the canvas, and the node lands where you drop it. FMUs you have added before are listed under FMU…, ready to add again. These are the only ways in: Extensions installs add-ons and plugins, not FMUs.

The controller as a box with two input terminals, measurement and setpoint, on its left and one output terminal, command, on its right
Inputs on the left, outputs on the right. An input that reads nothing yet says it uses the FMU's own start value.

The new node is built from the FMU's own description:

  • Each output becomes a state of the node, with its name, unit and start value. The FMU sets it.
  • Each input and parameter is listed, starting at the FMU's own value. The node runs without any wiring.

Read the node's card

The node card for PidController, showing the FMU chosen, the binary that runs, About this FMU opened and the rows for its parameters and inputs
The card says which binary runs here, which parameters are fixed once a run starts and what the FMU says about itself.

Under the FMU's name, the card says which binary runs on your computer, which parameters are set only when a run starts, which values are converted and which variables are not connected. About this FMU shows the FMI version, the tool that generated it, its description, the platforms it carries, the run it suggests and whether it can save its state.

That last line matters. An FMU that cannot save its state cannot be used with checkpoints, forks or rewinding.

Connect inputs and parameters

Every input and parameter row offers the same choices:

Choice What happens
The FMU's own start value The FMU keeps the value it was made with.
A value of its own Konjugate sets your number once, when the run starts.
A shared parameter The value follows a parameter shared across the model.
A state The input reads a state of this node or of any other node.

A unit that differs from the input's own is pointed out on the row. Konjugate does not convert it.

The controller reading two nodes, with a dashed arrow from Setpoint to its setpoint input and another from Room to its measurement input
A dashed arrow shows what each input reads.

On the canvas the inputs are listed in the order their sources appear on screen, so the arrows do not cross. The node card keeps the FMU's own order.

You can also connect on the canvas:

  • Drag from an input terminal to a node, a state of a node or another FMU's output.
  • Drag from an output terminal to a node's Update state, or to a component's input port. This creates a one-way relationship that sets the value.

An output cannot add to a Rate state, or set an Update that something else already sets. Konjugate says why when you try.

One step late, by design

Every node reads the others as they were at the start of each step. An FMU is no exception, so a connection between two nodes is one step late. This is why a loop of FMUs can always run without being solved iteratively. If the delay matters in your model, use a smaller step.

Choose the step

An FMU takes one step of its own for each substep of its node: the global step divided by the node's substeps.

Some FMUs work with a fixed internal step and are exact only when yours is a whole number of those. Some refuse any other step and others approximate. The Run dialog warns you when your step does not fit an FMU that declares its step, and offers one that does.

The Start run dialog warning that Dahlquist steps by 0.1 s inside while the run steps it by 0.15 s, with a button to use 0.1 s
The warning names the FMU and both steps. Nothing changes unless you press the button. The line under Run until offers the run the FMU suggests.

When an FMU suggests a stop time and step, the dialog offers them under Run until simulation time with a Use button.

Run and read the results

Press Run and Start. The FMU's outputs are ordinary states, so everything in exploring results applies to them.

The results tab of the controller node, plotting the command output over four hours
The controller's command: full power while the room warms, then a second push when the setpoint rises after an hour.

How Konjugate runs an FMU:

  • It is initialised at the start of the run with its inputs as they are then. Its outputs at that moment are the first sample.
  • Inputs are set before every step. A tunable parameter is set again only when its value changes.
  • A fixed parameter is set once. If what it reads changes during the run, the run stops and names the parameter.
  • Whole-number inputs take the nearest whole number and a Boolean input is true for anything other than 0.
  • Text, binary and clock variables and arrays are not connected. The FMU keeps its own values for them.
  • The FMU handles its own events inside each step. If it asks to end the simulation, its outputs keep their last values and the rest of your model carries on.

When a run stops

When an FMU refuses something, Konjugate shows why: which node, what was refused, what the FMU itself said and the value involved.

The Run stopped panel saying the FMU in Feedthrough refused the value given to Enumeration_input because 0 is not a legal value
Open the node takes you to the row to fix.

Common causes and fixes are listed in "FMUs from source and troubleshooting".

Keep the FMU with your project

By default a project keeps a copy of each FMU inside its own file, so it opens and runs on another computer. When you open such a project, any FMU your computer lacks is added to your library and the status line says so.

An FMU over 16 MB is linked instead: the project refers to the copy in your library, and anyone else running it needs the same FMU. The card switches between the two with Keep it in the project and Link to the library instead.

The project keeps the file exactly as it came, including only the binaries it already had.

Use a newer version

Replace FMU… on the card puts another FMU in the node's place, such as a newer export. The node keeps its name, its states and what each input reads, for the names the two FMUs share.

If you add a file that has the same internal identifier as one in your library but different contents, Konjugate keeps both, numbers the new one as a later version and says so. It never runs an old binary in place of your new file.

Switch off or remove

An FMU is switched off the same way as any node, with Disable node. A switched-off node is not run, so a project still works on a computer that lacks that FMU.

Settings › Providers lists the FMUs in your library, with the open model that uses each one.

The library list in Settings, with one FMU that no open model uses showing a Remove button and another marked as used
Only an FMU that no open model uses can be removed.

Deleting a node does not free its FMU straight away. While Undo or Redo can still bring the node back, the list says so and offers no Remove button. Close that project first. Removing an FMU never strips it out of a project file that already keeps it.

Limits

  • Co-Simulation only. Model Exchange and Scheduled Execution FMUs are not supported, nor is FMI 1.0.
  • A model with an FMU node in it cannot yet be exported as code or as an FMU.
  • An FMU that allows only one instance can be used by one node at a time.
  • An FMU that needs its original tool running beside it cannot run in Konjugate.

Try it yourself

The tutorial Bring in a controller from another tool, inside the app, walks through this with the controller above. See "Tutorials".

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

Comments