This section contains methods for hooking UDFs to Ansys Fluent that
have been defined using DEFINE
macros (described
in Multiphase DEFINE
Macros), and interpreted or
compiled using methods (described in Interpreting UDFs or Compiling UDFs), respectively.
For more information, see the following sections:
- 6.3.1. Hooking DEFINE_BOILING_PROPERTY UDFs
- 6.3.2. Hooking DEFINE_CAVITATION_RATE UDFs
- 6.3.3. Hooking DEFINE_EXCHANGE_PROPERTY UDFs
- 6.3.4. Hooking DEFINE_HET_RXN_RATE UDFs
- 6.3.5. Hooking DEFINE_LINEARIZED_MASS_TRANSFER UDFs
- 6.3.6. Hooking DEFINE_MASS_TRANSFER UDFs
- 6.3.7. Hooking DEFINE_VECTOR_EXCHANGE_PROPERTY UDFs
After you have interpreted (Interpreting UDFs) or compiled (Compiling UDFs) your DEFINE_BOILING_PROPERTY
UDF, the name of the function you supplied as a DEFINE
macro argument will become visible and selectable in the Boiling Model dialog box (Figure 6.84: The Boiling Model Dialog Box) in Ansys Fluent. Note that this type
of UDF can be applied only to the Eulerian multiphase boiling model.
To hook the UDF to Ansys Fluent:
In the Multiphase Model dialog box, select the Eulerian model (Models tab).
Setup → Models → Multiphase Edit...
In the Sub-Models group box, select Boiling Model.
Click
.In the Phase Interaction > Heat, Mass, Reactions > Mass tab, set the Number of Mass Transfer Mechanisms and select boiling from the Mechanism drop-down list. The Boiling Model dialog box will open where you can hook your boiling parameter UDFs, as shown in Figure 6.84: The Boiling Model Dialog Box.
Click Apply.
See
DEFINE_BOILING_PROPERTY
for details
about DEFINE_BOILING_PROPERTY
functions.
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.86: 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:
In the Multiphase Model dialog box, select the Mixture model (Models tab).
Setup → Models → Multiphase Edit...
Click Apply.
Enable the following text command:
solve/set/advanced/singhal-et-al-cavitation-model
.In the Phase Interaction > Heat, Mass, Reactions tab of the Multiphase Model dialog box, enable Singhal-Et-Al Cavitation Model (Figure 6.85: The Multiphase Model Dialog Box - Heat, Mass, Reactions Tab), and click .
Open the User-Defined Function Hooks dialog box (Figure 6.86: The User-Defined Function Hooks Dialog Box).
Parameters & Customization → User Defined Functions Function Hooks...
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.86: The User-Defined Function Hooks Dialog Box), and click .
Click Apply and close the Multiphase Model dialog box.
See
DEFINE_CAVITATION_RATE
for
details about DEFINE_CAVITATION_RATE
functions.
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:
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.
Important: For the Mixture model, make sure that you enable Slip Velocity in the Mixture Parameters group box (Models tab) in order to display the drag coefficient in the Forces tab of the Multiphase Model dialog box.
Click Apply.
In the Phase Interaction > Forces tab, select user-defined from the drop-down list for the corresponding exchange property (for example, for Coefficient (Drag Coefficient group box)).
In the User-Defined Functions dialog box that opens, select the function name (for example, custom_drag::libudf) from the list of UDFs (Figure 6.88: The User-Defined Functions Dialog Box) and click .
Click Multiphase Model dialog box.
and close the
See
DEFINE_EXCHANGE_PROPERTY
for details about
DEFINE_EXCHANGE_PROPERTY
functions.
After you have interpreted (Interpreting UDFs) or compiled (Compiling UDFs) your DEFINE_HET_RXN_RATE
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:
Select Species Transport from the Model list of the Species Model dialog box.
Setup → Models → Species Edit...
In the Multiphase Model dialog box, make a selection from the Model list.
Setup → Models → Multiphase Edit...
Click Apply.
Go to the Phase Interaction > Heat, Mass, Reactions > Reactions tab (Figure 6.89: The Multiphase Model Dialog Box - Reactions Tab).
Enter a nonzero number in the Total Number of Heterogeneous Reactions field.
Select the function name (for example, user_evap_condens_react::libudf) from the Reaction Rate Function drop-down list.
Click Multiphase Model dialog box.
and close the
See
DEFINE_HET_RXN_RATE
for details
about DEFINE_HET_RXN_RATE
functions.
After you have interpreted (Interpreting UDFs) or compiled
(Compiling UDFs) your
DEFINE_LINEARIZED_MASS_TRANSFER
UDF, the name of the function you
supplied as a DEFINE
macro argument will become visible and
selectable in the Phase Interaction tab of the Multiphase
Model dialog box.
To hook the UDF to Ansys Fluent:
Make a selection from the Model list of the Multiphase Model dialog box.
Setup → Models → Multiphase Edit...
Click Apply.
Go to the Phase Interaction > Heat, Mass, Reactions tab (Figure 6.90: The Multiphase Model Dialog Box - Heat, Mass, Reactions Tab).
Specify the Number of Mass Transfer Mechanisms greater than .
The Mechanism drop-down list will appear.
Select user-defined from the Mechanism drop-down list.
In the User-Defined Functions dialog box that opens (Figure 6.91: The User-Defined Functions Dialog Box), select the function name and click .
The UDF name will appear in the field below the Mechanism drop-down list in the Heat, Mass, Reactions tab of the Multiphase Model dialog box.
Click Multiphase Model dialog box.
and close the
See
DEFINE_LINEARIZED_MASS_TRANSFER
for details about
DEFINE_LINEARIZED_MASS_TRANSFER
functions.
After you have interpreted (Interpreting UDFs) or compiled
(Compiling UDFs) your
DEFINE_MASS_TRANSFER
UDF, the name of the function you supplied
as a DEFINE
macro argument will become visible and selectable in
the Phase Interaction > Heat, Mass, Reactions tab
of the Multiphase Model dialog box (Figure 6.90: The Multiphase Model Dialog Box - Heat, Mass, Reactions Tab).
To hook the UDF to Ansys Fluent:
Make a selection from the Model list of the Multiphase Model dialog box.
Setup → Models → Multiphase Edit...
Click Apply.
Go to the Phase Interaction > Heat, Mass, Reactions tab (Figure 6.90: The Multiphase Model Dialog Box - Heat, Mass, Reactions Tab).
Specify the Number of Mass Transfer Mechanisms greater than .
Select user-defined from the Mechanism drop-down list to open the User-Defined Functions dialog box (Figure 6.91: The User-Defined Functions Dialog Box).
Select the function name (for example, liq_gas_source::udf) and click .
The UDF name will appear in the field below the Mechanism drop-down list in the Heat, Mass, Reactions tab of the Multiphase Model dialog box.
Click Multiphase Model dialog box.
and close the
See
DEFINE_MASS_TRANSFER
for details about
DEFINE_MASS_TRANSFER
functions.
After you have interpreted (Interpreting UDFs) or compiled
(Compiling UDFs) your
DEFINE_VECTOR_EXCHANGE_PROPERTY
UDF, the name of the function you
supplied as a DEFINE
macro argument will become visible and
selectable in the User-Defined Functions dialog box (Figure 6.93: The User-Defined Functions Dialog Box) in Ansys Fluent.
To hook the UDF, select the name of your function in the appropriate drop-down list (such as Slip Velocity, Turbulent Dispersion, Blending Method for flow regime modelling).
For example, to hook the slip velocity UDF to Ansys Fluent:
Select Mixture from the Model list of the Multiphase Model dialog box and make sure that the Slip Velocity option is enabled.
Setup → Models → Multiphase Edit...
Click Apply.
Go to the Phase Interaction > Forces tab (Figure 6.92: The Multiphase Model Dialog Box - Force Tab).
In the Force Setup group box, select user-defined from the drop-down list for the Slip Velocity.
In the User-Defined Functions dialog box that opens automatically, select the function name (for example, custom_slip::libudf) from the list of UDFs displayed in the User-Defined Functions dialog box (Figure 6.93: The User-Defined Functions Dialog Box), and click .
Click Multiphase dialog box.
and close the
See
DEFINE_VECTOR_EXCHANGE_PROPERTY
for details about
DEFINE_VECTOR_EXCHANGE_PROPERTY
functions.