programmer's documentation
Functions
cs_turbulence_bc.h File Reference
#include "cs_defs.h"
Include dependency graph for cs_turbulence_bc.h:

Go to the source code of this file.

Functions

void cs_turbulence_model_init_bc_ids (void)
 Initialize turbulence model boundary condition ids. More...
 
void cs_turbulence_bc_ke_hyd_diam (double uref2, double dh, double rho, double mu, double *ustar2, double *k, double *eps)
 Calculation of $ u^\star $, $ k $ and $\varepsilon $ from a diameter $ D_H $ and the reference velocity $ U_{ref} $ for a circular duct flow with smooth wall (use for inlet boundary conditions). More...
 
void cs_turbulence_bc_ke_turb_intensity (double uref2, double t_intensity, double dh, double *k, double *eps)
 Calculation of $ k $ and $\varepsilon$ from a diameter $ D_H $, a turbulent intensity $ I $ and the reference velocity $ U_{ref} $ for a circular duct flow with smooth wall (for inlet boundary conditions). More...
 
void cs_turbulence_bc_inlet_hyd_diam (cs_lnum_t face_id, double uref2, double dh, double rho, double mu, double *rcodcl)
 Set inlet boundary condition values for turbulence variables based on a diameter $ D_H $ and the reference velocity $ U_{ref} $ for a circular duct flow with smooth wall (use for inlet boundary conditions). More...
 
void cs_turbulence_bc_inlet_turb_intensity (cs_lnum_t face_id, double uref2, double t_intensity, double dh, double *rcodcl)
 Set inlet boundary condition values for turbulence variables based on a diameter $ D_H $, a turbulent intensity $ I $ and the reference velocity $ U_{ref} $ for a circular duct flow with smooth wall. More...
 

Function Documentation

void cs_turbulence_bc_inlet_hyd_diam ( cs_lnum_t  face_id,
double  uref2,
double  dh,
double  rho,
double  mu,
double *  rcodcl 
)

Set inlet boundary condition values for turbulence variables based on a diameter $ D_H $ and the reference velocity $ U_{ref} $ for a circular duct flow with smooth wall (use for inlet boundary conditions).

We use the laws from Idel'Cik, i.e. the head loss coefficient $ \lambda $ is defined by:

\[ |\dfrac{\Delta P}{\Delta x}| = \dfrac{\lambda}{D_H} \frac{1}{2} \rho U_{ref}^2 \]

then the relation reads $u^\star = U_{ref} \sqrt{\dfrac{\lambda}{8}}$. $\lambda $ depends on the hydraulic Reynolds number $ Re = \dfrac{U_{ref} D_H}{ \nu} $ and is given by:

  • for $ Re < 2000 $

    \[ \lambda = \dfrac{64}{Re} \]

  • for $ Re > 4000 $

    \[ \lambda = \dfrac{1}{( 1.8 \log_{10}(Re)-1.64 )^2} \]

  • for $ 2000 < Re < 4000 $, we complete by a straight line

    \[ \lambda = 0.021377 + 5.3115. 10^{-6} Re \]

From $ u^\star $, we can estimate $ k $ and $ \varepsilon$ from the well known formulae of developped turbulence

Parameters
[in]face_idboundary face id
[in]uref2square of the reference flow velocity
[in]dhhydraulic diameter $ D_H $
[in]rhomass density $ \rho $
[in]mudynamic viscosity $ \nu $
[out]rcodclboundary condition values

Set inlet boundary condition values for turbulence variables based on a diameter $ D_H $ and the reference velocity $ U_{ref} $ for a circular duct flow with smooth wall (use for inlet boundary conditions).

We use the laws from Idel'Cik, i.e. the head loss coefficient $ \lambda $ is defined by:

\[ |\dfrac{\Delta P}{\Delta x}| = \dfrac{\lambda}{D_H} \frac{1}{2} \rho U_{ref}^2 \]

then the relation reads $u^\star = U_{ref} \sqrt{\dfrac{\lambda}{8}}$. $\lambda $ depends on the hydraulic Reynolds number $ Re = \dfrac{U_{ref} D_H}{ \nu} $ and is given by:

  • for $ Re < 2000 $

    \[ \lambda = \dfrac{64}{Re} \]

  • for $ Re > 4000 $

    \[ \lambda = \dfrac{1}{( 1.8 \log_{10}(Re)-1.64 )^2} \]

  • for $ 2000 < Re < 4000 $, we complete by a straight line

    \[ \lambda = 0.021377 + 5.3115. 10^{-6} Re \]

