|
|
The DEFINE_TURB_SCHMIDT macro can be used to specify the turbulent Schmidt numbers of all transported species in ANSYS FLUENT, for single-phase flows.
Description
The turbulent Schmidt number, denoted
, controls the turbulent diffusion of species transported in
ANSYS FLUENT. You can use
DEFINE_TURB_SCHMIDT to specify
for each species solved.
Usage
| DEFINE_TURB_SCHMIDT( name, c, t, i) |
| Argument Type | Description |
| symbol name | UDF name. |
| cell_t c | Index of cell on which the Turbulent Schmidt number function is |
| to be applied. | |
| Thread *t | Pointer to cell thread. |
| int i | Species index. |
| Function returns | |
| real | |
There are four arguments to DEFINE_TURB_SCHMIDT: name, c, t and i. You supply name, the name of the UDF. c, t and i are variables that are passed by the ANSYS FLUENT solver to your UDF. Your UDF will need to return the real value for the turbulent Schmidt number to the solver.
Example
The following example sets
to be inversely proportional to the species index. Hence, the first species in the materials list will have the smallest turbulent diffusion, and the last species will have the largest turbulent diffusion.
#include "udf.h"
DEFINE_TURB_SCHMIDT(udf_sct, c, t, i)
{
return 1./((real)i+1.);
}
|
Hooking a Turbulent Schmidt Number UDF to
ANSYS FLUENT
After the UDF that you have defined using DEFINE_TURB_SCHMIDT is interpreted (Chapter 4) or compiled (Chapter 5), the name of the argument that you supplied as the first DEFINE macro argument (e.g., udf_sct in the above example) will become visible and selectable in the Viscous Model dialog box in ANSYS FLUENT. See Section 6.2.25 for details.