After you have interpreted (Interpreting UDFs) or compiled (Compiling UDFs) your DEFINE_DIFFUSIVITY UDF, the name of the function you supplied as a DEFINE macro argument will become visible and selectable in ANSYS Fluent.
To hook the UDF to ANSYS Fluent, first open the Materials task page.
Setup →
Materials
Make a selection in the Materials list and click the Create/Edit... button to open the appropriate Create/Edit Materials dialog box (Figure 6.18: The Create/Edit Materials Dialog Box).
You then have the following options:
To hook a mass diffusivity UDF for the species transport equations, select user-defined from the Mass Diffusivity drop-down list of the Create/Edit Materials dialog box (Figure 6.18: The Create/Edit Materials Dialog Box). The User-Defined Functions dialog box (Figure 6.19: The User-Defined Functions Dialog Box) will open.
Select the name of your UDF (for example, mean_age_diff::libudf) and click in the User-Defined Functions dialog box. The name will then be displayed in the field below the Mass Diffusivity drop-down list in the Create/Edit Materials dialog box. Click Change/Create to save your settings.
To hook a single diffusion coefficient UDF so that it applies to all UDS equations, first set the number and options of the user-defined scalars using the User-Defined Scalars dialog box.
Parameters & Customization → User Defined Scalars
New...
Then, select user-defined from the UDS Diffusivity drop-down list in the Create/Edit Materials dialog box (Figure 6.20: The Create/Edit Materials Dialog Box).
Next, select the name of your UDF (for example, mean_age_diff::libudf) in the User-Defined Functions dialog box that opens (Figure 6.19: The User-Defined Functions Dialog Box) and click . The name will then be displayed in the field below the UDS Diffusivity drop-down list in the Create/Edit Materials dialog box. Click Change/Create to save your settings.
See
DEFINE_DIFFUSIVITY
for details
about defining DEFINE_DIFFUSIVITY UDFs and
the User's Guide for general information about UDS diffusivity.