The Xentara FMU Driver v1.2
User Manual
Functional Mock-up Units
See also
FMI Standard, I/O Components in the Xentara user manual, Inputs, Outputs, Parameter

The Xentara FMU plugin makes use of the Functional Mock-up Interface (FMI 2.0), which defines a standardized interface for use in computer simulations to develop complex cyber-physical systems. The plugin only supports FMI 2.0 Co-Simulation from the two flavors (Co-Simulation & Model Exchange) of Functional Mock-up Units under the Functional Mock-up Interface (FMI) standard.

FMU components

Each FMU (Functional Mock-up Unit) is distributed in a zip file with the extension ".fmu" which contains

  • an XML file containing among other things the definition of the variables used by the FMU;
  • all the equations used by the model (defined as a set of C functions). These C functions can either be provided in source and/or binary form. The Xentara FMU plugin uses binary form.
  • optional other data, such as parameter tables, user interface, documentation which may be needed by the model.

Model Description

All information about an FMU's functionality is stored in the text file modelDescription.xml in XML format as mentioned in the previous section. This file specifically stores the FMU variables and their attributes such as name, unit, start value, and so on. This XML file also contains the definition of all variables (Inputs, Outputs, Parameter and more) of the FMU in a standardized way. These variables from the XML files are used to configure the xentara model json file.

Path

The modelPath configuration parameter in the xentara json model file must contain an absolute or relative path to the unzipped FMU file.

Under Linux, the Xentara FMU driver looks for FMU model in the xentara default directories. The following directories are searched in order:

  • ${HOME}/.local/share/xentara/fmu
  • /usr/local/share/xentara/fmu
  • /usr/share/xentara/fmu

For Windows, Xentara FMU driver will look for FMU in the following directories:

  • %LOCALAPPDATA%\Xentara\Fmu
  • %ProgramData%\Xentara\Fmu

Simulate the FMU

See also
Scheduling Tasks, Tasks in the Xentara user manual

The Xentara FMU driver must perform the calculation step for the simulation. For that, a task called step is inserted into a Xentara execution pipeline to perform the calculations by taking the current Inputs and generating the Outputs.

In the Xentara operational stage, the step task uses the logic built into the FMU model to calculate the Outputs from the generated Inputs.

Task
stepComputation of the model for the time steps

Accessing FMU

See also
Accessing Xentara Elements in the Xentara user manual

In addition to the standard members of Xentara I/O Component, FMU have the following attributes:

Attributes
keyThe FMU’s primary key.
nameThe FMU’s name. The name is the last component of the primary key.
UUIDThe unique UUID of the FMU.
typeThe FMU’s element type. For FMUs, this is always “FMU”.
categoryThe FMU’s category. For FMUs, this is always “microservice”.
modelNameThe name of the FMU model in simulation.
modelGuidThe unique Guid of the FMU model in simulation.
errorThe error that occurred during the last step of the simulation. The attribute contains one of the error numbers listed in FMU Driver Error Numbers.
errorMessagesThe error message based on the FMU Driver Error Numbers.