You can use DEFINE_SOOT_PRECURSOR to
specify a user-defined concentration of soot precursor. During execution,
the DEFINE_SOOT_PRECURSOR is called at the
time of calculating the average soot source terms. The UDF is only
available if the Moss Brookes soot model is enabled.
DEFINE_SOOT_PRECURSOR (name, c, t, Pollut, Pollut_Par, Soot)
|
Argument Type |
Description |
|---|---|
|
|
UDF name |
|
|
Cell index |
|
|
Pointer to cell thread on which the Soot precursor 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 |
Function returns
real
There are six arguments to DEFINE_SOOT_PRECURSOR: name, c, t, Pollut, Pollut_Par, and Soot. You supply name, the name of the UDF. Variables c, t, Pollut, Pollut_par, and Soot are passed by the ANSYS Fluent solver to your function.
A DEFINE_SOOT_PRECURSOR function returns
the soot precursor concentration in kg-mol/m3.
The following compiled UDF, named user_soot_prec is used to provide the user-defined soot precursor concentration
in kg-mol/m3.
/*******************************************************
User Defined Soot precursor concentration:
Return molar concentration of soot precursor in kg-mol/m3
C2H2 is used as precursor
*******************************************************/
DEFINE_SOOT_PRECURSOR(user_soot_prec,Pollut,Pollut_Par,Soot)
{
real xmol_prec;
real rho = POLLUT_GASDEN(Pollut);
real c2h2_mol_wt =26;
xmol_prec = rho*MAX(0., Pollut->fluct.yi[C2H2])/c2h2_mol_wt;
return xmol_prec;
}
After the UDF that you have defined using DEFINE_SOOT_PRECURSOR is compiled (Compiling UDFs), the name
of the argument that you supplied as the first DEFINE macro argument (for example, user_soot_precursor) will become visible and selectable in the Species Definition group box of the Soot Model dialog box in ANSYS Fluent.
See Hooking DEFINE_SOOT_PRECURSOR UDFs for details.