Specifying the Scalar Values Exchanged with the FMU
The FMU model exposes the scalar variables that are available for exchange in the co-simulation. These variables can represent input, output, parameter, or local variables, as defined by their causality.
- export single-value data to the FMU for it to use as input variables
- import output variables that are computed by the FMU and use them to set boundary conditions in the Simcenter STAR-CCM+ simulation
- set parameters that are used in the FMU model
- track the value of FMU local variables

- Co-simulation zones specify a set of Simcenter STAR-CCM+ model parts (boundaries or regions) that exchange data with the FMU. Values that are imported from the FMU through a co-simulation zone are stored as spatially-uniform fields that can be used to set boundary and region settings.
- Link value specifications are generally useful for exchanging general data that are not necessarily applied to the boundaries or regions. Values that are imported from the FMU through link specifications are stored as single values.
For more information, see FMU Link Reference.
To define the exchange quantities in Simcenter STAR-CCM+, you import the variable settings defined in the FMU. During import, Simcenter STAR-CCM+ automatically populates the relevant nodes (zone Exported Values and Imported Fields, or link Exported Values and Imported Values) based on the FMU input and output variables. Simcenter STAR-CCM+ also populates the Parameters and Tracked Values nodes, located under the node, based on the FMU parameters and local variables, respectively. As parameters and local variables only apply to the FMU, they are not exchanged through co-simulation zones.
To determine whether Simcenter STAR-CCM+ creates import and export specifications under co-simulation zones or under the link, you specify the naming convention that Simcenter STAR-CCM+ uses to parse the FMU variable names:
-
Select the
node and set
Variable Naming Convention to one of the following options:
- Flat—variable names are treated as a single flat string. Depending on the type of variable,
Simcenter STAR-CCM+ creates the following nodes:
FMU Variable Type Example Variable Name Simcenter STAR-CCM+ Imported/Exported Value Node Input component1.force Output component1.displacement Parameter component1.parameter1 Local Variable component1.local1 - Structured—variable names that contain a separator are treated as hierarchical names.
Simcenter STAR-CCM+ uses hierarchical names to create zones (parameter names, however, are always treated as flat strings). Depending on the type of variable,
Simcenter STAR-CCM+ creates the following nodes:
FMU Variable Type Example Variable Name Simcenter STAR-CCM+ Imported/Exported Value Node Input component1.force Output component1.displacement Parameter component1.parameter1 Local Variable component1.local1
- Flat—variable names are treated as a single flat string. Depending on the type of variable,
Simcenter STAR-CCM+ creates the following nodes:
-
If you selected the
Structured option, select the
[Imported Library] node and set the following properties:
Property Setting Name Parsing Direction To specify the direction for determining the hierarchy in variable names, choose either Forward (default) or Reverse. Hierarchy Separator Specify the character that defines the hierarchy separator (default is ".").
-
Right-click the
[Link 1] node and select
Import Settings.
Simcenter STAR-CCM+ populates the relevant nodes as described previously.
- Expand the boundary node of interest, .
- Select the node and set External Code Coupling Specification to the relevant co-simulation zone.
-
For each node under the
node:
- Select the [Imported Field] node and specify where the imported data is mapped by setting the Field Stencil property.
- Select the node and specify a constant initialization value.
- For each zone-imported field, Simcenter STAR-CCM+ creates a field function named Co-Simulation: [Field Name]. Use these field functions to set the relevant boundary conditions. For example, you can use imported displacements to set morphing specifications at boundaries.
-
For each node under the
node, select the corresponding
node and specify a constant initialization value.
Simcenter STAR-CCM+ stores the imported value with the name [Link 1].[FMU variable name]. You can reference this value when writing expressions.
- Expand the Exported Values node (either under the link or under a co-simulation zone).
-
For each
node, set
Value to the single-value quantity that you want to export to the FMU. Depending on the data type required by the FMU, use one of the following methods:
Data Type Method for Setting a Value in Simcenter STAR-CCM+ Integer Type an integer number. You cannot use an expression. Real Provide any expression that evaluates to a single value. As FMU variables are spatially-invariant, Simcenter STAR-CCM+ must export single-value data. To convert space-dependent fields to single-values, you can use reports. In Simcenter STAR-CCM+, all reports automatically generate a field function that returns the value of the report at each iteration. You can export this single-value field function to the FMU model. Although you can export any data type supported by FMU (real, integer, boolean, string, enumeration), you typically export scalar quantities of type real.
Enumeration Select an option from a drop-down menu (the FMU model description file contains enumeration type definitions that dictate the available methods) String Type the string. You cannot use an expression. Boolean Activate the checkbox for true, deactivate the checkbox for false. You can visualize the data type of any FMU variable and type definitions by expanding the relevant nodes under the imported library node:
-
Select the relevant
node and set the parameter value.
Depending on the parameter data type, you can specify the parameter value in different ways, using the same procedure outlined for exported values.
-
Click
(Run).
Simcenter STAR-CCM+ loads the FMI library and runs the co-simulation.