After you have interpreted (Interpreting UDFs) or compiled (Compiling UDFs) your DEFINE_RW_FILE or DEFINE_RW_HDF_FILE UDF, it is ready
to be hooked to ANSYS Fluent. Note that you can hook multiple read/write
file UDFs to your model, if desired.
To hook the UDF to ANSYS Fluent, open the User-Defined Function Hooks dialog box (Figure 6.11: The User-Defined Function Hooks Dialog Box).
Parameters & Customization → User Defined Functions
Function Hooks...
You have the choice of hooking a UDF to read and write a case and data file. Below is a description of what each function does.
Read Case is called when you read a case file into ANSYS Fluent. It will specify the customized section that is to be read from the case file.
Read HDF5 Case is called when you read an HDF-formatted case file into ANSYS Fluent. It will specify the customized section that is to be read from the case file.
Write Case is called when you write a case file from ANSYS Fluent. It will specify the customized section that is to be written to the case file.
Write HDF5 Case is called when you write an HDF-formatted case file from ANSYS Fluent. It will specify the customized section that is to be written to the case file.
Read Data is called when you read a data file into ANSYS Fluent. It will specify the customized section that is to be read from the data file.
Read HDF5 Data is called when you read an HDF-formatted data file into ANSYS Fluent. It will specify the customized section that is to be read from the data file.
Write Data is called when you write a data file from ANSYS Fluent. It will specify the customized section that is to be written to the data file.
Write HDF5 Data is called when you write an HDF-formatted data file from ANSYS Fluent. It will specify the customized section that is to be written to the data file.
To hook a read case file UDF, for example, click the Edit... button next to Read Case to open the Read Case Functions dialog box (Figure 6.12: The Read Case Functions Dialog Box).
Select the function(s) you want to hook to your model from the Available Read Case Functions list. Click Add and then to close the dialog box. The name of the function you selected will be displayed in the Read Case field of the User-Defined Function Hooks dialog box. If you select more than one function, the number will be displayed (for example, 2 selected). Click in the User-Defined Function Hooks dialog box to apply the settings.
See
DEFINE_RW_FILE
and
DEFINE_RW_HDF_FILE
for details about defining DEFINE_RW_FILE and DEFINE_RW_HDF_FILE functions.