14.2. Coupling CFX to an External Solver: Functional Mock-up Interface (FMI) Co-simulation

Ansys CFX can run co-simulations using Functional Mock-up Interface (FMI) technology (http://fmi-standard.org/). In a co-simulation, the CFX-Solver interacts with a solver executable contained in a Functional Mock-up Unit (FMU) file (*.fmu). The CFX-Solver has two-way communication with the FMU solver via a user function of type Functional Mockup Unit Instance. This user function provides CEL access to:

  • FMU input variables

  • FMU input parameters

  • FMU output variables

To set up a co-simulation using Functional Mock-up Interface (FMI) technology:

  • Obtain an FMU file from third party software. The executable contained in the FMU file should be compatible with (compiled for) the operating system that will run the co-simulation.

  • With your case open in CFX-Pre, initialize the FMU file as described in Initialize FMU Instance in the CFX-Pre User's Guide. When the FMU file is initialized, a user function is created in the Outline tree view under Simulation > Expressions, Functions and Variables > User Functions with the Functional Mockup Unit Instance option selected.

  • Complete the function definition as described in Functional Mockup Unit Instance in the CFX-Pre User's Guide.

    In order to complete the function definition, you might need to create CEL expressions that can be used to supply values for FMU input variables and FMU input parameters.

  • Make use of the FMU output variables in your CFX case. For example, use an FMU output variable to control a conditional domain interface or an inlet temperature.

  • Recommended: Define expression monitors for the FMU input variables and output variables.