2.3.12.  DEFINE_EMISSIVITY_WEIGHTING_FACTOR

2.3.12.1. Description

When employing the non-gray P-1 radiation model or the non-gray discrete ordinates (DO) radiation model, you can use DEFINE_EMISSIVITY_WEIGHTING_FACTOR to modify the emissivity weighting factor . By default, the emissivity weighting factor is calculated internally by ANSYS Fluent so it can be used in the emission term of the radiative transfer equation, as shown in Equation 5–25 and Equation 5–61 of the Theory Guide. This macro allows you to revise the calculated value.

2.3.12.2. Usage

DEFINE_EMISSIVITY_WEIGHTING_FACTOR (name, c, t, T, nb, emissivity_weighting_factor)

Argument Type

Description

symbol name

UDF name.

cell_t c

Cell index.

Thread *t

Pointer to cell thread.

real T

Temperature.

int nb

Band number.

real *emissivity_weighting_factor

The emissivity weighting factor in the emission term of the radiative transfer equation for the non-gray P-1 model (Equation 5–25 in the Theory Guide) or the non-gray DO model (Equation 5–61 in the Theory Guide).

Function returns

void

There are six arguments to DEFINE_EMISSIVITY_WEIGHTING_FACTOR: name, c, t, T, nb, and emissivity_weighting_factor. You supply name, the name of the UDF. c, t, T, nb, and emissivity_weighting_factor are variables that are passed by the ANSYS Fluent solver to your UDF. DEFINE_EMISSIVITY_WEIGHTING_FACTOR is called by ANSYS Fluent for each cell.

2.3.12.3. Example

In the following UDF (named em_wt), the emissivity weighting factor present in the emission term of the radiative transfer equation for the non-gray DO model is modified. The UDF is called for all of the cells. It modifies the emissivity weighting factor so that it is no longer the value calculated internally by ANSYS Fluent, but is instead changed to .

/* UDF to alter the emissivity weighting factor for the non-gray DO model */
 
 #include "udf.h"
 
 DEFINE_EMISSIVITY_WEIGHTING_FACTOR(em_wt,c,t,T,nb,emissivity_weighting_factor)
 {

   /* revise the calculated emissivity_weighting_factor to be a value of 1 */

   *emissivity_weighting_factor = 1.0;
 
 } 

2.3.12.4. Hooking an Emissivity Weighting Factor UDF to ANSYS Fluent

After the UDF that you have defined using DEFINE_EMISSIVITY_WEIGHTING_FACTOR is interpreted (Interpreting UDFs) or compiled (Compiling UDFs), the name of the argument that you supplied as the first DEFINE macro argument (for example, em_wt) will become visible and selectable in the User-Defined Function Hooks dialog box in ANSYS Fluent. See Hooking DEFINE_EMISSIVITY_WEIGHTING_FACTOR UDFs for details.


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