My Project
programmer's documentation
Data Fields
cs_var_cal_opt_t Struct Reference

structure containing the variable calculation options. More...

#include <cs_parameters.h>

Collaboration diagram for cs_var_cal_opt_t:
Collaboration graph

Data Fields

int iwarni
 
int iconv
 
int istat
 
int idircl
 
int ndircl
 
int idiff
 
int idifft
 
int idften
 
int iswdyn
 
int ischcv
 
int ibdtso
 
int isstpc
 
int nswrgr
 
int nswrsm
 
int imrgra
 
int imligr
 
int ircflu
 
int iwgrec
 
int icoupl
 
double thetav
 
double blencv
 
double blend_st
 
double epsilo
 
double epsrsm
 
double epsrgr
 
double climgr
 
double extrag
 
double relaxv
 

Detailed Description

structure containing the variable calculation options.

Field Documentation

◆ blencv

blencv

For each unknown variable to calculate, blencv indicates the proportion of second-order convective scheme (0 corresponds to an upwind first-order scheme); in case of LES calculation, a second-order scheme is recommended and activated by default (blencv = 1).
Useful for all the unknowns variable for which iconv = 1.

◆ blend_st

blend_st

For each unknown variable to calculate, blend_st indicates the proportion of second-order convective scheme (0 corresponds to an upwind first-order scheme) after the slope test is activated; in case of LES calculation, a second-order scheme is recommended and activated by default (blend_st = 1).
Useful for all the unknowns variable for which iconv = 1.

◆ climgr

climgr

For each unknown variable, factor of gradient limitation (high value means little limitation).
Useful for all the unknowns variables for which imligr = -1.

◆ epsilo

epsilo

