FMU Co-Simulation

Simcenter STAR-CCM+ allows you to import Functional Mock-up Unit (FMU) models for co-simulation. An FMU is a time-dependent model, typically representing a dynamic network, that is written according to the Functional Mock-up Interface (FMI) standard. The FMI standard is a software-independent standard that provides an interface for coupling simulation software.

For details on the FMI standard and FMU implementation, refer to the official website https://fmi-standard.org.

Overview

In general, FMUs are generated automatically from a simulation package, although they can be created or modified manually. A list of software that can import and export FMUs is available at https://fmi-standard.org/tools/.

Simcenter STAR-CCM+ can import co-simulation type FMUs that are based on either version 1.0 or 2.0 of the FMI standard. FMUs that are based on this standard contain the model definition and the required solvers, or contain a communication module to an external application that provides the required solvers. Simcenter STAR-CCM+ does not support Model Exchange type FMUs.

The primary scope of FMU import in Simcenter STAR-CCM+ is co-simulation with an external simulation package which solves for the model defined in the FMU. However, you can also import FMUs that do not require an external simulator for computation of the solution. In this case, you can use Simcenter STAR-CCM+ as an interface to the imported FMU.

In a co-simulation with FMU, Simcenter STAR-CCM+ communicates with partner software through an imported library that implements a physical model and exposes an interface based on the FMI standard. This library is created in the partner software and typically represents a time-dependent system, or a component of a time-dependent system, that is simulated by the partner solver. In general, the partner software provides the solvers required by the FMU. Simcenter STAR-CCM+:
  • acts as an interface to the FMU, allowing you to modify parameters and variables that are exposed in the FMU
  • exchanges data with the imported FMU for co-simulation with the partner software

FMU Files

An FMU is distributed as a compressed folder with .fmu extension. The folder contains files of various formats that define the model behavior and variables, including the quantities that are exchanged with Simcenter STAR-CCM+. These files include:
  • FMI definition file in the XML format (modelDescription.xml) that contains the general static information for the FMU, including the implementation details, the model scalar variables, and type definitions. Simcenter STAR-CCM+ provides a convenient node-tree representation of this file that you can use to check the FMU model details:

  • Any libraries required by the FMU, including binaries for the relevant target machines, such as Windows dynamic link libraries (.dll) and Linux shared object libraries (.so). The FMU can contain the required solvers, or modules for communicating with an external software that simulates the model. The FMI standard is independent of the target simulator.
  • Any additional files required by the FMU (for example, tables of data)

For details, see https://fmi-standard.org.

FMU Variables

The FMU variables define the scalar quantities that can be exchanged with Simcenter STAR-CCM+ during co-simulation. As the FMI standard does not allow for spatially-varying quantities, all variables represent spatially-invariant scalar values (rather than spatially-varying scalar fields).

In the modelDescription.xml file, contained in the .fmu folder, the details and behavior of each scalar variable are defined through the attributes of the corresponding <ScalarVariable> element. The causality attribute determines whether the variable represents a parameter, a quantity that can be imported in the FMU from an external application (input), or exported to an external application from the FMU (output).

During co-simulation with Simcenter STAR-CCM+, input variables are computed in Simcenter STAR-CCM+ and exported to the FMU. Output variables are computed in the FMU and imported in Simcenter STAR-CCM+, where you can use them to set boundary conditions. The FMU model parameters can be adjusted in Simcenter STAR-CCM+.

For more information and details on FMU variables and their attributes, see https://fmi-standard.org.

Data Types

Simcenter STAR-CCM+ supports all the data types allowed by the FMI standard:
  • Real
  • Integer
  • Boolean
  • String
  • Enumeration

In the modelDescription.xml file, the data type of each scalar variable is defined by a child element. The attributes of this child element specify additional information such as minimum and maximum values, and units. For the enumeration data type, the available items are defined under the <TypeDefinitions> element.