1 #ifndef __CS_BOUNDARY_CONDITIONS_H__ 2 #define __CS_BOUNDARY_CONDITIONS_H__ 100 const char *type_name);
171 ple_locator_t *locator,
209 int source_location_id,
243 cs_boundary_conditions_set_neumann_scalar(
cs_real_t *
a,
273 cs_boundary_conditions_set_neumann_vector(
cs_real_t a[3],
282 for (
size_t i = 0; i < 3; i++) {
283 a[i] = -qimpv[i] /
fmax(hint, 1.e-300);
286 b[0][0] = 1., b[0][1] = 0., b[0][2] = 0.;
287 b[1][0] = 0., b[1][1] = 1., b[1][2] = 0.;
288 b[2][0] = 0., b[2][1] = 0., b[2][2] = 1.;
292 for (
size_t i = 0; i < 3; i++) {
295 for (
size_t j = 0; j < 3; j++)
316 cs_boundary_conditions_set_dirichlet_scalar(
cs_real_t *a,
338 *a = hext*pimp/(hint +
hext);
339 *b = hint /(hint +
hext);
365 cs_boundary_conditions_set_dirichlet_vector(
cs_real_3_t a,
373 for (
int isou = 0 ; isou < 3; isou++) {
377 a[isou] = pimpv[isou];
378 for (
int jsou = 0 ; jsou < 3 ; jsou++)
382 af[isou] = -hint*pimpv[isou];
383 for (
int jsou = 0; jsou < 3; jsou++) {
385 bf[isou][jsou] = hint;
391 cs_real_t heq = hint*hextv[isou]/(hint + hextv[isou]);
394 a[isou] = hextv[isou]*pimpv[isou]/(hint + hextv[isou]);
395 for (
int jsou = 0 ; jsou < 3 ; jsou++) {
397 b[isou][jsou] = hint/(hint + hextv[isou]);
403 af[isou] = -heq*pimpv[isou];
404 for (
int jsou = 0 ; jsou < 3 ; jsou++) {
406 bf[isou][jsou] = heq;
455 cs_boundary_conditions_set_dirichlet_vector_aniso(
cs_real_3_t a,
463 for (
int isou = 0 ; isou < 3 ; isou++) {
467 a[isou] = pimpv[isou];
468 for (
int jsou = 0 ; jsou < 3 ; jsou++)
479 cs_math_sym_33_3_product(hintt, pimpv, af);
480 for (
int isou = 0 ; isou < 3 ; isou++)
481 af[isou] = -af[isou];
cs_real_t cs_real_6_t[6]
vector of 6 floating-point values
Definition: cs_defs.h:337
Field descriptor.
Definition: cs_field.h:125
cs_mesh_location_type_t
Definition: cs_mesh_location.h:60
void cs_boundary_conditions_free(void)
Free the boundary conditions face type and face zone arrays.
Definition: cs_boundary_conditions.c:1206
#define BEGIN_C_DECLS
Definition: cs_defs.h:510
void cs_exit(int status)
Definition: cs_base.c:1427
void cs_boundary_conditions_create(void)
Create the legacy boundary conditions face type and face zone arrays.
Definition: cs_boundary_conditions.c:1166
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, int nvar, cs_real_t rcodcl[])
Set mapped boundary conditions for a given field and mapping locator.
Definition: cs_boundary_conditions.c:921
const int * cs_glob_bc_face_zone
double cs_real_t
Floating-point value.
Definition: cs_defs.h:322
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:1233
double precision, save a
Definition: cs_fuel_incl.f90:146
void cs_boundary_conditions_compute(int nvar, int itypfb[], int icodcl[], double rcodcl[])
Update per variable boundary condition codes.
Definition: cs_boundary_conditions.c:1262
integer, dimension(:), pointer, save itypfb
Definition: pointe.f90:100
integer, save nvar
number of solved variables (must be lower than nvarmx)
Definition: dimens.f90:42
double precision, save fmax
Definition: coincl.f90:133
cs_real_t cs_real_3_t[3]
vector of 3 floating-point values
Definition: cs_defs.h:335
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:316
#define END_C_DECLS
Definition: cs_defs.h:511
double precision, dimension(nozppm), save qimp
Definition: coincl.f90:108
cs_real_t cs_real_33_t[3][3]
3x3 matrix of floating-point values
Definition: cs_defs.h:342
void cs_boundary_conditions_complete(int nvar, int itypfb[], int icodcl[], double rcodcl[])
Automatic adjustments for boundary condition codes.
Definition: cs_boundary_conditions.c:1419
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:707
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:1133
double precision hext
Definition: cs_tagmr.f90:100
const cs_real_t cs_math_infinite_r
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:761
const int * cs_glob_bc_type
double precision, save b
Definition: cs_fuel_incl.f90:146