You can use DEFINE_SOOT_OXIDATION_RATE to specify a user-defined soot oxidation rate. The UDF is available
only if the Moss-Brookes or the Moss-Brookes-Hall soot model is enabled.
DEFINE_SOOT_OXIDATION_RATE (name, c, t, Pollut, Pollut_Par, Soot, soot_oxi_rate)
|
Argument Type |
Description |
|---|---|
|
|
UDF name |
|
|
Cell index |
|
|
Pointer to cell thread on which the Soot oxidation rate is to be applied |
|
|
Pointer to the data structure that contains the common data at each cell |
|
|
Pointer to the data structure that contains auxiliary data |
|
|
Pointer to the data structure that contains data specific to the Soot model |
|
|
Array to return the soot oxidation rates |
Function returns
void
There are seven arguments to DEFINE_SOOT_OXIDATION_RATE: name, c, t, Pollut, Pollut_Par, Soot, and soot_oxi_rate. You supply name, the name of the UDF.
Variables c, t, Pollut, Pollut_par, Soot, and soot_oxi_rate are
passed by the ANSYS Fluent solver to your function. A DEFINE_SOOT_OXIDATION_RATE function does not output a value. The calculated soot oxidation
rates will be stored in the array soot_oxi_rate.
The soot oxidation rate consists of explicit and implicit parts and can be expressed as follows:
where A is an explicit part of the oxidation rate that can be
a function of any variable(s) other than soot mass fraction and soot
nuclei concentration, and B is an implicit part of the oxidation rate
that represents terms involving soot mass fraction and soot nuclei
concentration. The term A is stored as the first element of the soot_oxi_rate array, while the term B is stored as the
second element of the array.
The units of oxidation rate are kg/m3/s
The following compiled UDF, named user_soot_oxid_rate, is used to provide the user-defined oxidation rate.
/*********************************************************************
User defined Soot oxidation Rate: Fenimore-Jones soot oxidation model
*********************************************************************/
#include "udf.h"
#include "sg_pollut.h"
#define NNORM 1.e+15
#define soot_dens 1800
#define c_omega 105.8125 /*kg-m-kmol-1 K^-1./2. S^-1, oxidation model constant*/
#define coleff 0.04 /*collisional*/
#define oxid_const 0.015 /*oxidation rate scaling parameter*/
/*user defined soot oxidation rates to be filled in array "soot_oxi_rate"*/
/*User defined Soot oxidation rate has to be in following form:
Rate = A*B, Where B is function of soot mass fraction and/or soot nuclie and A is function of any
variables other than soot mass fraction and nuclei. This break is done to apriori store the soot
formation rates in PDF tables*/
/* Store the computed soot oxidation rate inside the UDF as: */
/* soot_oxi_rate[0] = A; */ /*Linear part*/
/* soot_oxi_rate[1] = B; */ /*Nonlinear part*/
/*Following UDF is implementation of Fenimore-Jones soot oxidation model using UDF*/
DEFINE_SOOT_OXIDATION_RATE(user_soot_oxid_rate,c,t,Pollut,Pollut_Par,Soot,soot_oxi_rate)
{
real term1;
real oh_conc;
real temp = Pollut->fluct.temp;
real rho = POLLUT_GASDEN(Pollut);
real onethird = 1./3.;
real twothird = 2./3. ;
real soot_yi,nuc;
real o_eq=0.;
oh_conc = get_oheq(Pollut, Soot->oh_mode, o_eq)*1.e-03; /*kmol/m3*/
term1 = sqrt(temp)*pow(M_PI*NNORM, onethird)*pow(6./soot_dens, twothird);
soot_oxi_rate[0] = c_omega*coleff*oxid_const*oh_conc*rho*term1;
if(NNULLP(t)) /*This check is must*/
{
soot_yi = C_POLLUT(c,t,EQ_SOOT);
nuc = C_POLLUT(c,t,EQ_NUCLEI);
soot_oxi_rate[1] = pow(nuc, onethird)*pow(soot_yi,twothird);
}
}
After the UDF that you have defined using DEFINE_SOOT_OXIDATION_RATE is compiled (Compiling UDFs), the name
of the argument that you supplied as the first DEFINE macro argument (for example, user_soot_oxid_rate) will become visible and selectable in the User-Defined
Oxidation Rate drop-down list of the Soot Model dialog box in ANSYS Fluent. See Hooking DEFINE_SOOT_OXIDATION_RATE UDFs for details.