For each unknown variable, relative precision for the solution of the linear system. The default value is epsilo = $ 10^-8 $ . This value is set low on purpose. When there are enough iterations on the reconstruction of the right-hand side of the equation, the value may be increased (by default, in case of second-order in time, with nswrsm = 5 or 10, epsilo is increased to $ 10^-5 $.

◆ epsrgr

epsrgr

For each unknown variable, relative precision for the iterative gradient reconstruction.
Useful for all the unknowns when imrgra = 0 or 4.

◆ epsrsm

epsrsm

For each unknown variable, relative precision on the reconstruction of the right hand-side. The default value is epsrsm = $ 10^-8 $. This value is set low on purpose. When there are not enough iterations on the reconstruction of the right-hand side of the equation, the value may be increased (by default, in case of second-order in time, with nswrsm = 5 or 10, epsrsm is increased to $ 10^-5 $ ).

◆ extrag

extrag

For the variable pressure ipr, extrapolation coefficient of the gradients at the boundaries. It affects only the Neumann conditions. The only possible values of extrag are:

  • 0: homogeneous Neumann calculated at first-order
  • 0.5: improved homogeneous Neumann, calculated at second-order in the case of an orthogonal mesh and at first-order otherwise
  • 1: gradient extrapolation (gradient at the boundary face equal to the gradient in the neighbour cell), calculated at second-order in the case of an orthogonal mesh and at first-order otherwise extrag often allows to correct the non-physical velocities that appear on horizontal walls when density is variable and there is gravity. It is strongly advised to keep extrag = 0 for the variables apart from pressure. See also iphydr. In practice, only the values 0 and 1 are allowed. The value 0.5 is not allowed by default (but the lock can be overridden if necessary, contact the development team).

◆ ibdtso

ibdtso

Backward differential scheme in time order.

◆ iconv

iconv

For each unknown variable to calculate, indicates if the convection is taken into account (1) or not (0). By default, iconv is set to 0 for the pressure (variable ipr) or f in v2f modelling (variable ifb) and set to 1 for the other unknowns.

◆ icoupl

int icoupl

◆ idften

idften

Type of diffusivity flag (sum of mask constants defining if diffusivity is isotropic, anisotropic, ... Masks are defined in Transported scalars parameters).

◆ idiff

idiff

For each unknown variable to calculate, indicates whether the diffusion is taken into account (1) or not (0).

◆ idifft

idifft

For each unknown variable to calculate, when diffusion is taken into account (idiff = 1), idifft indicates if the turbulent diffusion is taken into account (idifft = 1) or not (0).

◆ idircl

idircl

indicates whether the diagonal of the matrix should be slightly shifted or not if there is no Dirichlet boundary condition and if istat = 0.

  • 0: false
  • 1: true Indeed, in such a case, the matrix for the general advection/diffusion equation is singular. A slight shift in the diagonal will make it invertible again.
    By default, idircl is set to 1 for all the unknowns, except $\overline{f}$ in v2f modelling, since its equation contains another diagonal term that ensures the regularity of the matrix.
    Remarks
    the code computes automatically for each variable the number of Dirichlet BCs

◆ imligr

imligr

For each unknown variable, indicates the type of gradient limitation

  • -1: no limitation
  • 0: based on the neighbours
  • 1: superior order
    For all the unknowns, imligr is initialized to -1 if imrgra = 0 or 4 and to 1 if imrgra = 1, 2 or 3.

◆ imrgra

imrgra

Indicates the type of gradient reconstruction (one method for all the variables)

  • 0: iterative reconstruction of the non-orthogonalities
  • 1: least squares method based on the first neighbour cells (cells which share a face with the treated cell)
  • 2: least squares method based on the extended neighbourhood (cells which share a node with the treated cell)
  • 3: least squares method based on a partial extended neighbourhood (all first neighbours plus the extended neighbourhood cells that are connected to a face where the non-orthogonality angle is larger than parameter anomax)
  • 4: iterative reconstruction with initialisation using the least squares method (first neighbours)
  • 5: iterative reconstruction with initialisation using the least squares method based on an extended neighbourhood
  • 6: iterative reconstruction with initialisation using the least squares method based on a partial extended neighbourhood if imrgra fails due to probable mesh quality problems, it is usually effective to use imrgra = 3. Moreover, imrgra = 3 is usually faster than imrgra = 0 (but with less feedback on its use). It should be noted that imrgra = 1, 2 or 3 automatically triggers a gradient limitation procedure. See imligr.
    Useful if and only if there is nswrgr > 1 for at least one variable. Also, pressure gradients (or other gradients deriving from a potential) always use an iterative reconstruction. To force a non-iterative reconstruction for those gradients, a negative value of this keyword may be used, in which case the method matching the absolute value of the keyword will be used.

◆ ircflu

ircflu

For each unknown variable, ircflu indicates whether the convective and diffusive fluxes at the faces should be reconstructed:

  • 0: no reconstruction
  • 1: reconstruction
    Deactivating the reconstruction of the fluxes can have a stabilising effect on the calculation. It is sometimes useful with the $ k-\epsilon $ model, if the mesh is strongly non-orthogonal in the near-wall region, where the gradients of k and $ \epsilon $ are strong. In such a case, setting ircflu = 0 will probably help (switching to a first order convective scheme, blencv = 0, for k and $ \epsilon $ might also help in that case).

◆ ischcv

ischcv

For each unknown variable to calculate, ischcv indicates the type of second-order convective scheme

  • 0: Second Order Linear Upwind
  • 1: Centered
  • 2: Second Order with upwind-gradient reconstruction (SOLU)
  • 3: Blending between Second Order Linear Upwind and Centered scheme
    Useful for all the unknowns variables which are convected (iconv = 1) and for which a second-order scheme is used (blencv > 0).

◆ isstpc

isstpc

For each unknown variable to calculate, isstpc indicates whether a slope test should be used to switch from a second-order to an upwind convective scheme under certain conditions, to ensure stability.

  • -1: deprecated slope test activated for the considered unknown (for vector variable only)
  • 0: slope test activated for the considered unknown
  • 1: slope test deactivated for the considered unknown
  • 2: continuous limiter ensuring boundedness (beta limiter)
  • 3: NVD/TVD Scheme Then "limiter_choice" keyword must be set: 0: Gamma 1: SMART 2: CUBISTA 3: SUPERBEE 4: MUSCL 5: MINMOD 6: CLAM 7: STOIC 8: OSHER 9: WASEB — VOF scheme — 10: M-HRIC 11: M-CICSAM Useful for all the unknowns variable which are convected (iconv = 1) and for which a second-order scheme is used (blencv > 0). The use of the slope test stabilises the calculation but may bring the order in space to decrease quickly.

◆ istat

istat

For each unknown variable to calculate, indicates whether unsteady terms are present (1) or not (0) in the matrices. By default, istat is set to 0 for the pressure (variable ipr) or f in v2f modelling (variable ifb) and set to 1 for the other unknowns.

◆ iswdyn

iswdyn

Dynamic relaxation type:

  • 0 no dynamic relaxation
  • 1 dynamic relaxation depending on $ \delta \varia^k $
  • 2 dynamic relaxation depending on $ \delta \varia^k $ and $ \delta \varia^{k-1} $.

◆ iwarni

iwarni

iwarni characterises the level of detail of the outputs for a variable. The quantity of information increases with its value. Impose the value 0 or 1 for a reasonable log size. Impose the value 2 to get a maximum quantity of information, in case of problem during the execution.

◆ iwgrec

iwgrec

Gradient calculation

  • 0: standard
  • 1: weighted

◆ ndircl

ndircl

number of Dirichlet BCs

◆ nswrgr

nswrgr

For each unknown variable, nswrgr <= 1 indicates that the gradients are not reconstructed

  • if imrgra = 0 or 4, nswrgr is the number of iterations for the gradient reconstruction
  • if imrgra = 1, 2 or 3, nswrgr > 1 indicates that the gradients are reconstructed (but the method is not iterative, so any value larger than 1 for nswrgr yields the same result).

◆ nswrsm

nswrsm

For each unknown variable, nswrsm indicates the number of iterations for the reconstruction of the right-hand sides of the equations with a first-order scheme in time (standard case), the default values are 2 for pressure and 1 for the other variables. With a second-order scheme in time (ischtp = 2) or LES, the default values are 5 for pressure and 10 for the other variables.

◆ relaxv

relaxv

For each variable ivar, relaxation coefficient of the variable. This relaxation parameter is only useful for the pressure with the unsteady algorithm (so as to improve the convergence in case of meshes of insufficient quality or and for some of the turbulent models (iturb = 20, 21, 50 or 60 and ikecou = 0; if ikecou = 1, relaxv is not used, whatever its value may be). Default values are 0.7 for turbulent variables and 1. for pressure. relaxv also stores the value of the relaxation coefficient when using the steady algorithm, deduced from the value of relxst (defaulting to relaxv = 1.

  • relxst). Useful only for the pressure and for turbulent variables if and only if ( $ k-\epsilon $, v2f or $ k-\omega $ models without coupling) with the unsteady algorithm. Always useful with the steady algorithm.

◆ thetav

thetav

For each variable variable, thetav is the value of $ \theta $ used to express at the second-order the terms of convection, diffusion and the source terms which are linear functions of the solved variable (according to the formula $ \phi^{n+\theta} = (1-\theta) \phi^n + \theta \phi^{n+1}$. Generally, only the values 1 and 0.5 are used. The user is not allowed to modify this variable.

  • 1: first-order
  • 0.5: second-order
    Concerning the pressure, the value of thetav is always 1. Concerning the other variables, the value thetav = 0.5 is used when the second-order time scheme is activated by ischtp = 2 (standard value for LES calculations), otherwise thetav is set to 1.

The documentation for this struct was generated from the following files: