After you have interpreted (Interpreting UDFs) or compiled (Compiling UDFs) your DEFINE_EXCHANGE_RATE UDF, the name of the function you supplied as a DEFINE macro argument will become visible and selectable in ANSYS Fluent.
To hook an exchange property UDF to ANSYS Fluent, first open the Multiphase Model dialog box.
Setup → Models → Multiphase
Edit...
Customized mass transfer UDFs can be applied to VOF, Mixture, and Eulerian multiphase models. Drag coefficient UDFs can be applied to Mixture and Eulerian models, while heat transfer and lift coefficient UDFs can be applied only to the Eulerian model. Select the appropriate model from the Model list in the Multiphase Model dialog box and click .
Important: Make sure that you enable Slip Velocity in the Mixture Parameters group box in the Multiphase Model dialog box in order to display the drag coefficient for the Mixture model.
Next, open the Phase Interaction dialog box (Figure 6.77: The Phase Interaction Dialog Box).
Setup → Models → Multiphase → Phases
Edit... → Interaction...
Click the appropriate tab (for example, Drag) in the Phase Interaction dialog box, and select user-defined from the drop-down list for the corresponding exchange property (for example, Drag Coefficient) that you desire. This will open the User-Defined Functions dialog box.
Select the function name (for example, custom_drag::libudf) from the list of UDFs displayed in the User-Defined Functions dialog box (Figure 6.78: The User-Defined Functions Dialog Box) and click . The function name will then be displayed in a field under the exchange property in the Phase Interaction dialog box. Click to close the Phase Interaction dialog box.
See
DEFINE_EXCHANGE_PROPERTY
for
details about DEFINE_EXCHANGE_PROPERTY functions.