![]() |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Description
You can use DEFINE_DOM_SOURCE to modify the emission term (first term on the right hand side in this equation or this equation in the separate 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.
Usage
DEFINE_DOM_SOURCE( name, c, t, ni, nb, emission, in_scattering, abs_coeff, scat_coeff) |
Argument Type | Description |
symbol name | UDF name. |
cell_t c | Cell index. |
Thread *t | Pointer to cell thread. |
int ni | Direction represented by the solid angle. |
int nb | Band number (needed for the non-gray discrete ordinates |
(DO) model). | |
real *emission | Pointer to emission term in the radiative transport |
equation ( this equation in the separate Theory Guide ). | |
real *in_scattering | Pointer to scattering term in the radiative transport |
equation ( this equation in the separate Theory Guide ). | |
real *abs_coeff | Pointer to absorption coefficient. |
real *scat_coeff | Pointer to scattering coefficient. |
Function returns | |
void | |
There are nine arguments to DEFINE_DOM_SOURCE: name, 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.
Example
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; } |
Hooking a DOM Source UDF to
ANSYS FLUENT
After the UDF that you have defined using DEFINE_DOM_SOURCE is interpreted (Chapter 4) or compiled (Chapter 5), the name of the argument that you supplied as the first DEFINE macro argument (e.g., 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 Section 6.2.5 for details.