[ANSYS, Inc. Logo] return to home search
next up previous contents index

2.3.23 DEFINE_TRANS UDFs

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



DEFINE_TRANS_FLENGTH




Description


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



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.



Example


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



Hooking a Transition Correlation UDF to ANSYS FLUENT


After the UDF that you have defined using DEFINE_TRANS_FLENGTH is interpreted (Chapter  4) or compiled (Chapter  5), the name of the argument that you supplied as the DEFINE macro argument (e.g., user_Flength) will become visible and selectable in the Viscous Model dialog box in ANSYS FLUENT. See Section  6.2.23 for details.



DEFINE_TRANS_RETHETA_C




Description


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



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.



Example


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



Hooking a Transition Correlation UDF to ANSYS FLUENT


After the UDF that you have defined using DEFINE_TRANS_RETHETA_C is interpreted (Chapter  4) or compiled (Chapter  5), the name of the argument that you supplied as the DEFINE macro argument (e.g., user_Re_thetac) will become visible and selectable in the Viscous Model dialog box in ANSYS FLUENT. See Section  6.2.23 for details.



DEFINE_TRANS_RETHETA_T




Description


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



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.



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_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;
}



Hooking a Transition Correlation UDF to ANSYS FLUENT


After the UDF that you have defined using DEFINE_TRANS is interpreted (Chapter  4) or compiled (Chapter  5), the name of the argument that you supplied as the DEFINE macro argument (e.g., user_Re_thetat) will become visible and selectable in the Viscous Model dialog box in ANSYS FLUENT. See Section  6.2.23 for details.


next up previous contents index Previous: 2.3.22 DEFINE_SR_RATE
Up: 2.3 Model-Specific DEFINE Macros
Next: 2.3.24 DEFINE_TURB_PREMIX_SOURCE
Release 12.0 © ANSYS, Inc. 2009-01-14