Importing the FMI Library and Defining a Co-Simulation Link

To couple Simcenter STAR-CCM+ with an FMU model, you import the .fmu archive containing the FMI library in the Simcenter STAR-CCM+ simulation and connect to the FMU through a co-simulation link.

To import the library:
  1. Make sure that the FMU model is valid and properly defined.
    Importing an invalid or corrupted FMI library may result in severe errors and terminate Simcenter STAR-CCM+. As Simcenter STAR-CCM+ is 64-bit software, make sure that the FMI library is 64-bit.
To import the FMI library:
  1. In the Simcenter STAR-CCM+ simulation, select File > Import > Import User Library...
  2. In the Open dialog, navigate to the relevant .fmu file and click Open.
    Simcenter STAR-CCM+ extracts the content of the compressed .fmu file, including the modelDescription.xml that contains the FMU model details, to a new directory. The directory is created in the same location of the .fmu file.
    In the simulation, Simcenter STAR-CCM+ adds a library node under the User Libraries node. The name of the library node matches the name of the .fmu file.

  3. Expand the User Libraries > [Imported Library] node.
    During import, Simcenter STAR-CCM+ automatically loads the library and adds child nodes that represent the content of the FMU model. Only the [Imported Library] node has editable properties—the child nodes provide a convenient view of the information contained in the FMU modelDescription.xml file, including the FMU implementation details, the exposed variables, and type definitions.

    If required, you can close and reopen the library through the [Imported Library] node right-click menu. For more information, see FMI Library Reference.

    If required, you can also import multiple FMI libraries, these libraries can either be the same library or different ones. Import additional libraries by following the steps above or by right-clicking the User Libraries node and selecting New User Library.

You specify all co-simulation settings, including the scalar values that are exchanged with the FMU, in a link node under the External Links node. Simcenter STAR-CCM+ automatically creates a link of type FMI Library Import when you create the external continuum that represents the FMU (see Activating FMU Co-Simulation Models). If required, you can also create an FMU link through the [Imported Library] node right-click menu (see FMI Library Reference).

To point the link to the relevant FMI library:

  1. Select the External Links > [Link 1] > Conditions > FMI Resource Reference node and set FMI Library to the imported library.
    Simcenter STAR-CCM+ automatically sets the [Link 1] > Conditions > FMI Version node based on the information contained in the FMU.

    For each FMI library that you import into the simulation a new FMI Library Import link must be created in order for it to be used by the simulation, as each link can only contain the information of one FMI library.

Specify whether the Simcenter STAR-CCM+ simulation leads, lags, or runs simultaneously with the partner application. When you run the co-simulation, the leading simulation runs first, while the lagging simulation waits for data from the leading simulation. In general, you set the simulation that is less affected by the coupling to lead:
  1. Select the [Link 1] > Conditions > Concurrency Option node and set Method to either Lead, Lead, or Concurrent.
    For more information, see FMU Link Conditions and Values.
Define the frequency at which Simcenter STAR-CCM+ exchanges data with the FMU by specifying the time interval between exchange events:
  1. Select the [Link 1] > Conditions > Coupling Negotiation Option node and choose the method that Simcenter STAR-CCM+ uses to determine the coupling time.
    You can specify a time interval or you can use the simulation time-step as time interval for data transfer. For more information, see Coupling Negotiation Option.
  2. Select the [Link 1] > Values > Transfer Interval node and specify the desired time interval. Depending on the selected Coupling Negotiation Option, this option can be read-only.
Specify the strategy that Simcenter STAR-CCM+ uses to adjust the solver time-step:
  1. Select the [Link 1] > Conditions > Time-Step Adjustment Option node and specify how Simcenter STAR-CCM+ treats the simulation time-step when the remaining time that is required to meet the next coupling time is not an exact multiple of the simulation time-step.
    For details, see Time-Step Adjustment Option.