6.3.2. Hooking DEFINE_CAVITATION_RATE UDFs

After you have interpreted (Interpreting UDFs) or compiled (Compiling UDFs) your DEFINE_CAVITATION_RATE UDF, the name of the function you supplied as a DEFINE macro argument will become visible and selectable in the User-Defined Function Hooks dialog box (Figure 6.76: The User-Defined Function Hooks Dialog Box) in ANSYS Fluent. Note that cavitation rate UDFs can be applied only to the mixture multiphase model.

To hook the UDF to ANSYS Fluent, you will first need to open the Multiphase Model dialog box.

 Setup → Models → Multiphase   Edit...

Enable the Mixture model in the Multiphase Model dialog box and click OK.

Enter the solve/set/expert text command in the console and respond yes to “use Singhal-et-al cavitation model?” Then open the Phase Interaction dialog box.

 Setup → Models → Multiphase → Phases  Edit... → Interaction...

Figure 6.75:  The Phase Interaction Dialog Box

The Phase Interaction Dialog Box

Enable Singhal-Et-Al Cavitation Model in the Mass tab of the Phase Interaction dialog box (Figure 6.75: The Phase Interaction Dialog Box), and click OK.

Next, open the User-Defined Function Hooks dialog box (Figure 6.76: The User-Defined Function Hooks Dialog Box).

 Parameters & Customization → User Defined Functions  Function Hooks...

Figure 6.76:  The User-Defined Function Hooks Dialog Box

The User-Defined Function Hooks Dialog Box

To hook the UDF to ANSYS Fluent, select the function name (for example, c_rate::libudf) in the Cavitation Mass Rate drop-down list (Figure 6.76: The User-Defined Function Hooks Dialog Box), and click OK.

See DEFINE_CAVITATION_RATE for details about DEFINE_CAVITATION_RATE functions.


Release 18.2 - © ANSYS, Inc. All rights reserved.