#include "base/cs_defs.h"#include <assert.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include <math.h>#include "bft/bft_error.h"#include "bft/bft_printf.h"#include "base/cs_log.h"#include "base/cs_field.h"#include "base/cs_field_pointer.h"#include "base/cs_map.h"#include "base/cs_math.h"#include "base/cs_mem.h"#include "base/cs_parall.h"#include "base/cs_param_types.h"#include "mesh/cs_mesh_location.h"#include "turb/cs_turbulence_model.h"#include "turb/cs_turbulence_bc.h"
Include dependency graph for cs_turbulence_bc.cpp:Functions | |
| void | cs_turbulence_bc_init_pointers (void) |
| Initialize turbulence model boundary condition pointers. More... | |
| void | cs_turbulence_bc_free_pointers (void) |
| Free memory allocations for turbulence boundary condition pointers. More... | |
| void | cs_turbulence_bc_ke_hyd_diam (double uref2, double dh, double rho, double mu, double *ustar2, double *k, double *eps) |
| Calculation of | |
| void | cs_turbulence_bc_ke_turb_intensity (double uref2, double t_intensity, double dh, double *k, double *eps) |
| Calculation of | |
| void | cs_turbulence_bc_inlet_hyd_diam (cs_lnum_t face_id, double uref2, double dh, double rho, double mu) |
| Set inlet boundary condition values for turbulence variables based on a diameter | |
| void | cs_turbulence_bc_inlet_turb_intensity (cs_lnum_t face_id, double uref2, double t_intensity, double dh) |
| Set inlet boundary condition values for turbulence variables based on a diameter | |
| void | cs_turbulence_bc_inlet_k_eps (cs_lnum_t face_id, double k, double eps) |
| Set inlet boundary condition values for turbulence variables based on given k and epsilon values. More... | |
| void | cs_turbulence_bc_set_hmg_neumann (cs_lnum_t face_id) |
| Assign homogeneous Neumann turbulent boundary conditions to a given face. More... | |
| void | cs_turbulence_bc_set_uninit_inlet_hyd_diam (cs_lnum_t face_id, double vel_dir[], double shear_dir[], double uref2, double dh, double rho, double mu) |
| Set inlet boundary condition values for turbulence variables based on a diameter | |
| void | cs_turbulence_bc_set_uninit_inlet_turb_intensity (cs_lnum_t face_id, double uref2, double t_intensity, double dh) |
| Set inlet boundary condition values for turbulence variables based on a diameter | |
| void | cs_turbulence_bc_set_uninit_inlet_k_eps (cs_lnum_t face_id, double k, double eps, double vel_dir[], double shear_dir[]) |
| Set inlet boundary condition values for turbulence variables based on given k and epsilon values only if not already initialized. More... | |
Base turbulence boundary conditions.
| void cs_turbulence_bc_free_pointers | ( | void | ) |
Free memory allocations for turbulence boundary condition pointers.
| void cs_turbulence_bc_init_pointers | ( | void | ) |
Initialize turbulence model boundary condition pointers.
| void cs_turbulence_bc_inlet_hyd_diam | ( | cs_lnum_t | face_id, |
| double | uref2, | ||
| double | dh, | ||
| double | rho, | ||
| double | mu | ||
| ) |
Set inlet boundary condition values for turbulence variables based on a diameter
and the reference velocity
for a circular duct flow with smooth wall.
We use the laws from Idel'Cik, i.e. the head loss coefficient
is defined by:
then the relation reads
.
depends on the hydraulic Reynolds number
and is given by:
From
, we can estimate
and
from the well known formulae of developped turbulence
| [in] | face_id | boundary face id |
| [in] | uref2 | square of the reference flow velocity |
| [in] | dh | hydraulic diameter |
| [in] | rho | mass density |
| [in] | mu | dynamic viscosity |
| void cs_turbulence_bc_inlet_k_eps | ( | cs_lnum_t | face_id, |
| double | k, | ||
| double | eps | ||
| ) |
Set inlet boundary condition values for turbulence variables based on given k and epsilon values.
| [in] | face_id | boundary face id |
| [in] | k | turbulent kinetic energy |
| [in] | eps | turbulent dissipation |
| void cs_turbulence_bc_inlet_turb_intensity | ( | cs_lnum_t | face_id, |
| double | uref2, | ||
| double | t_intensity, | ||
| double | dh | ||
| ) |
Set inlet boundary condition values for turbulence variables based on a diameter
, a turbulent intensity
and the reference velocity
for a circular duct flow with smooth wall.
| [in] | face_id | boundary face id |
| [in] | uref2 | square of the reference flow velocity |
| [in] | t_intensity | turbulent intensity |
| [in] | dh | hydraulic diameter |
| void cs_turbulence_bc_ke_hyd_diam | ( | double | uref2, |
| double | dh, | ||
| double | rho, | ||
| double | mu, | ||
| double * | ustar2, | ||
| double * | k, | ||
| double * | eps | ||
| ) |
Calculation of
,
and
from a diameter
and the reference velocity
for a circular duct flow with smooth wall (use for inlet boundary conditions).
Both
and
are returned, so that the user may compute other values of
and
with
.
We use the laws from Idel'Cik, i.e. the head loss coefficient
is defined by:
then the relation reads
.
depends on the hydraulic Reynolds number
and is given by:
From
, we can estimate
and
from the well known formulae of developped turbulence
| [in] | uref2 | square of the reference flow velocity |
| [in] | dh | hydraulic diameter |
| [in] | rho | mass density |
| [in] | mu | dynamic viscosity |
| [out] | ustar2 | square of friction speed |
| [out] | k | calculated turbulent intensity |
| [out] | eps | calculated turbulent dissipation |
| void cs_turbulence_bc_ke_turb_intensity | ( | double | uref2, |
| double | t_intensity, | ||
| double | dh, | ||
| double * | k, | ||
| double * | eps | ||
| ) |
Calculation of
and
from a diameter
, a turbulent intensity
and the reference velocity
for a circular duct flow with smooth wall (for inlet boundary conditions).
| [in] | uref2 | square of the reference flow velocity |
| [in] | t_intensity | turbulent intensity |
| [in] | dh | hydraulic diameter |
| [out] | k | calculated turbulent intensity |
| [out] | eps | calculated turbulent dissipation |
| void cs_turbulence_bc_set_hmg_neumann | ( | cs_lnum_t | face_id | ) |
Assign homogeneous Neumann turbulent boundary conditions to a given face.
This is useful for outgoing flow.
| void cs_turbulence_bc_set_uninit_inlet_hyd_diam | ( | cs_lnum_t | face_id, |
| double | vel_dir[], | ||
| double | shear_dir[], | ||
| double | uref2, | ||
| double | dh, | ||
| double | rho, | ||
| double | mu | ||
| ) |
Set inlet boundary condition values for turbulence variables based on a diameter
and the reference velocity
for a circular duct flow with smooth wall, only if not already set.
Apart from assigning values where not already initialized, this function is similar to cs_turbulence_bc_inlet_hyd_diam.
| [in] | face_id | boundary face id |
| [in] | vel_dir | velocity direction (not normalized, or nullptr) |
| [in] | shear_dir | shear direction (or nullptr), it also contains the level of anisotropy (Rnt = a_nt k) |
| [in] | uref2 | square of the reference flow velocity |
| [in] | dh | hydraulic diameter |
| [in] | rho | mass density |
| [in] | mu | dynamic viscosity |
| void cs_turbulence_bc_set_uninit_inlet_k_eps | ( | cs_lnum_t | face_id, |
| double | k, | ||
| double | eps, | ||
| double | vel_dir[], | ||
| double | shear_dir[] | ||
| ) |
Set inlet boundary condition values for turbulence variables based on given k and epsilon values only if not already initialized.
| [in] | face_id | boundary face id |
| [in] | k | turbulent kinetic energy |
| [in] | eps | turbulent dissipation |
| [in] | vel_dir | velocity direction |
| [in] | shear_dir | shear direction, it also contains the level of anisotropy (Rnt = a_nt k) |
| void cs_turbulence_bc_set_uninit_inlet_turb_intensity | ( | cs_lnum_t | face_id, |
| double | uref2, | ||
| double | t_intensity, | ||
| double | dh | ||
| ) |
Set inlet boundary condition values for turbulence variables based on a diameter
, a turbulent intensity
and the reference velocity
for a circular duct flow with smooth wall, only if not already set.
Apart from assigning values where not already initialized, this function is similar to cs_turbulence_bc_inlet_turb_intensity.
| [in] | face_id | boundary face id |
| [in] | uref2 | square of the reference flow velocity |
| [in] | t_intensity | turbulent intensity |
| [in] | dh | hydraulic diameter |