Adding Coupling Interfaces and Data Transfers

When a coupling interface and data transfers are added to the co-simulation, an FMU participant's information is populated to the data model from the participant's .fmu file.

Adding a Coupling Interface

To add a coupling interface that includes an FMU participant, select one of the following options:

  • Use the Add Coupling Interface context menu option.

  • Run the AddInterface() command, using internal object names as arguments to specify the participants be included in the interface.


Note:  For information on naming conventions and restrictions for participant objects, see FMU CouplingParticipant Data Model Settings..


Adding Data Transfers

To add a data transfer that includes an FMU participant, select one of the following options:

  • Use the Add Data Transfer context menu option.

  • Run the AddDataTransfer() command, specifying the interface, the target side of the transfer, and variables or parameters to be associated with each side of the interface

To create a two-way data transfer on an interface, you must use the context menu option or run the AddDataTransfer() command twice, once for each direction.

Data transfers can only occur when the source and target variables are of the same data type (that is, real-to-real, integer-to-integer, etc.). Given that Ansys participants can send/receive real-valued variables, only variables with a DataType of Real can be sent in an FMU-to-Ansys participant transfer.


Note:  For information on naming conventions and restrictions for variable and parameter objects, see Variable (object) and FMUParameter (object), respectively.


Example 58: Add a coupling interface and a data transfer with an Ansys participant and an FMU participant in the CLI


>>> interface = AddInterface(SideOneParticipantName = "FLUENT-1",
      SideOneRegionNames = ["Volume5"],
      SideTwoParticipantName = "FMU-2", 
      )
														 
>>> AddDataTransfer(Interface = interface,
      TargetSide = "One",
      SideOneVariable = "Temperature",
      SideTwoVariable = "Real_0"
      )
 
 

Example 59: Add a coupling interface and two data transfers with two FMU participants in the CLI

 

 >>> interface = AddInterface(SideOneParticipantName = "FMU-1",                   			      
      SideTwoParticipantName = "FMU-2", 
      ) 

>>> AddDataTransfer(Interface = interface,
      TargetSide = "One",
      SideOneVariable = "Real_3",
      SideTwoVariable = "Real_1"
      )

>>> AddDataTransfer(Interface = interface,
      TargetSide = "Two",
      SideOneVariable = "Integer_0",
      SideTwoVariable = "Integer_0"
      )