2.4.1.  DEFINE_BOILING_PROPERTY

2.4.1.1. Description

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.

2.4.1.2. Usage

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

symbol name

UDF name.

face_t f

Index that identifies a wall face.

Thread *t

Pointer to the wall face thread.

cell_t c0

Cell index that identifies the cell next to the wall.

Thread *t0

Pointer to mixture-level cell thread.

int from_phase_index

Liquid phase in boiling models.

int from_species_index

ID of liquid species (ID=-1 if no mixture material).

int to_phase_index

Vapor phase in boiling models.

int to_species_index

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.


2.4.1.3. Example

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;
 }

2.4.1.4. Hooking a Boiling Property UDF to ANSYS Fluent

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.


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