2.3.42.  DEFINE_TRANS UDFs

The following DEFINE macros can be used to specify transition correlations for the Transition SST model in ANSYS Fluent.

2.3.42.1.  DEFINE_TRANS_FLENGTH

2.3.42.2. Description

You can use DEFINE_TRANS_FLENGTH to specify the transition length for the Transition SST turbulence model.

2.3.42.3. Usage

DEFINE_TRANS_FLENGTH (name, c, t)

Argument Type

Description

symbol name

UDF name.

cell_t c

Index of cell on which the transition length function is to be applied.

Thread *t

Pointer to cell thread.

Function returns

real

There are three arguments to DEFINE_TRANS_FLENGTH: name, c, and t. You supply name, the name of the UDF. c and t are variables that are passed by the ANSYS Fluent solver to your UDF. Your UDF will need to return the real value for the transition length function to the solver.

2.3.42.4. Example

An example of a TRANS_FLENGTH UDF is provided at the end of this section.

2.3.42.5. Hooking a Transition Correlation UDF to ANSYS Fluent

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

2.3.42.6.  DEFINE_TRANS_GEOMRGH

2.3.42.7. Description

You can use DEFINE_TRANS_GEOMRGH to specify the geometric roughness height for the Transition SST turbulence model. For more details on the model, see Transition SST and Rough Walls.

2.3.42.8. Usage

DEFINE_TRANS_GEOMRGH (name, c, t)

Argument Type

Description

symbol name

UDF name.

cell_t c

Index of cell on which the geometric roughness height is to be applied.

Thread *t

Pointer to cell thread.

Function returns

real

There are three arguments to DEFINE_TRANS_GEOMRGH: name, c, and t. You supply name, the name of the UDF. c and t are variables that are passed by the ANSYS Fluent solver to your UDF. Your UDF will need to return the real value for the geometric roughness height to the solver.

2.3.42.9. Example

An example of a DEFINE_TRANS_GEOMRGH UDF is provided at the end of this section.

2.3.42.10. Hooking a Transition Correlation UDF to ANSYS Fluent

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

2.3.42.11.  DEFINE_TRANS_RETHETA_C

2.3.42.12. Description

You can use DEFINE_TRANS_RETHETA_C to specify the critical momentum thickness Reynolds number for the Transition SST turbulence model.

2.3.42.13. Usage

DEFINE_TRANS_RETHETA_C (name, c, t)

Argument Type

Description

symbol name

UDF name.

cell_t c

Index that identifies the cell on which the critical momentum thickness Reynolds number is to be applied.

Thread *t

Pointer to cell thread.

Function returns

real

There are three arguments to DEFINE_TRANS_RETHETA_C: name, c, and t. You supply name, the name of the UDF. c and t are variables that are passed by the ANSYS Fluent solver to your UDF. Your UDF will need to return the real value for the critical momentum thickness Reynolds number to the solver.

2.3.42.14. Example

An example of a TRANS_RETHETA_C UDF is provided at the end of this section.

2.3.42.15. Hooking a Transition Correlation UDF to ANSYS Fluent

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

2.3.42.16.  DEFINE_TRANS_RETHETA_T

2.3.42.17. Description

You can use DEFINE_TRANS_RETHETA_T to specify the transition onset momentum thickness Reynolds number for the Transition SST turbulence model.

2.3.42.18. Usage

DEFINE_TRANS_RETHETA_T (name, c, t)

Argument Type

Description

symbol name

UDF name.

cell_t c

Index that identifies the cell on which the transition onset momentum thickness Reynolds number is to be applied.

Thread *t

Pointer to cell thread.

Function returns

real

There are three arguments to DEFINE_TRANS_RETHETA_T: name, c, and t. You supply name, the name of the UDF. c and t are variables that are passed by the ANSYS Fluent solver to your UDF. Your UDF will need to return the real value for the transition onset momentum thickness Reynolds number to the solver.

2.3.42.19. Example

The following functions (which are concatenated into a single C source code file) demonstrate this usage.

 #include "udf.h"
 
 DEFINE_TRANS_FLENGTH(user_Flength, c, t)
 {
    real Flength = 31.468;
    return Flength;
 }

 DEFINE_TRANS_GEOMRGH(user_Geomrgh, c, t)
 {
/* Dimensional value of geometric roughness height */
    real Geomrgh = 0.001;
    return Geomrgh;
 }
 
 DEFINE_TRANS_RETHETA_C(user_Re_thetac, c, t)
 {
    real Re_thetac = 176.396;
    return Re_thetac;
 }
 
 DEFINE_TRANS_RETHETA_T(user_Re_thetat, c, t)
 {
    real Re_thetat = 210;
    return Re_thetat;
 }
 

2.3.42.20. Hooking a Transition Correlation UDF to ANSYS Fluent

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


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