> For the complete documentation index, see [llms.txt](https://www.opal-rt.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.opal-rt.com/docs/rt-lab/model-and-simulation/phasor-domain-with-ephasorsim/integrate-a-power-system-model-to-ephasorsim/include-fmu-components/export-fmus.md).

# Export FMUs

## Introduction

FMUs can be generated either by using the automation scripts included with the **ePHASORSIM Modelica Library** or manually from a supported Modelica development environment.

**Using the provided scripts is the recommended workflow.** The scripts automatically configure the export process, generate **FMI 1.0-compliant FMUs**, and ensure compatibility with the Modelica Standard Library version supported by ePHASORSIM. This approach reduces the risk of configuration errors and provides a consistent workflow across supported Modelica tools.

Manual FMU export remains available directly from **OpenModelica** and **Dymola** when a manual export workflow is required.

{% hint style="danger" %}
The legacy FMUCreator is no longer available as of version 2026.4. The FMUCreator available in prior versions is not compatible with the ePHASORSIM Modelica Library available on GitHub.
{% endhint %}

## Via scripts (recommended)

The **recommended method** for generating FMUs is to use the automation scripts provided with the **ePHASORSIM Modelica Library**. These scripts simplify the export process and ensure that the generated FMUs are compatible with ePHASORSIM by using the required **Modelica Standard Library 4.0.0** and **FMI 1.0** settings.

The scripts, supporting documentation, and example workflows are available in the **ePHASORSIM Modelica Library** GitHub repository.

## Export FMU for Windows using Modelica Tools <a href="#export-fmu-for-windows-using-modelica-tools" id="export-fmu-for-windows-using-modelica-tools"></a>

### OpenModelica <a href="#openmodelica-1.16.2" id="openmodelica-1.16.2"></a>

To export an FMU from OpenModelica:

1. Launch OpenModelica using the `launch_openmodelica.sh` script provided with the **ePHASORSIM Modelica Library**. This automatically loads the required libraries and dependencies.
2. Open **Tools → Options** and navigate to the **FMI** tab.

<figure><img src="https://96827845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNRdpSk8kjn20gXAexnt6%2Fuploads%2Fgit-blob-81821bad302c7eea05f86b67da240a4c5a0a6276%2Feph-export-fmu-openmodelica1.png?alt=media" alt=""><figcaption></figcaption></figure>

3. Set: **Version** = `1.0` and **Type** = `Model exchange`
4. Optionally specify a custom FMU name.
   * If the **Move FMU** field is used, OpenModelica 1.16.2 ignores the custom FMU name and reverts to the default model name.
   * To preserve a custom FMU name, leave **Move FMU** empty.

<figure><img src="https://96827845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNRdpSk8kjn20gXAexnt6%2Fuploads%2Fgit-blob-dfbfe81dd609f65ec78495f485e4f4849dde67a6%2Feph-export-fmu-openmodelica2.png?alt=media" alt=""><figcaption></figcaption></figure>

5. Right-click the model and select **Export → FMU**.

<figure><img src="https://96827845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNRdpSk8kjn20gXAexnt6%2Fuploads%2Fgit-blob-f228f4d06eabcaaf178051dff485f7235e25a409%2Feph-export-fmu-openmodelica3.png?alt=media" alt=""><figcaption></figcaption></figure>

6. After export, locate the generated FMU. The default location is: `%userprofile%/AppData/Local/Temp/OpenModelica/OMEdit/`

<figure><img src="https://96827845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNRdpSk8kjn20gXAexnt6%2Fuploads%2Fgit-blob-667b3b05be7b4814f5bef797c99b12341a6f9bb0%2Feph-export-fmu-openmodelica4.png?alt=media" alt=""><figcaption></figcaption></figure>

7. Rename the FMU extension from `.fmu` to `.win32.fmu` before using it with ePHASORSIM.

### Dymola

To export an FMU from Dymola:

1. Launch Dymola using the `launch_dymola.sh` script provided with the **ePHASORSIM Modelica Library**.
2. Open the model and switch to the **Simulation** tab.
3. If the FMU will be deployed on a workstation without a Dymola license, enable code export by setting the flag **`Advanced.EnableCodeExport = true`**

<figure><img src="https://96827845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNRdpSk8kjn20gXAexnt6%2Fuploads%2Fgit-blob-6f73ffcb9250b65ffaec293e876fc468a2d4b3a4%2Feph-export-fmu-dymola1.png?alt=media" alt=""><figcaption></figcaption></figure>

4. Under **Simulation → Translate**, select **FMU**.

<figure><img src="https://96827845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNRdpSk8kjn20gXAexnt6%2Fuploads%2Fgit-blob-e866bc49c02eb8152ea4a4166f1f37d3feb3763c%2Feph-export-fmu-dymola2.png?alt=media" alt=""><figcaption></figcaption></figure>

5. Configure the export settings as follows:

* **Model Identifier**: Desired FMU name
* **Type**: `Model exchange`
* **Version**: `1.0`
* **Binaries**: `32-bit and 64-bit`

<figure><img src="https://96827845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNRdpSk8kjn20gXAexnt6%2Fuploads%2Fgit-blob-3d8cb5b767f2848c8d8f1d6821ead158c71ebff0%2Feph-export-fmu-dymola3.png?alt=media" alt=""><figcaption></figcaption></figure>

6. Export the FMU.
7. The generated FMU is saved in the same directory as the loaded Modelica package.
8. Rename the FMU extension from `.fmu` to `.win32.fmu` before using it with ePHASORSIM.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://www.opal-rt.com/docs/rt-lab/model-and-simulation/phasor-domain-with-ephasorsim/integrate-a-power-system-model-to-ephasorsim/include-fmu-components/export-fmus.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
