2.3.35.  DEFINE_SOOT_PRECURSOR

2.3.35.1. Description

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.

2.3.35.1.1. Usage

DEFINE_SOOT_PRECURSOR (name, c, t, Pollut, Pollut_Par, Soot)

Argument Type

Description

symbol name

UDF name

cell_t c

Cell index

Thread *t

Pointer to cell thread on which the Soot precursor is to be applied

Pollut_Cell *Pollut

Pointer to the data structure that contains the common data at each cell

Pollut_Parameter *Pollut_Par

Pointer to the data structure that contains auxiliary data

Soot *soot

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.

2.3.35.1.2. Example: Soot Precursor

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; 
}
2.3.35.1.3. Hooking a SOOT_PRECURSOR UDF to ANSYS Fluent

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.


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