7.3
general documentation
Infinite channel inlet with near-inlet feedback

A second method of defining an inlet condition which converges towards an infinite channel profile is based simply on feedback from values computed at inlet cell centers (combining the inlet boundary conditions and the effect of wall friction on the inlet walls). It assumes the mesh is very regular and orthogonal, at least on the first two inlet cell layers (using a gradient correction in the case of a less regular mesh might work, but has never been tested.

Initialization and finalization

Initialization and finalization is similar to that of the base examples

const cs_lnum_t n_cells_ext = domain->mesh->n_cells_with_ghosts;
const cs_lnum_t n_b_faces = domain->mesh->n_b_faces;
const int n_fields = cs_field_n_fields();
const int keysca = cs_field_key_id("scalar_id");
const int nt_cur = domain->time_step->nt_cur;
const cs_lnum_t *b_face_cells = domain->mesh->b_face_cells;
const cs_real_3_t *restrict b_face_normal
= (const cs_real_3_t *restrict)domain->mesh_quantities->b_face_normal;
const cs_real_t *restrict b_face_surf
= ( const cs_real_t *restrict)domain->mesh_quantities->b_face_surf;
const cs_real_t *bpro_rho = CS_F_(rho_b)->val;
const cs_real_3_t *cvar_vel = (const cs_real_3_t *)CS_F_(vel)->val;
const cs_zone_t *zn = NULL;

Body

Here, we define an inlet boundary condition for a very long channel or duct with a section matching the boundary faces of zone 'INLET'.

We fix a mean inlet velocity, and use a feedback loop assuming a fixed-point type behavior will allow us to reach a state matching that of a very long inlet channel.

Warning
We assume other boundary conditions are defined before this one (ideally, using the GUI).
We also assume that the mesh is orthogonal at the inlet, and we are using a RANS (not LES) computation. to the current inlet.

For EBRSM of V2f models, to avoid laminarization at the inlet, the initial velocity (at the first time step) is divided by 10 on inlet faces adjacent to the boundary, so as to ensure a velocity gradient and turbulent production. Otherwise, the initialization may fail.