programmer's documentation
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Functions | Variables
cs_wall_functions.h File Reference
#include "cs_base.h"
Include dependency graph for cs_wall_functions.h:

Go to the source code of this file.

Data Structures

struct  cs_wall_functions_t
 wall functions descriptor. More...
 

Functions

void wallfunctions (const cs_int_t *const iwallf, const cs_lnum_t *const ifac, const cs_real_t *const viscosity, const cs_real_t *const t_visc, const cs_real_t *const vel, const cs_real_t *const y, const cs_real_t *const kinetic_en, cs_int_t *iuntur, cs_lnum_t *nsubla, cs_lnum_t *nlogla, cs_real_t *ustar, cs_real_t *uk, cs_real_t *yplus, cs_real_t *ypup, cs_real_t *cofimp, cs_real_t *dplus)
 
void hturbp (const cs_real_t *const prl, const cs_real_t *const prt, const cs_real_t *const ckarm, const cs_real_t *const yplus, const cs_real_t *const dplus, cs_real_t *htur, cs_real_t *yplim)
 
void cs_wall_functions_velocity (int iwallf, cs_lnum_t ifac, cs_real_t l_visc, cs_real_t t_visc, cs_real_t vel, cs_real_t y, cs_real_t kinetic_en, int *iuntur, cs_lnum_t *nsubla, cs_lnum_t *nlogla, cs_real_t *ustar, cs_real_t *uk, cs_real_t *yplus, cs_real_t *ypup, cs_real_t *cofimp, cs_real_t *dplus)
 Compute the friction velocity and $y^+$ / $u^+$. More...
 
void cs_wall_functions_scalar (double prl, double prt, double ckarm, double yplus, double dplus, double *htur, double *yplim)
 Compute the correction of the exchange coefficient between the fluid and the wall for a turbulent flow. More...
 

Variables

const cs_wall_functions_tcs_glob_wall_functions
 

Function Documentation

void cs_wall_functions_scalar ( double  prl,
double  prt,
double  ckarm,
double  yplus,
double  dplus,
double *  htur,
double *  yplim 
)

Compute the correction of the exchange coefficient between the fluid and the wall for a turbulent flow.

This is function of the dimensionless distance to the wall $ y^+ = \dfrac{\centip \centf u_\star}{\nu}$.

Then the return coefficient reads:

\[ h_{tur} = Pr \dfrac{y^+}{T^+} \]

This coefficient is computed thanks to a similarity model between dynamic viscous sub-layer and themal sub-layer.

$ T^+ $ is computed as follows:

  • For a laminar Prandtl number smaller than 0.1 (such as liquid metals), the standard model with two sub-layers (Prandtl-Taylor) is used.
  • For a laminar Prandtl number larger than 0.1 (such as liquids and gaz), a model with three sub-layers (Arpaci-Larsen) is used.

The final exchange coefficient is:

\[ h = \dfrac{K}{\centip \centf} h_{tur} \]

Parameters
[in]prllaminar Prandtl number
[in]prtturbulent Prandtl number
[in]ckarmVon Karman constant
[in]yplusdimensionless distance to the wall
[in]dplusdimensionless distance for scalable wall functions
[out]hturcorrected exchange coefficient
[out]yplimvalue of the limit for $ y^+ $
void cs_wall_functions_velocity ( int  iwallf,
cs_lnum_t  ifac,
cs_real_t  l_visc,
cs_real_t  t_visc,
cs_real_t  vel,
cs_real_t  y,
cs_real_t  kinetic_en,
int *  iuntur,
cs_lnum_t nsubla,
cs_lnum_t nlogla,
cs_real_t ustar,
cs_real_t uk,
cs_real_t yplus,
cs_real_t ypup,
cs_real_t cofimp,
cs_real_t dplus 
)

Compute the friction velocity and $y^+$ / $u^+$.

Parameters
[in]iwallfwall function type
[in]ifacface number
[in]l_visckinematic viscosity
[in]t_viscturbulent kinematic viscosity
[in]velwall projected cell center velocity
[in]ywall distance
[in]kinetic_enturbulente kinetic energy
[in]iunturindicator: 0 in the viscous sublayer
[in]nsublacounter of cell in the viscous sublayer
[in]nloglacounter of cell in the log-layer
[out]ustarfriction velocity
[out]ukfriction velocity
[out]yplusnon-dimension wall distance
[out]ypupyplus projected vel ratio
[out]cofimp$\frac{|U_F|}{|U_I^p|}$ to ensure a good turbulence production
[out]dplusdimensionless shift to the wall for scalable wall functions
void hturbp ( const cs_real_t *const  prl,
const cs_real_t *const  prt,
const cs_real_t *const  ckarm,
const cs_real_t *const  yplus,
const cs_real_t *const  dplus,
cs_real_t htur,
cs_real_t yplim 
)
void wallfunctions ( const cs_int_t *const  iwallf,
const cs_lnum_t *const  ifac,
const cs_real_t *const  l_visc,
const cs_real_t *const  t_visc,
const cs_real_t *const  vel,
const cs_real_t *const  y,
const cs_real_t *const  kinetic_en,
cs_int_t iuntur,
cs_lnum_t nsubla,
cs_lnum_t nlogla,
cs_real_t ustar,
cs_real_t uk,
cs_real_t yplus,
cs_real_t ypup,
cs_real_t cofimp,
cs_real_t dplus 
)

(end ignore by Doxygen)

Variable Documentation

const cs_wall_functions_t* cs_glob_wall_functions