2.3.45.  DEFINE_TURB_SCHMIDT UDF

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.

2.3.45.1. 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.

2.3.45.2. 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.

2.3.45.3. 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.);
 } 

2.3.45.4. Hooking a Turbulent Schmidt Number UDF to ANSYS Fluent

After the UDF that you have defined using DEFINE_TURB_SCHMIDT is interpreted (Interpreting UDFs) or compiled (Compiling UDFs), the name of the argument that you supplied as the first DEFINE macro argument (for example, udf_sct in the above example) will become visible and selectable in the Viscous Model dialog box in ANSYS Fluent. See Hooking DEFINE_TURB_SCHMIDT UDFs for details.


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