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
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
context menu option.Use the Add Ordered Data Transfers context menu option to add all possible data transfers between two FMUs.
Run the AddDataTransfer() command.
Run the AddOrderedDataTransfers() command.
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 data transfers with two FMU participants in the CLI
>>> interface = AddInterface(SideOneParticipantName = "FMU-1", SideTwoParticipantName = "FMU-2", ) >>> AddOrderedDataTransfers(Interface = "interface") ['Real_1', 'Real_2', 'Real_3']