You can use DEFINE_GRAY_BAND_ABS_COEFF to specify a UDF for the gray band absorption coefficient as a function
of temperature, that can be used with a non-gray discrete ordinates
model.
DEFINE_GRAY_BAND_ABS_COEFF (name, c, t, nb)
|
Argument Type |
Description |
|---|---|
|
|
UDF name. |
|
|
Cell index. |
|
|
Pointer to cell thread. |
|
|
Band number associated with non-gray model. |
Function returns
real
There are four arguments to DEFINE_GRAY_BAND_ABS_COEFF: name, c, t, and nb. You supply name, the name of the UDF. The variables c, t, and nb are passed by the ANSYS Fluent solver to your UDF. Your UDF will need
to return the real value of the gray band
coefficient to the solver.
The following UDF, named user_gray_band_abs, specifies the gray-band absorption coefficient as a function of
temperature that can be used for a non-gray discrete ordinates model.
#include "udf.h"
DEFINE_GRAY_BAND_ABS_COEFF(user_gray_band_abs,c,t,nb)
{
real abs_coeff = 0;
real T = C_T(c,t);
switch (nb)
{
case 0 : abs_coeff = 1.3+0.001*T; break;
case 1 : abs_coeff = 2.7 + 0.005*T; break;
}
return abs_coeff;
}
After the UDF that you have defined using DEFINE_GRAY_BAND_ABS_COEFF is interpreted (Interpreting UDFs)
or compiled (Compiling UDFs), the name
of the argument that you supplied as the first DEFINE macro argument (for example, user_gray_band_abs) will become visible and selectable in the Create/Edit
Materials dialog box for the Absorption Coefficient.
See Hooking DEFINE_GRAY_BAND_ABS_COEFF UDFs for
details.