Professional Documents
Culture Documents
Description
You need to use DEFINE HET RXN RATE to specify reaction rates for heterogeneous reactions. A
heterogeneous reaction is one that involves reactants and products from more than one phase. Unlike
DEFINE VR RATE, a DEFINE HET RXN RATE UDF can be specified differently for different
heterogeneous reactions. During ANSYS FLUENT execution, the DEFINE HET RXN RATE UDF for
each heterogeneous reaction that is defined is called in every fluid cell. ANSYS FLUENT will use the
reaction rate specified by the UDF to compute production/destruction of the species participating in the
reaction, as well as heat and momentum transfer across phases due to the reaction.
A heterogeneous reaction is typically used to define reactions involving species of different phases. The
bulk phase can participate in the reaction if the phase does not have any species (i.e. phase has fluid
material instead of mixture material). Heterogeneous reactions are defined in the Phase Interaction dialog
box.
There are eight arguments to DEFINE HET RXN RATE: name, c, t, r, mw, yi, rr, and rr t.
You supply name, the name of the UDF. c, t, r, mw, yi, rr, and rr t are variables that
are passed by the ANSYS FLUENT solver to your UDF. Your UDF will need to set the
values referenced by the real pointer rr. The values must be specified in kmol m3 s (where
the volume is the cell volume).
Example
The following compiled UDF named user evap condens react defines the reaction rate
required to simulate evaporation or condensation on the surface of droplets. Such a
reaction can be formally described by the following:
Here, gas is a primary phase mixture of two species: H2O(gas) and air. Droplets constitute
the secondary phase and represent a mixture of one species - H2O(liq). Single-species mixtures are allowed
in multiphase models. The formulation for the reaction rate follows the model for particle evaporation that
is defined in Section 15.4.2: Droplet Vaporization (Law 2) in the separate Theory Guide.
#include "udf.h"
/*Constants used in psat_h2o to calculate saturation pressure*/
#define PSAT_A 0.01
#define PSAT_TP 338.15
#define C_LOOP 8
#define H2O_PC 22.089E6
#define H2O_TC 647.286
/*user inputs*/
#define MAX_SPE_EQNS_PRIM 2 /*total number of species in primary phase*/
#define index_evap_primary 0 /*evaporating species index in primary phase*/
#define prim_index 0 /*index of primary phase*/
#define P_OPER 101325 /*operating pressure equal to GUI value*/
/*end of user inputs*/
/*************************************************************/
/* UDF for specifying an interfacial area density */
/*************************************************************/
double psat_h2o(double tsat)
/* */
/* Computes saturation pressure of water vapor */
/* as function of temperature */
/* Equation is taken from THERMODYNAMIC PROPERTIES IN SI, */
/* by Reynolds, 1979 */
/* Returns pressure in PASCALS, given temperature in KELVIN */
{
int i;
double var1,sum1,ans1,psat;
double constants[8]={-7.4192420, 2.97221E-1, -1.155286E-1,
8.68563E-3, 1.094098E-3, -4.39993E-3, 2.520658E-3, -5.218684E-4};
task page.
Cell Zone Conditions
Select the appropriate zone in the Zone selection list of the Cell Zone Conditions
task page
and click the Edit... button to open the cell zone condition dialog box (e.g., the Fluid
dialog box, as shown in Figure 6.2.26).