From $ u^\star $, we can estimate $ k $ and $ \varepsilon$ from the well known formulae of developped turbulence

Parameters
[in]face_idboundary face id
[in]uref2square of the reference flow velocity
[in]dhhydraulic diameter $ D_H $
[in]rhomass density $ \rho $
[in]mudynamic viscosity $ \nu $
[out]rcodclboundary condition values
void cs_turbulence_bc_inlet_turb_intensity ( cs_lnum_t  face_id,
double  uref2,
double  t_intensity,
double  dh,
double *  rcodcl 
)

Set inlet boundary condition values for turbulence variables based on a diameter $ D_H $, a turbulent intensity $ I $ and the reference velocity $ U_{ref} $ for a circular duct flow with smooth wall.

Parameters
[in]face_idboundary face id
[in]uref2square of the reference flow velocity
[in]t_intensityturbulent intensity $ I $
[in]dhhydraulic diameter $ D_H $
[out]rcodclboundary condition values
void cs_turbulence_bc_ke_hyd_diam ( double  uref2,
double  dh,
double  rho,
double  mu,
double *  ustar2,
double *  k,
double *  eps 
)

Calculation of $ u^\star $, $ k $ and $\varepsilon $ from a diameter $ D_H $ and the reference velocity $ U_{ref} $ for a circular duct flow with smooth wall (use for inlet boundary conditions).

Both $ u^\star $ and $ (k,\varepsilon )$ are returned, so that the user may compute other values of $ k $ and $ \varepsilon $ with $ u^\star $.

We use the laws from Idel'Cik, i.e. the head loss coefficient $ \lambda $ is defined by:

\[ |\dfrac{\Delta P}{\Delta x}| = \dfrac{\lambda}{D_H} \frac{1}{2} \rho U_{ref}^2 \]

then the relation reads $u^\star = U_{ref} \sqrt{\dfrac{\lambda}{8}}$. $\lambda $ depends on the hydraulic Reynolds number $ Re = \dfrac{U_{ref} D_H}{ \nu} $ and is given by:

  • for $ Re < 2000 $

    \[ \lambda = \dfrac{64}{Re} \]

  • for $ Re > 4000 $

    \[ \lambda = \dfrac{1}{( 1.8 \log_{10}(Re)-1.64 )^2} \]

  • for $ 2000 < Re < 4000 $, we complete by a straight line

    \[ \lambda = 0.021377 + 5.3115. 10^{-6} Re \]

From $ u^\star $, we can estimate $ k $ and $ \varepsilon$ from the well known formulae of developped turbulence

\[ k = \dfrac{u^{\star 2}}{\sqrt{C_\mu}} \]

\[ \varepsilon = \dfrac{ u^{\star 3}}{(\kappa D_H /10)} \]

Parameters
[in]uref2square of the reference flow velocity
[in]dhhydraulic diameter $ D_H $
[in]rhomass density $ \rho $
[in]mudynamic viscosity $ \nu $
[out]ustar2square of friction speed
[out]kcalculated turbulent intensity $ k $
[out]epscalculated turbulent dissipation $ \varepsilon $
void cs_turbulence_bc_ke_turb_intensity ( double  uref2,
double  t_intensity,
double  dh,
double *  k,
double *  eps 
)

Calculation of $ k $ and $\varepsilon$ from a diameter $ D_H $, a turbulent intensity $ I $ and the reference velocity $ U_{ref} $ for a circular duct flow with smooth wall (for inlet boundary conditions).

\[ k = 1.5 I {U_{ref}}^2 \]

\[ \varepsilon = 10 \dfrac{{C_\mu}^{0.75} k^{1.5}}{ \kappa D_H} \]

Parameters
[in]uref2square of the reference flow velocity
[in]t_intensityturbulent intensity $ I $
[in]dhhydraulic diameter $ D_H $
[out]kcalculated turbulent intensity $ k $
[out]epscalculated turbulent dissipation $ \varepsilon $
void cs_turbulence_model_init_bc_ids ( void  )

Initialize turbulence model boundary condition ids.

Initialize turbulence model boundary condition ids.