1 #ifndef __CS_BOUNDARY_CONDITIONS_H__
2 #define __CS_BOUNDARY_CONDITIONS_H__
60 #define CS_MAX_BC_PM_ZONE_NUM 2000
160 const char *type_name);
229 ple_locator_t *locator,
265 int source_location_id,
338 for (
size_t i = 0; i < 3; i++) {
339 a[i] = -qimpv[i] /
fmax(hint, 1.e-300);
342 b[0][0] = 1.,
b[0][1] = 0.,
b[0][2] = 0.;
343 b[1][0] = 0.,
b[1][1] = 1.,
b[1][2] = 0.;
344 b[2][0] = 0.,
b[2][1] = 0.,
b[2][2] = 1.;
348 for (
size_t i = 0; i < 3; i++) {
351 for (
size_t j = 0; j < 3; j++)
394 *
a = hext*pimp/(hint + hext);
395 *
b = hint /(hint + hext);
429 for (
int isou = 0; isou < 3; isou++) {
433 a[isou] = pimpv[isou];
434 for (
int jsou = 0; jsou < 3; jsou++)
438 af[isou] = -hint*pimpv[isou];
439 for (
int jsou = 0; jsou < 3; jsou++) {
441 bf[isou][jsou] = hint;
447 cs_real_t heq = hint*hextv[isou]/(hint + hextv[isou]);
450 a[isou] = hextv[isou]*pimpv[isou]/(hint + hextv[isou]);
451 for (
int jsou = 0; jsou < 3; jsou++) {
453 b[isou][jsou] = hint/(hint + hextv[isou]);
459 af[isou] = -heq*pimpv[isou];
460 for (
int jsou = 0; jsou < 3; jsou++) {
462 bf[isou][jsou] = heq;
520 for (
int isou = 0; isou < 3; isou++) {
522 a[isou] = pimpv[isou];
523 for (
int jsou = 0; jsou < 3; jsou++)
534 for (
int isou = 0; isou < 3; isou++)
535 af[isou] = -af[isou];
void cs_exit(int status)
Definition: cs_base.c:1504
void cs_boundary_conditions_create(void)
Create the legacy boundary conditions face type and face zone arrays.
Definition: cs_boundary_conditions.c:1300
static void cs_boundary_conditions_set_neumann_scalar(cs_real_t *a, cs_real_t *af, cs_real_t *b, cs_real_t *bf, cs_real_t qimp, cs_real_t hint)
Set Neumann BC for a scalar for a given face.
Definition: cs_boundary_conditions.h:299
static void cs_boundary_conditions_set_dirichlet_scalar(cs_real_t *a, cs_real_t *af, cs_real_t *b, cs_real_t *bf, cs_real_t pimp, cs_real_t hint, cs_real_t hext)
Set Dirichlet BC for a scalar for a given face.
Definition: cs_boundary_conditions.h:372
cs_boundary_condition_pm_info_t * cs_glob_bc_pm_info
const int * cs_glob_bc_type
#define CS_MAX_BC_PM_ZONE_NUM
Definition: cs_boundary_conditions.h:60
void cs_boundary_conditions_mapped_set(const cs_field_t *f, ple_locator_t *locator, cs_mesh_location_type_t location_type, int normalize, int interpolate, cs_lnum_t n_faces, const cs_lnum_t *faces, cs_real_t *balance_w)
Set mapped boundary conditions for a given field and mapping locator.
Definition: cs_boundary_conditions.c:1072
static void cs_boundary_conditions_set_dirichlet_vector(cs_real_3_t a, cs_real_3_t af, cs_real_33_t b, cs_real_33_t bf, cs_real_3_t pimpv, cs_real_t hint, cs_real_3_t hextv)
Set Dirichlet BC for a vector for a given face.
Definition: cs_boundary_conditions.h:421
void cs_boundary_conditions_complete(int itypfb[])
Automatic adjustments for boundary condition codes.
Definition: cs_boundary_conditions.c:1625
ple_locator_t * cs_boundary_conditions_map(cs_mesh_location_type_t location_type, cs_lnum_t n_location_elts, cs_lnum_t n_faces, const cs_lnum_t *location_elts, const cs_lnum_t *faces, cs_real_3_t *coord_shift, int coord_stride, double tolerance)
Locate shifted boundary face coordinates on possibly filtered cells or boundary faces for later inter...
Definition: cs_boundary_conditions.c:920
void cs_boundary_conditions_set_convective_outlet_scalar(cs_real_t *coefa, cs_real_t *cofaf, cs_real_t *coefb, cs_real_t *cofbf, cs_real_t pimp, cs_real_t cfl, cs_real_t hint)
Set convective oulet boundary condition for a scalar.
Definition: cs_boundary_conditions.c:1380
int cs_boundary_conditions_add_map(int bc_location_id, int source_location_id, cs_real_t coord_shift[3], double tolerance)
Add location of locate shifted boundary face coordinates on cells or boundary faces for automatic int...
Definition: cs_boundary_conditions.c:1267
void cs_boundary_conditions_free(void)
Free the boundary conditions face type and face zone arrays.
Definition: cs_boundary_conditions.c:1350
void cs_boundary_conditions_error(const int *bc_type, const char *type_name)
Handling of boundary condition definition errors and associated output.
Definition: cs_boundary_conditions.c:866
void cs_boundary_conditions_reset(void)
Prepare (reset) condition coefficients for all variable fields.
Definition: cs_boundary_conditions.c:1404
static void cs_boundary_conditions_set_dirichlet_vector_aniso(cs_real_3_t a, cs_real_3_t af, cs_real_33_t b, cs_real_33_t bf, cs_real_3_t pimpv, cs_real_6_t hintt, cs_real_3_t hextv)
Set Dirichlet BC for a vector for a given face with left anisotropic diffusion.
Definition: cs_boundary_conditions.h:511
static void cs_boundary_conditions_set_neumann_vector(cs_real_t a[3], cs_real_t af[3], cs_real_t b[3][3], cs_real_t bf[3][3], const cs_real_t qimpv[3], cs_real_t hint)
Set Neumann BC for a scalar for a given face.
Definition: cs_boundary_conditions.h:329
void cs_boundary_conditions_compute(int itypfb[])
Update per variable boundary condition codes.
Definition: cs_boundary_conditions.c:1449
#define BEGIN_C_DECLS
Definition: cs_defs.h:509
double cs_real_t
Floating-point value.
Definition: cs_defs.h:319
cs_real_t cs_real_3_t[3]
vector of 3 floating-point values
Definition: cs_defs.h:332
cs_real_t cs_real_6_t[6]
vector of 6 floating-point values
Definition: cs_defs.h:334
#define END_C_DECLS
Definition: cs_defs.h:510
cs_real_t cs_real_33_t[3][3]
3x3 matrix of floating-point values
Definition: cs_defs.h:341
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:313
static void cs_math_sym_33_3_product(const cs_real_t m[6], const cs_real_t v[3], cs_real_t mv[restrict 3])
Compute the product of a symmetric matrix of 3x3 real values by a vector of 3 real values....
Definition: cs_math.h:639
const cs_real_t cs_math_infinite_r
cs_mesh_location_type_t
Definition: cs_mesh_location.h:60
real(c_double), dimension(:), pointer, save xintur
turbulent intensity (k=1.5(uref*xintur)**2)
Definition: ppincl.f90:768
integer(c_int), dimension(:), pointer, save iqimp
imposed flow zone indicator in a way which is similar to the process described in the framework of th...
Definition: ppincl.f90:759
real(c_double), dimension(:), pointer, save dh
hydraulic diameter
Definition: ppincl.f90:771
integer(c_int), dimension(:), pointer, save icalke
condition type turbulence indicator
Definition: ppincl.f90:765
integer, dimension(:), pointer, save itypfb
boundary condition type at the boundary face ifac (see cs_user_boundary_conditions)
Definition: pointe.f90:100
double precision, save fmax
Definition: coincl.f90:183
real(c_double), dimension(:), pointer, save qimp
Definition: coincl.f90:157
double precision, save a
Definition: cs_fuel_incl.f90:148
double precision, save b
Definition: cs_fuel_incl.f90:148
Definition: cs_boundary_conditions.h:94
int * izfppp
Definition: cs_boundary_conditions.h:98
Field descriptor.
Definition: cs_field.h:130