You can use DEFINE_DOM_SOURCE to modify
the emission term (first term on the right hand side in Equation 5–59 or Equation 5–60 in
the Theory Guide as well as the scattering term (second term on the right hand side
of either equation) in the radiative transport equation for the discrete
ordinates (DO) model.
DEFINE_DOM_SOURCE (name, c, t, ni, nb, emission, in_scattering, abs_coeff, scat_coeff)
|
Argument Type |
Description |
|---|---|
|
|
UDF name. |
|
|
Cell index. |
|
|
Pointer to cell thread. |
|
|
Direction represented by the solid angle. |
|
|
Band number (needed for the non-gray discrete ordinates (DO) model). |
|
|
Pointer to emission term in the radiative transport equation (Equation 5–59 in the Theory Guide) |
|
|
Pointer to scattering term in the radiative transport equation (Equation 5–60 in the Theory Guide) |
|
|
Pointer to absorption coefficient. |
|
|
Pointer to scattering coefficient. |
Function returns
void
There are nine arguments to DEFINE_DOM_SOURCE: name, t, c, ni, nb, emission, in_scattering, abs_coeff, and scat_coeff. You supply name, the name of the UDF. c, ni, nb, emission, in_scattering, abs_coeff, and scat_coeff are variables that are passed by the ANSYS Fluent solver to your UDF.
DEFINE_DOM_SOURCE is called by ANSYS Fluent for
each cell.
In the following UDF, named dom, the
emission term present in the radiative transport equation is modified.
The UDF is called for all the cells and increases the emission term
by .
/* UDF to alter the emission source term in the DO model */
#include "udf.h"
DEFINE_DOM_SOURCE(dom,c,t,ni,nb,emission,in_scattering,abs_coeff,scat_coeff)
{
/* increased the emission by 5% */
*emission *= 1.05;
}
After the UDF that you have defined using DEFINE_DOM_SOURCE is interpreted (Interpreting UDFs)
or compiled (Compiling UDFs), the name
of the argument that you supplied as the first DEFINE macro argument (for example, dom) will
become visible and selectable in the User-Defined Function
Hooks dialog box in ANSYS Fluent. Note that you can hook multiple
discrete ordinate source term functions to your model. See Hooking DEFINE_DOM_SOURCE UDFs for details.