9.0
general documentation
Loading...
Searching...
No Matches
Manage boundary conditions

As usual, except for advanced models where a high level of automation is needed through specific preprocessing scripts or tools, using the GUI to define boundary conditions is recommended.

Check the pdf user's guide for details on legacy boundary condition settings and types.

Boundary condition zones

Prior to defining boundary conditions, the appropriate zones should be defined. Using the GUI, this is done in the Mesh section, as an early definition of the defined zones (before the mesh is actually read or built) may be useful for many other settings, not limited to boundary conditions.

GUI: definition of the boundary zones

In most cases, the names of mesh groups than can be used for zone definitions faces may be read directly from preprocessor.log file created by the Preprocessor. Following an initial mesh proprocessing or verification run, these definitions can be imported directly by the GUI under the "Mesh/Boundary zones/Add from Preprocessor log" section.

For advanced cases, or when it is necessary to define zones which overlap, or whose section is based on a (possibly time-varying) function, the cs_user_zones function may be used. A few examples are also provided.

Boundary condition values

Based on the defined zones, the GUI can be used to define boundary types and conditions:

GUI: Base boundary condition definitions

For advanced cases, user-defined functions are available, as usual. Many examples are provided.

Zone-based user-defined function definitions

To define or re-define zone-based boundary condition values, the cs_user_boundary_conditions_setup (or alternatively cs_user_finalize_setup_wrapper) functions may be used.

Note that at walls and when using wall laws (which is the case with most turbulence models), the boundary values prescribed through Dirichlet or Robin conditions are not currently directly appplied, but used in conjunction with the wall model. To force true Dirichlet or exchange conditions, using the legacy boundary condition settings is still needed.

Verification of the boundary conditions

The code checks the main compatibilities between the boundary conditions. In particular, the following rules must be respected:

  • If the boundary conditions for the velocity belong to the "sliding" type (icodcl == 4), the conditions for Rij must belong to the "symmetry" type (icodcl=4), and vice versa.
  • If the boundary conditions for the velocity belongs to the "friction" type (icodcl == 5 or 6), the boundary conditions for the turbulent variables must belong to the "friction" type, too.
  • If the boundary condition of a scalar belongs to the "friction" type, the boundary condition of the velocity must belong to the "friction" type, too.

In case of errors, if the post-processing output is activated (which is the default setting), a special error output, similar to the mesh format, is produced in order to better identify and locate boundary condition definition errors.

Boundary conditions with LES

Synthetic Eddy Method

The cs_user_les_inflow.c user-defined function allows to generate the unsteady boundary conditions for the LES by the Synthetic Eddy Method. The basic principle of this method is illustrated in the following figure.

Synthetic Eddy Method principle

In the figure above, $\mathcal{S}$ is the inlet boundary, $\mathcal{B}$ the virtual box and $ \mathbf{U}_c $ the advection velocity of the eddies.

The turbulent fluctuations at the inlet are generated by a set of synthetic eddies advected across the inlet boundaries. The eddies evolve in a virtual "box" surrounding the inlet boudaries and each of them contributes to the normalized velocity fluctuations, depending on its relative position with the inlet faces and on a form function characterizing the shape of the eddies. By this way, the Synthetic Eddy Method provides a coherent flow with a target mean velocity and target Reynolds stresses at LES inlet.

Warning
LES inlets can only be defined for inlet boundary zone types. if Dirichlet values are provided for these zones in the GUI or user-defined functions, they are overwritten by those provided by the Synthetic Eddy Method.

In the current version of code_saturne, the Synthetic Eddy Method is not available through the GUI but only through the cs_user_les_inflow.c user file.

  • cs_user_les_inflow_define (required): define parameters of synthetic turbulence at LES inflow.
  • cs_user_les_inflow_update (advanced): update of the characteristics of a given synthetic turbulence inlet.
  • cs_user_les_inflow_advanced: definition of mean velocity, Reynolds stresses and dissipation rate for each boundary face of the given synthetic turbulence inlet.

Use of these functions is illustrated in the generation of synthetic turbulence at LES inlets page.

The number of synthetic eddies in the "box" might be adjusted, depending on the case (in particular the size of the inlet plane and the level of turbulence). As a general rule, the greater is the better since an insufficient number can lead to an intermittent signal while some numerical tests have shown that this parameter does not have a great influence beyond a threshold value. Given the inlet of size h<up>2</up> of a shear flow at a given Reynolds number $Re=u_\tau h/\nu$, an appropriate number of eddies can be evaluated by $(Re/50)^3$ (Re and 50 approximates respectively the size, in wall unit, of the largest and the smallest synthetic eddy.

Note
Size of the synthetic eddies The specification of the dissipation rate ε at the inlet is used to compute the size $\sigma_i$ of the synthetic eddies in the i Cartesian direction. One has:

\[\sigma_i=\max\left\{C\frac{\big(\frac{3}{2}R_{ii}\big)^{3/2}}{\varepsilon},\Delta\right\},\qquad
C=0.5.
\]

$\Delta$ is a reference size of the grid, in order to assume that all synthetic eddies are discretized. In the implementation of code_saturne, it is computed at each inlet boundary face F as:

\[\Delta=2\max_{i\le3,V\in\mathcal{V}}\Big\{\big|x_i^V-x_i^C\big|\Big\}
\]

with $\mathcal{V}$ the subset of the vertices of the boundary face F and C the cell adjacent to F.

Other LES inflow methods

For the sake of comparison, other LES inflow methods are available, in addition to the Synthetic Eddy Method:

  • The Batten method.
    With this method, the inflow velocity signal is the superposition of several Fourier modes. As for the Synthetic Eddy Method, the mean velocity, the turbulent kinetic energy and the dissipation rate have to be specified at the inlet: either giving their reference values through cs_user_les_inflow_define, or their local values with cs_user_les_inflow_advanced.
  • Random.
    Turbulent fluctuations are given by a Gaussian noise. Only the mean velocity and Reynolds stresses need to be specified. The turbulent fluctuations provided by this method are much less realistic than those provided by the Synthetic Eddy Method or the Batten method. Especially for low Reynolds number flows, this could lead to the rapid dissipation of this fluctuations and the laminarization of the flow.
  • Laminar.
    Adding no fluctuation, this method does not require any parameter. It should be reserved to regions where the flow is laminar.