You can use DEFINE_BOILING_PROPERTY to model the boiling model parameters and the quenching model correction.
The parameters include the Bubble Departure Diameter, Frequency of Bubble Departure, Nucleation
Site Density, Area Influence Coeff., and Liquid Reference Temperature for quenching
correction.
DEFINE_BOILING_PROPERTY (name, f, t, c0, t0, from_phase_index, from_species_index, to_phase_index, to_species_index)
Important: As with all the other user-defined functions, all of the arguments
to this DEFINE macro must be placed on the
same line in your source code. Splitting the DEFINE statement onto several lines will result in a compilation error.
|
Argument Type |
Description |
|---|---|
|
|
UDF name. |
|
|
Index that identifies a wall face. |
|
|
Pointer to the wall face thread. |
|
|
Cell index that identifies the cell next to the wall. |
|
|
Pointer to mixture-level cell thread. |
|
|
Liquid phase in boiling models. |
|
|
ID of liquid species (ID=-1 if no mixture material). |
|
|
Vapor phase in boiling models. |
|
|
ID of vapor species (ID=-1 if no mixture material). |
Function returns
real
There are nine arguments to DEFINE_BOILING_PROPERTY: name, f, t, c0, t0, from_phase_index, from_species_index, to_phase_index, and to_species_index. You supply name, the name of the UDF.
The remaining eight variables are passed by the ANSYS Fluent solver to
your UDF. The defined UDF will return the desired real value for a specific model parameter.
Important: Note that the arguments from_species_index and to_species_index are relevant for multiphase
species transport problems only, and only if the respective phase
has a mixture material associated with it.
The following UDF named bubble_depart_dia, demonstrates how the bubble diameter is computed. All other boiling
parameters can use this example and can be modified accordingly.
/***********************************************************************
UDF that demonstrates how to compute the bubble diameter based on tolubinski-kostanchuk.
Can be interpreted or compiled.
************************************************************************/
#include "udf.h"
#define d_bw_max 0.0014
#define d_bw_coef 0.0006
#define subcool_ref 45.0
DEFINE_BOILING_PROPERTY(bubble_depart_dia,f,t,c0,t0,from_index,from_species_index,to_index,to_species_index)
{
real diam_b, subcool;
int liq_phase = from_index;
Thread **pt0 = THREAD_SUB_THREADS(t0);
real T_SAT = C_STORAGE_R(c0,t0,SV_SAT_TEMPERATURE);
real T_l = C_T(c0, pt0[liq_phase]);
subcool = T_SAT - T_l;
diam_b = MIN(d_bw_max,d_bw_coef*exp(-subcool/subcool_ref));
return diam_b;
}
After the UDF that you have defined using DEFINE_BOILING_PROPERTY is interpreted (Interpreting UDFs)
or compiled (Compiling UDFs), the name
of the argument that you supplied as the first DEFINE macro argument (for example, bubble_depart_dia) will become visible and selectable in the Boiling Models dialog box in ANSYS Fluent. See Hooking DEFINE_BOILING_PROPERTY UDFs for details.