const cs_lnum_t n_b_faces = domain->mesh->n_b_faces;
const cs_lnum_t *b_face_cells = domain->mesh->b_face_cells;
for (
cs_lnum_t ilelt = 0; ilelt < zn->n_elts; ilelt++) {
const cs_lnum_t face_id = zn->elt_ids[ilelt];
const cs_lnum_t c_id = b_face_cells[face_id];
CS_F_(
vel)->bc_coeffs->rcodcl1[face_id] = 5.0;
CS_F_(
vel)->bc_coeffs->rcodcl1[n_b_faces*1 + face_id] = 0;
CS_F_(
vel)->bc_coeffs->rcodcl1[n_b_faces*2 + face_id] = 0;
CS_F_(
p)->bc_coeffs->rcodcl1[face_id] = 5.5;
CS_F_(
e_tot)->bc_coeffs->rcodcl1[face_id] = 355.e3;
for(
int ii = 0; ii <
CS_F_(
vel)->dim; ii++)
uref2,
dhy,
rhomoy,
for (int f_id = 0; f_id < n_fields; f_id++) {
continue;
int sc_id = -1;
if (sc_id < 0)
continue;
}
}
for (
cs_lnum_t ilelt = 0; ilelt < zn->n_elts; ilelt++) {
const cs_lnum_t face_id = zn->elt_ids[ilelt];
}
for (
cs_lnum_t ilelt = 0; ilelt < zn->n_elts; ilelt++) {
const cs_lnum_t face_id = zn->elt_ids[ilelt];
CS_F_(
p)->bc_coeffs->rcodcl1[face_id] = 1e5;
CS_F_(
e_tot)->bc_coeffs->rcodcl1[face_id] = 294465.0;
for(
int ii = 0; ii <
CS_F_(
vel)->dim; ii++)
CS_F_(
vel)->bc_coeffs->rcodcl1[n_b_faces*ii +face_id]
= -b_face_normal[face_id][ii];
for (int f_id = 0; f_id < n_fields; f_id++) {
continue;
int sc_id = -1;
if (sc_id < 0)
continue;
}
}
for (
cs_lnum_t ilelt = 0; ilelt < zn->n_elts; ilelt++) {
const cs_lnum_t face_id = zn->elt_ids[ilelt];
CS_F_(
p)->bc_coeffs->rcodcl1[face_id] = 5.e5;
}
for (
cs_lnum_t ilelt = 0; ilelt < zn->n_elts; ilelt++) {
const cs_lnum_t face_id = zn->elt_ids[ilelt];
CS_F_(
vel)->bc_coeffs->rcodcl1[face_id] = 1.0;
}
const cs_zone_t * cs_boundary_zone_by_name(const char *name)
Return a pointer to a boundary zone based on its name if present.
Definition: cs_boundary_zone.c:711
#define restrict
Definition: cs_defs.h:139
double cs_real_t
Floating-point value.
Definition: cs_defs.h:319
#define CS_REAL_TYPE
Definition: cs_defs.h:453
cs_real_t cs_real_3_t[3]
vector of 3 floating-point values
Definition: cs_defs.h:332
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:313
cs_field_t * cs_field_by_id(int id)
Return a pointer to a field based on its id.
Definition: cs_field.c:2316
int cs_field_get_key_int(const cs_field_t *f, int key_id)
Return a integer value for a given key associated with a field.
Definition: cs_field.c:3064
int cs_field_n_fields(void)
Return the number of defined fields.
Definition: cs_field.c:1527
int cs_field_key_id(const char *name)
Return an id associated with a given key name.
Definition: cs_field.c:2570
@ p
Definition: cs_field_pointer.h:67
@ t_kelvin
Definition: cs_field_pointer.h:115
@ vel
Definition: cs_field_pointer.h:68
@ e_tot
Definition: cs_field_pointer.h:94
@ rho
Definition: cs_field_pointer.h:97
#define CS_F_(e)
Macro used to return a field pointer by its enumerated value.
Definition: cs_field_pointer.h:51
static cs_real_t cs_math_fmax(cs_real_t x, cs_real_t y)
Compute the max value of two real values.
Definition: cs_math.h:180
static cs_real_t cs_math_pow2(cs_real_t x)
Compute the square of a real value.
Definition: cs_math.h:238
static void cs_parall_sum(int n, cs_datatype_t datatype, void *val)
Sum values of a given datatype on all default communicator processes.
Definition: cs_parall.h:160
@ CS_EPHCF
Definition: cs_parameters.h:94
@ CS_ESICF
Definition: cs_parameters.h:90
@ CS_SOPCF
Definition: cs_parameters.h:93
@ CS_SSPCF
Definition: cs_parameters.h:92
@ CS_SMOOTHWALL
Definition: cs_parameters.h:87
const cs_fluid_properties_t * cs_glob_fluid_properties
Definition: cs_physical_constants.c:404
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 v...
Definition: cs_turbulence_bc.c:871
real(c_double), pointer, save viscl0
reference molecular dynamic viscosity.
Definition: cstphy.f90:157
#define CS_FIELD_VARIABLE
Definition: cs_field.h:63
cs_real_t * rcodcl1
Definition: cs_field.h:109
Field descriptor.
Definition: cs_field.h:130
int type
Definition: cs_field.h:135
cs_field_bc_coeffs_t * bc_coeffs
Definition: cs_field.h:158
double viscl0
Definition: cs_physical_constants.h:73
Example of input / output for which everything is known.
Without presuming subsonic or supersonic character, the user wishes to impose all the flow characteristics. A supersonic inlet is a special case.
If the speed is outgoing, an homogenous Neumann is imposed on turbulence and user scalars.
All features are output. Internal values are used to calculate the flow edge, they should not be imposed.
For turbulence and scalar, if RCODCL values are provided, they will be used in Dirichlet if the mass flow is incoming, otherwise a null flow is imposed (flow outgoing mass or RCODCL informed here). Note that for turbulence RCODCL must be defined for all turbulent variables. Otherwise a null flow is applied).
All characteristics exit. Nothing should be prescribed (the internal values are used to the computation of boundary fluxes).
Subsonic input example with density and velocity.
Two of three characteristics are incoming: two informations must be provided, third is deduced by a scenario of 2-contact and 3-relaxation in the field. Here we choose to give (rho, U).
2 characteristcs out ot 3 enter: both informations should be provided the third is deducted by a scenario of 2-contact and 3-relaxation in the domain. Here, whe choose to give (rho, U).
1 characteristic out of 3 exits: 1 information must be given the 2 others are deduced by a 2-contact and 3-relaxation in the domain. Here we choose to definer P.
Turbulence and user scalars take a zero flux.