7.1
general documentation
cs_wall_functions.h File Reference
#include <bft_printf.h>
#include "cs_base.h"
#include "cs_math.h"
#include "cs_turbulence_model.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...
 

Enumerations

enum  cs_wall_f_type_t {
  CS_WALL_F_UNSET = -999, CS_WALL_F_DISABLED = 0, CS_WALL_F_1SCALE_POWER = 1, CS_WALL_F_1SCALE_LOG = 2,
  CS_WALL_F_2SCALES_LOG = 3, CS_WALL_F_SCALABLE_2SCALES_LOG = 4, CS_WALL_F_2SCALES_VDRIEST = 5, CS_WALL_F_2SCALES_SMOOTH_ROUGH = 6,
  CS_WALL_F_2SCALES_CONTINUOUS = 7
}
 
enum  cs_wall_f_s_type_t {
  CS_WALL_F_S_UNSET = -999, CS_WALL_F_S_ARPACI_LARSEN = 0, CS_WALL_F_S_VDRIEST = 1, CS_WALL_F_S_LOUIS = 2,
  CS_WALL_F_S_MONIN_OBUKHOV = 3, CS_WALL_F_S_SMOOTH_ROUGH = 4
}
 

Functions

void wallfunctions (const int *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 rough_d, const cs_real_t *const rnnb, const cs_real_t *const 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)
 
void hturbp (const int *const iwalfs, const cs_real_t *const l_visc, const cs_real_t *const prl, const cs_real_t *const prt, const cs_real_t *const rough_t, const cs_real_t *const uk, const cs_real_t *const yplus, const cs_real_t *const dplus, cs_real_t *htur, cs_real_t *yplim)
 
cs_wall_functions_tcs_get_glob_wall_functions (void)
 
void cs_wall_functions_velocity (cs_wall_f_type_t 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 rough_d, cs_real_t rnnb, 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 (cs_wall_f_s_type_t iwalfs, cs_real_t l_visc, cs_real_t prl, cs_real_t prt, cs_real_t rough_t, cs_real_t uk, cs_real_t yplus, cs_real_t dplus, cs_real_t *htur, cs_real_t *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
 

Enumeration Type Documentation

◆ cs_wall_f_s_type_t

Enumerator
CS_WALL_F_S_UNSET 
CS_WALL_F_S_ARPACI_LARSEN 
CS_WALL_F_S_VDRIEST 
CS_WALL_F_S_LOUIS 
CS_WALL_F_S_MONIN_OBUKHOV 
CS_WALL_F_S_SMOOTH_ROUGH 

◆ cs_wall_f_type_t

Enumerator
CS_WALL_F_UNSET 
CS_WALL_F_DISABLED 
CS_WALL_F_1SCALE_POWER 
CS_WALL_F_1SCALE_LOG 
CS_WALL_F_2SCALES_LOG 
CS_WALL_F_SCALABLE_2SCALES_LOG 
CS_WALL_F_2SCALES_VDRIEST 
CS_WALL_F_2SCALES_SMOOTH_ROUGH 
CS_WALL_F_2SCALES_CONTINUOUS 

Function Documentation

◆ cs_get_glob_wall_functions()

cs_wall_functions_t* cs_get_glob_wall_functions ( void  )

◆ cs_wall_functions_scalar()

void cs_wall_functions_scalar ( cs_wall_f_s_type_t  iwalfs,
cs_real_t  l_visc,
cs_real_t  prl,
cs_real_t  prt,
cs_real_t  rough_t,
cs_real_t  uk,
cs_real_t  yplus,
cs_real_t  dplus,
cs_real_t htur,
cs_real_t 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^+} \]

Parameters
[in]iwalfstype of wall functions for scalar
[in]l_visckinematic viscosity
[in]prllaminar Prandtl number
[in]prtturbulent Prandtl number
[in]rough_tscalar roughness lenghth scale
[in]ukvelocity scale based on TKE
[in]yplusdimensionless distance to the wall
[in]dplusdimensionless distance for scalable wall functions
[out]hturcorrected exchange coefficient
[out]yplimvalue of the limit for $ y^+ $

◆ cs_wall_functions_velocity()

void cs_wall_functions_velocity ( cs_wall_f_type_t  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  rough_d,
cs_real_t  rnnb,
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]rough_droughness lenghth scale
[in]rnnb$\vec{n}.(\tens{R}\vec{n})$
[in]kinetic_enturbulent 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
[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]rough_droughness length scale (not sand grain roughness)
[in]rnnb$\vec{n}.(\tens{R}\vec{n})$
[in]kinetic_enturbulent kinetic energy (cell center)
[in,out]iunturindicator: 0 in the viscous sublayer
[in,out]nsublacounter of cell in the viscous sublayer
[in,out]nloglacounter of cell in the log-layer
[out]ustarfriction velocity
[out]ukfriction velocity
[out]yplusdimensionless distance to the wall
[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

◆ hturbp()

void hturbp ( const int *const  iwalfs,
const cs_real_t *const  l_visc,
const cs_real_t *const  prl,
const cs_real_t *const  prt,
const cs_real_t *const  rough_t,
const cs_real_t *const  uk,
const cs_real_t *const  yplus,
const cs_real_t *const  dplus,
cs_real_t htur,
cs_real_t yplim 
)

◆ wallfunctions()

void wallfunctions ( const int *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  rough_d,
const cs_real_t *const  rnnb,
const cs_real_t *const  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 
)

Variable Documentation

◆ cs_glob_wall_functions

const cs_wall_functions_t* cs_glob_wall_functions