Documentation Home Page ◇ ePHASORSIM Home Page
Pour la documentation en FRANÇAIS, utilisez l'outil de traduction de votre navigateur Chrome, Edge ou Safari. Voir un exemple.
Create Single Component FMU
Page Content
Export FMU using FMUCreator
A FMU of a single component Modelica model can be created using the steps shown in the FMUCreator interface figure below.
Refer to FMUCreator section for detailed explanation. However, note the following to export FMU of a single component:
In the Resources section, click on Select Source and select the Modelica package file that contains the component model to be exported. The selected package must be created with following rules:
In Modelica code this file must be a package.
The package name either must be
OpalRT_Dev.mo
or contain_standalone
keyword as a suffix, for examplemyLIB_standalone.mo
.
The exported FMU name, which is used to import the FMU as discussed in Import Using Excel Template v2.0, depends on the Modelica compiler setting:
OpenModelica 1.9.1: The exported FMU name is the full address of the model inside the package. Example:
OpalRT_Electrical_Control_Excitation_ESST4B.win32.fmu
OpenModelica 1.16.2: The exported FMU name is the name of the model in the package. Example:
ESST4B.win32.fmu
Dymola: The exported FMU name is the name of the model in the package. Example:
ESST4B.win32.fmu
Notes:
Model file address as well as the FMU build directory address must not include any special characters.
A package with name
OpalRT_Dev.mo
or_standalone
as a suffix only supports Single Component FMU and not a GenUnit model inside it. Example: for a GenUnit model named GENROU_myEX and Single Component model myEX inside a package namedmyLIB_standalone.mo
, when imported in FMUCreator, GENROU_myEX will not appear in the Models/Classes window.If EPHASOR_DYMOLA_FMU license is not enabled in RT-LAB, the Dymola option is disabled. This means the FMU cannot be exported using Dymola; however, an already built Dymola FMU can still be used for the simulation.
Export FMU for windows using Modelica Tools
OpenModelica 1.9.1
Follow the steps below to export FMU of a single component directly from OpenModelica 1.9.1:
Load the Modelica package in the OpenModelica 1.9.1 and right click the component model to find the Export FMU option as shown in figure below,
The location where FMU is exported appears in the message browser window of the OpenModelica. The default location is
%userprofile%/AppData/Local/Temp/OpenModelica/OMEdit/
.Notice that the exported FMU name is the full address of the model inside the package. Make sure to use this exact name in the Excel Template to import data.
In order for ePHASORSIM to load the FMU, rename its extension from
.fmu
to.win32.fmu
OpenModelica 1.16.2
Follow the steps below to export FMU of a single component directly from OpenModelica 1.16.2:
Load the Modelica package in the OpenModelica 1.16.2.
In the Tools tab select Options as shown in the figure blow,
Navigate to the FMI tab as shown in the figure below,
Make sure to set version as 1.0 and Type to Model exchange as shown in the figure above,Type the required FMU name in the FMU Name field. If no custom name is provided, the default exported FMU name is the full address of the model inside the package.
In the Move FMU field if a custom path is provided, the OM 1.16.2 is found to discard the FMU Name field value and use the default name. Thus, to use a custom FMU name, leave the Move FMU field empty.
Right click the component model to find the Export → FMU option as shown in figure below,
The location where FMU is exported appears in the message browser window of the OpenModelica. The default location is
%userprofile%/AppData/Local/Temp/OpenModelica/OMEdit/
.
In order for ePHASORSIM to load the FMU, rename its extension from '.fmu' to '.win32.fmu'
Dymola
Follow the steps below to export FMU of a single component directly from Dymola:
Load the Modelica package and open the component model,
When the model is open, switch the tab from Modeling to Simulation at the bottom right,
Set the flag Advanced.EnableCodeExport = true using the command windows as shown below if the exported FMU will be used in a pc without Dymola licence,
In the Simulation tab under Translate select FMU to export FMU of the selected model as shown in the figure blow,
Type the required exported FMU name in the Model identifier field and make sure to set Type to Model exchange, version as 1.0 and Binaries to both 32 and 64-bit to export FMU for both architecture as shown in the figure below,
The exported FMU can be found the same directory of the loaded package,
In order for ePHASORSIM to load the FMU, rename its extension from
.fmu
to.win32.fmu
.
OPAL-RT TECHNOLOGIES, Inc. | 1751, rue Richardson, bureau 1060 | Montréal, Québec Canada H3K 1G6 | opal-rt.com | +1 514-935-2323
Follow OPAL-RT: LinkedIn | Facebook | YouTube | X/Twitter