7.2
general documentation
cs_velocity_pressure.h
Go to the documentation of this file.
1 #ifndef __CS_VELOCITY_PRESSURE_H__
2 #define __CS_VELOCITY_PRESSURE_H__
3 
4 /*============================================================================
5  * Velocity-pressure coupling model and parameters.
6  *============================================================================*/
7 
8 /*
9  This file is part of code_saturne, a general-purpose CFD tool.
10 
11  Copyright (C) 1998-2022 EDF S.A.
12 
13  This program is free software; you can redistribute it and/or modify it under
14  the terms of the GNU General Public License as published by the Free Software
15  Foundation; either version 2 of the License, or (at your option) any later
16  version.
17 
18  This program is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
20  FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
21  details.
22 
23  You should have received a copy of the GNU General Public License along with
24  this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
25  Street, Fifth Floor, Boston, MA 02110-1301, USA.
26 */
27 
28 /*----------------------------------------------------------------------------*/
29 
30 /*----------------------------------------------------------------------------
31  * Local headers
32  *----------------------------------------------------------------------------*/
33 
34 #include "cs_defs.h"
35 
36 /*----------------------------------------------------------------------------*/
37 
39 
40 /*=============================================================================
41  * Macro definitions
42  *============================================================================*/
43 
44 /*============================================================================
45  * Type definitions
46  *============================================================================*/
47 
48 /* Velocity-pressure coupling model descriptor */
49 /*---------------------------------------------*/
50 
51 typedef struct {
52 
53  int ivisse; /* take viscous term of transposed velocity
54  gradient into account in momentum equation
55  - 1: true (default)
56  - 0: false */
57 
58  int idilat; /* algorithm to take into account the density
59  variation in time
60  - 1: dilatable steady algorithm (default)
61  - 2: dilatable unsteady algorithm
62  - 3: low-Mach algorithm
63  - 4: algorithm for fire
64  - 0: boussinesq algorithm with constant
65  density */
66 
67  bool fluid_solid; /* Has a solid zone where dynamics must be killed?
68  - false (default)
69  - true */
70 
71  int n_buoyant_scal; /* number of buoyant scalars,
72  zero if there is no buoyant scalar */
73 
74  int iprcdo; /* Discretization method for pressure:
75  - 0: Legacy finite Volume method.
76  - 1: CDO method, if CDO/FV is coupled. */
77 
79 
80 /*----------------------------------------------------------------------------
81  * Velocity-pressure coupling parameters
82  *----------------------------------------------------------------------------*/
83 
84 typedef struct {
85 
86  int iphydr; /* improve hydrostatic pressure algorithm
87  - 1: impose the equilibrium of the hydrostaic
88  part of the pressure with any external force,
89  even head losses */
90 
91  int icalhy; /* compute the hydrostatic pressure in order to
92  compute the Dirichlet conditions on the
93  pressure at outlets
94  - 1: true
95  - 0: false (default) */
96 
97  int iprco; /* compute the pressure step thanks to the
98  continuity equation
99  - 1: true (default)
100  - 0: false */
101 
102  int irevmc; /* reconstruction of the velocity field with the
103  updated pressure option
104  - 0: default */
105 
106  int iifren; /* indicates the presence of a Bernoulli boundary
107  face (automatically computed)
108  - 0: no face
109  - 1: at least one face */
110  int irecmf; /* use interpolated face diffusion coefficient
111  instead of cell diffusion coefficient for the
112  mass flux reconstruction for the
113  non-orthogonalities
114  - 1: true
115  - 0: false (default) */
116 
117  int igprij; /* improve static pressure algorithm
118  - 1: take -div(rho R) in the static pressure
119  treatment IF iphydr=1
120  - 0: no treatment (default) */
121 
122  int igpust; /* improve static pressure algorithm
123  - 1: take user momemtum source terms in the
124  static pressure treatment IF iphydr=1
125  (default)
126  - 0: no treatment */
127 
128  int ipucou; /* pseudo coupled pressure-velocity solver
129  - 1: true (default)
130  - 0: false */
131 
132  int itpcol; /* time scheme option:
133  - 0: staggered.
134  - 1: collocated time scheme. */
135 
136  double arak; /* Arakawa multiplier for the Rhie and Chow
137  filter (1 by default) */
138 
139  int rcfact; /* Indicates the factor of the Rhie and Chow
140  filter
141  - 1: dt (default)
142  - 0: 1/A_u */
143 
144  int staggered; /* indicates if one works with the 1D staggered
145  scheme
146  - 0: colocated (default)
147  - 1: staggered */
148 
149  int nterup; /* number of iterations on the pressure-velocity
150  coupling on Navier-Stokes */
151 
152  double epsup; /* relative precision for the convergence test of
153  the iterative process on pressure-velocity
154  coupling */
155 
156  double xnrmu; /* norm of the increment
157  \f$ \vect{u}^{k+1} - \vect{u}^k \f$
158  of the iterative process on pressure-velocity
159  coupling */
160 
161  double xnrmu0; /* norm of \f$ \vect{u}^0 \f$ */
162 
163  double epsdp; /* parameter of diagonal pressure strengthening */
164 
166 
167 /* Deprecated structures (partial compatibilty mode) */
168 
171 
172 /*============================================================================
173  * Static global variables
174  *============================================================================*/
175 
176 /* Pointer to main velocity pressure coupling model structure */
178 
179 /* Pointer to main velocity pressure coupling parameters structure */
181 
182 /*=============================================================================
183  * Public function prototypes
184  *============================================================================*/
185 
186 /*----------------------------------------------------------------------------
187  * Provide read/write access to cs_glob_velocity_pressure_model
188  *
189  * needed to initialize structure with GUI
190  *----------------------------------------------------------------------------*/
191 
194 
195 /*----------------------------------------------------------------------------*/
203 /*----------------------------------------------------------------------------*/
204 
207 
208 /*----------------------------------------------------------------------------
209  *!
210  * \brief Count and set number of buoyant scalars.
211  */
212 /*----------------------------------------------------------------------------*/
213 
214 void
216 
217 /*----------------------------------------------------------------------------
218  *!
219  * \brief Set `fluid_solid` flag if solid zones are present.
220  */
221 /*----------------------------------------------------------------------------*/
222 
223 void
225 
226 /*----------------------------------------------------------------------------*/
230 /*----------------------------------------------------------------------------*/
231 
232 void
234 
235 /*----------------------------------------------------------------------------*/
239 /*----------------------------------------------------------------------------*/
240 
241 void
243 
244 /*----------------------------------------------------------------------------*/
245 
247 
248 #endif /* __CS_VELOCITY_PRESSURE_H__ */
int ivisse
Definition: cs_velocity_pressure.h:53
int ipucou
Definition: cs_velocity_pressure.h:128
int icalhy
Definition: cs_velocity_pressure.h:91
int nterup
Definition: cs_velocity_pressure.h:149
double epsup
Definition: cs_velocity_pressure.h:152
int iifren
Definition: cs_velocity_pressure.h:106
#define BEGIN_C_DECLS
Definition: cs_defs.h:510
int rcfact
Definition: cs_velocity_pressure.h:139
void cs_velocity_pressure_set_n_buoyant_scalars(void)
Definition: cs_velocity_pressure.c:471
double epsdp
Definition: cs_velocity_pressure.h:163
int iprcdo
Definition: cs_velocity_pressure.h:74
cs_velocity_pressure_model_t * cs_get_glob_velocity_pressure_model(void)
Definition: cs_velocity_pressure.c:443
int n_buoyant_scal
Definition: cs_velocity_pressure.h:71
int igpust
Definition: cs_velocity_pressure.h:122
void cs_velocity_pressure_set_solid(void)
Definition: cs_velocity_pressure.c:495
cs_velocity_pressure_model_t cs_stokes_model_t
Definition: cs_velocity_pressure.h:169
bool fluid_solid
Definition: cs_velocity_pressure.h:67
double xnrmu
Definition: cs_velocity_pressure.h:156
int irevmc
Definition: cs_velocity_pressure.h:102
int irecmf
Definition: cs_velocity_pressure.h:110
int itpcol
Definition: cs_velocity_pressure.h:132
int staggered
Definition: cs_velocity_pressure.h:144
void cs_velocity_pressure_model_log_setup(void)
Print the stokes model parameters to setup.log.
Definition: cs_velocity_pressure.c:516
void cs_velocity_pressure_param_log_setup(void)
Print Velocity-pressure parameters to setup.log.
Definition: cs_velocity_pressure.c:595
Stokes equation model descriptor.
Definition: cs_velocity_pressure.h:51
cs_velocity_pressure_param_t * cs_get_glob_velocity_pressure_param(void)
Provide access to cs_glob_velocity_pressure_param.
Definition: cs_velocity_pressure.c:459
const cs_velocity_pressure_param_t * cs_glob_velocity_pressure_param
double arak
Definition: cs_velocity_pressure.h:136
int iprco
Definition: cs_velocity_pressure.h:97
Inner velocity/pressure iteration options descriptor.
Definition: cs_velocity_pressure.h:84
#define END_C_DECLS
Definition: cs_defs.h:511
int igprij
Definition: cs_velocity_pressure.h:117
int idilat
Definition: cs_velocity_pressure.h:58
cs_velocity_pressure_param_t cs_piso_t
Definition: cs_velocity_pressure.h:170
double xnrmu0
Definition: cs_velocity_pressure.h:161
int iphydr
Definition: cs_velocity_pressure.h:86
const cs_velocity_pressure_model_t * cs_glob_velocity_pressure_model