7.4. Initialize FMU Instance

Creates a new, or re-initializes an existing, user function of type Functional Mockup Unit Instance (see Functional Mockup Unit Instance). This type of user function provides two-way data transfer capabilities for running a Functional Mock-up Interface (FMI) co-simulation involving CFX and a solver binary provided in a Functional Mock-up Unit (FMU) file.

To create a new function or re-initialize an existing function:

  1. Select Tools > Initialize FMU Instance.

    The Initialize FMU Instance dialog box appears.

  2. Select Create new function or Re-initialize existing function as appropriate.

  3. If you are creating a new function, specify the FMU file and a unique Function Name. If you are instead re-initializing an existing function, set Function Name to the name of the function that requires re-initialization and ensure that FMU File is set appropriately.

  4. If you are re-initializing an existing function and the FMU file has changed, or if you have specified a different FMU file, click Reload to read the file.

  5. Review the variables listed under FMU Input Variables (required). CFX will make the latest values of these variables available to the FMU during the co-simulation. Each variable holds a real number with applicable units.

  6. Under Select the FMU Parameter Variables to use, hold the Ctrl or Shift key while you click to multi-select parameters (constants). CFX will pass these parameters to the FMU once: at the start of a co-simulation. Each parameter holds a real number with applicable units.

  7. Under Select the FMU Output Variables to use, hold the Ctrl or Shift key while you click to multi-select FMU output variables. CFX will receive these variables from the FMU during the co-simulation. Each variable holds a real number with applicable units.

  8. If you select Edit CFX names for FMU variables with invalid CFX names then, if any of the input variables, selected parameters, or selected output variables has an invalid name for CFX (either due to having an unsupported character or due to having a name already in use), then, upon clicking OK or Apply, the Specify CFX Names For FMU Variables dialog box will appear, enabling you to edit the names.

  9. If you select View and edit CFX names for all FMU variables then, upon clicking OK or Apply, the Specify CFX Names For FMU Variables dialog box will appear, enabling you to edit the names.

  10. Click Apply to apply the settings of the Initialize FMU Instance dialog box, or click OK to both apply the settings and close the dialog box.

    The user function that was specified under Function Name is created or updated accordingly.

  11. Configure the applicable function details view. For details, see Functional Mockup Unit Instance.

For modeling details, see Coupling CFX to an External Solver: Functional Mock-up Interface (FMI) Co-simulation in the CFX-Solver Modeling Guide.