[ANSYS, Inc. Logo] return to home search
next up previous contents index

6.2.16 Hooking DEFINE_PROPERTY UDFs

After you have interpreted (Chapter  4) or compiled (Chapter  5) your material property UDF, the name of the function you supplied as a DEFINE macro argument will become visible and selectable in ANSYS FLUENT.

There are various dialog boxes in which you can activate a DEFINE_PROPERTY UDF (e.g., Phase Interaction dialog box, Secondary Phase dialog box), and so the method for hooking it will depend on the property being defined. The following is an example of hooking a UDF that defines viscosity.

First, open the Materials task page.

figure Materials

Select the appropriate material from the Material selection list and click the Create/Edit... button to open the Create/Edit Materials dialog box (Figure  6.2.20).

Figure 6.2.20: The Create/ Edit Materials Dialog Box
figure

Next, open the User-Defined Functions dialog box (Figure  6.2.21) by choosing user-defined in the drop-down list for the appropriate property (e.g., Viscosity) in the Create/Edit Materials dialog box. Then select the function name (e.g., cell_viscosity::libudf) from the list of UDFs displayed in the User-Defined Functions dialog box and click OK. The name of the function will subsequently be displayed under the selected property in the Create/Edit Materials dialog box.

Figure 6.2.21: The User-Defined Functions Dialog Box
figure

figure   

If you plan to define density using a UDF, note that the solution convergence will become poor as the density variation becomes large. Specifying a compressible law (density as a function of pressure) or multiphase behavior (spatially varying density) may lead to divergence. It is recommended that you restrict the use of UDFs for density to weakly compressible flows with mild density variations.

See Section  2.3.16 for details about DEFINE_PROPERTY functions.


next up previous contents index Previous: 6.2.15 Hooking DEFINE_PROFILE UDFs
Up: 6.2 Hooking Model-Specific UDFs
Next: 6.2.17 Hooking DEFINE_SCAT_PHASE_FUNC UDFs
Release 12.0 © ANSYS, Inc. 2009-01-14