#include "cs_defs.h"
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <math.h>
#include <mpi.h>
#include "bft_mem.h"
#include "bft_printf.h"
#include "cs_air_props.h"
#include "cs_ale.h"
#include "cs_atmo.h"
#include "cs_boundary_conditions_set_coeffs.h"
#include "cs_field_default.h"
#include "cs_field_pointer.h"
#include "cs_internal_coupling.h"
#include "cs_mesh.h"
#include "cs_parall.h"
#include "cs_parameters.h"
#include "cs_physical_constants.h"
#include "cs_physical_model.h"
#include "cs_rad_transfer.h"
#include "cs_thermal_model.h"
#include "cs_turbomachinery.h"
#include "cs_turbulence_bc.h"
#include "cs_turbulence_model.h"
#include "cs_wall_functions.h"
#include "cs_boundary_conditions_set_coeffs_turb.h"
Functions | |
static void | _cs_boundary_conditions_set_coeffs_turb_scalar (cs_field_t *f_sc, int isvhb, cs_real_t byplus[], cs_real_t bdplus[], cs_real_t buk[], cs_real_t buet[], cs_real_t bcfnns[], cs_real_t bdlmo[], cs_real_t hbord[], cs_real_t theipb[], cs_real_t *tetmax, cs_real_t *tetmin, cs_real_t *tplumx, cs_real_t *tplumn) |
Compute boundary coefficients for smooth/rough walls for scalar. More... | |
static void | _cs_boundary_conditions_set_coeffs_turb_vector (cs_field_t *f_v, cs_real_t byplus[], cs_real_t bdplus[], cs_real_t buk[]) |
Compute boundary coefficients for smooth walls for vector. More... | |
static void | _update_physical_quantities_smooth_wall (const cs_lnum_t c_id, const cs_real_t visclc, const cs_real_t visctc, const cs_real_t romc, const cs_real_t distbf, const cs_real_t utau, const cs_real_t uet, const cs_real_t uk, const cs_real_t yplus, const cs_real_t ypup, const cs_real_t dplus, cs_real_t *cofimp, cs_real_t *rcprod, cs_real_t *hflui, cs_real_t *uiptn) |
Compute hflui and uiptn for smooth wall. More... | |
static void | _update_physical_quantities_rough_wall (const cs_real_t visclc, const cs_real_t visctc, const cs_real_t romc, const cs_real_t distbf, const cs_real_t utau, const cs_real_t uet, const cs_real_t uk, const cs_real_t uplus, const cs_real_t rough_d, const cs_real_t dlmo, int *iuntur, cs_gnum_t *nlogla, cs_gnum_t *nsubla, cs_real_t *cofimp, cs_real_t *rcprod, cs_real_t *hflui, cs_real_t *uiptn) |
Update physical quantities for rough wall. More... | |
static void | _atmo_cls (const cs_lnum_t f_id, const cs_real_t utau, const cs_real_t rough_d, const cs_real_t duplus, const cs_real_t dtplus, const cs_real_t yplus_t, cs_real_t *uet, const cs_real_t gredu, cs_real_t *cfnns, cs_real_t *cfnnk, cs_real_t *cfnne, cs_real_t *dlmo, const cs_real_t temp, const cs_real_t totwt, const cs_real_t liqwt) |
Compute friction velocity u* and surface sensible heat flux q0 for a non neutral atmospheric surface layer using the explicit formula developed for the ECMWF by Louis (1982) More... | |
void | cs_boundary_conditions_set_coeffs_turb (int isvhb, cs_real_t velipb[][3], cs_real_t rijipb[][6], cs_real_t visvdr[], cs_real_t hbord[], cs_real_t theipb[]) |
Boundary conditions for smooth walls (icodcl = 5). More... | |
Variables | |
static cs_lnum_t | _ntlast = -1 |
static cs_lnum_t | _iaff = 0 |
static int | _kbfid = -1 |
static const cs_lnum_t | _iv2t [6] = {0, 1, 2, 0, 1, 0} |
static const cs_lnum_t | _jv2t [6] = {0, 1, 2, 1, 2, 2} |
|
static |
Compute friction velocity u* and surface sensible heat flux q0 for a non neutral atmospheric surface layer using the explicit formula developed for the ECMWF by Louis (1982)
[in] | ifac | treated boundary face |
[in] | utau | tangential mean velocity |
[in] | rough_d | roughness z0 |
[in] | duplus | 1 over dimensionless velocity in neutral conditions |
[in] | dtplus | 1 over dimensionless temperature in neutral conditions |
[in] | yplus_t | thermal dimensionless wall distance |
[out] | uet | friction velocity |
[out] | gredu | reduced gravity for non horizontal wall |
[out] | cfnns | non neutral correction coefficients for profiles of scalar |
[out] | cfnnk | non neutral correction coefficients for profiles of k |
[out] | cfnne | non neutral correction coefficients for profiles of eps |
[out] | dlmo | inverse Monin Obukhov length (for log only) |
[in] | temp | potential temperature in boundary cell |
[in] | totwt | total water content in boundary cell |
[in] | liqwt | liquid water content in boundary cell |
|
static |
Compute boundary coefficients for smooth/rough walls for scalar.
[in] | f_sc | scalar field |
[in] | isvhb | id of field whose exchange coeffient should be saved at the walls, or -1. |
[in] | byplus | dimensionless distance to the wall |
[in] | bdplus | dimensionless shift to the wall for scalable wall functions |
[in] | buk | dimensionless velocity |
[in] | buet | boundary ustar value |
[in] | bcfnns | boundary correction factor |
[in] | bdlmo | boundary Monin Obukhov length inverse, or nullptr |
[in,out] | hbord | exchange coefficient at boundary |
[in] | theipb | value of thermal scalar at ![]() |
[out] | tetmax | maximum local ustar value |
[out] | tetmin | minimum local ustar value |
[out] | tplumx | maximum local tplus value |
[out] | tplumn | minimum local tplus value |
|
static |
Compute boundary coefficients for smooth walls for vector.
[in] | f_v | vector field |
[in] | byplus | dimensionless distance to the wall |
[in] | bdplus | dimensionless shift to the wall for scalable wall functions |
[in] | buk | dimensionless velocity |
|
static |
Update physical quantities for rough wall.
[in] | visclc | kinematic viscosity |
[in] | visctc | turbulent kinematic viscosity |
[in] | romc | density |
[in] | distbf | distance between the cell center and the center of gravity of the border face |
[in] | utau | tangential mean velocity |
[in] | uet | friction velocity |
[in] | uk | friction velocity |
[in] | uplus | dimensionless velocity |
[in] | dplus | dimensionless shift to the wall for scalable wall functions |
[in] | rough_d | roughness length scale (not sand grain) |
[in] | dlmo | inverse Monin Obukhov length (for log only) |
[in,out] | iuntur | indicator: 0 in the viscous sublayer |
[in,out] | nlogla | counter of cell in the log-layer |
[in,out] | nsubla | counter of cell in the viscous sublayer |
[in,out] | cofimp | ![]() |
[in,out] | rcprod | ? |
[in,out] | hflui | internal exchange coefficient |
[in,out] | uiptn | counter of reversal layer |
|
static |
Compute hflui and uiptn for smooth wall.
[in] | c_id | cell id |
[in] | visclc | kinematic viscosity |
[in] | visctc | turbulent kinematic viscosity |
[in] | romc | density evaluated at cell_id |
[in] | distbf | distance between the cell center and the center of gravity of the border face |
[in] | utau | tangential mean velocity |
[in] | uet | boundary ustar value |
[in] | uk | dimensionless velocity |
[in] | yplus | dimensionless distance to the wall |
[in] | ypup | yplus projected vel ratio |
[in] | dplus | dimensionless shift to the wall for scalable wall functions |
[in,out] | cofimp | ![]() |
[in,out] | rcprod | ? |
[in,out] | hflui | internal exchange coefficient |
[in,out] | uiptn | counter of reversal layer |
void cs_boundary_conditions_set_coeffs_turb | ( | int | isvhb, |
cs_real_t | velipb[][3], | ||
cs_real_t | rijipb[][6], | ||
cs_real_t | visvdr[], | ||
cs_real_t | hbord[], | ||
cs_real_t | theipb[] | ||
) |
Boundary conditions for smooth walls (icodcl = 5).
The wall functions may change the value of the diffusive flux.
The values at a boundary face stored in the face center
of the variable
and its diffusive flux
are written as:
and
where is the value of the variable
at the neighboring cell.
Warning:
Please refer to the wall boundary conditions section of the theory guide for more informations, as well as the clptur section.
[in] | isvhb | id of field whose exchange coeffient should be saved at the walls, or -1. |
[in] | velipb | value of the velocity at ![]() |
[in] | rijipb | value of ![]() ![]() |
[out] | visvdr | dynamic viscosity after V. Driest damping in boundary cells |
[out] | hbord | exchange coefficient at boundary |
[in] | theipb | value of thermal scalar at ![]() |
|
static |
|
static |
|
static |
|
static |
|
static |