7.1
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-2021 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 
75 
76 /*----------------------------------------------------------------------------
77  * Velocity-pressure coupling parameters
78  *----------------------------------------------------------------------------*/
79 
80 typedef struct {
81 
82  int iphydr; /* improve hydrostatic pressure algorithm
83  - 1: impose the equilibrium of the hydrostaic
84  part of the pressure with any external force,
85  even head losses */
86 
87  int icalhy; /* compute the hydrostatic pressure in order to
88  compute the Dirichlet conditions on the
89  pressure at outlets
90  - 1: true
91  - 0: false (default) */
92 
93  int iprco; /* compute the pressure step thanks to the
94  continuity equation
95  - 1: true (default)
96  - 0: false */
97 
98  int irevmc; /* reconstruction of the velocity field with the
99  updated pressure option
100  - 0: default */
101 
102  int iifren; /* indicates the presence of a Bernoulli boundary
103  face (automatically computed)
104  - 0: no face
105  - 1: at least one face */
106  int irecmf; /* use interpolated face diffusion coefficient
107  instead of cell diffusion coefficient for the
108  mass flux reconstruction for the
109  non-orthogonalities
110  - 1: true
111  - 0: false (default) */
112 
113  int igprij; /* improve static pressure algorithm
114  - 1: take -div(rho R) in the static pressure
115  treatment IF iphydr=1
116  - 0: no treatment (default) */
117 
118  int igpust; /* improve static pressure algorithm
119  - 1: take user momemtum source terms in the
120  static pressure treatment IF iphydr=1
121  (default)
122  - 0: no treatment */
123 
124  int ipucou; /* pseudo coupled pressure-velocity solver
125  - 1: true (default)
126  - 0: false */
127 
128  int itpcol; /* time scheme option:
129  - 0: staggered.
130  - 1: collocated time scheme. */
131 
132  double arak; /* Arakawa multiplier for the Rhie and Chow
133  filter (1 by default) */
134 
135  int rcfact; /* Indicates the factor of the Rhie and Chow
136  filter
137  - 1: dt (default)
138  - 0: 1/A_u */
139 
140  int staggered; /* indicates if one works with the 1D staggered
141  scheme
142  - 0: colocated (default)
143  - 1: staggered */
144 
145  int nterup; /* number of iterations on the pressure-velocity
146  coupling on Navier-Stokes */
147 
148  double epsup; /* relative precision for the convergence test of
149  the iterative process on pressure-velocity
150  coupling */
151 
152  double xnrmu; /* norm of the increment
153  \f$ \vect{u}^{k+1} - \vect{u}^k \f$
154  of the iterative process on pressure-velocity
155  coupling */
156 
157  double xnrmu0; /* norm of \f$ \vect{u}^0 \f$ */
158 
159  double epsdp; /* parameter of diagonal pressure strengthening */
160 
162 
163 /* Deprecated structures (partial compatibilty mode) */
164 
167 
168 /*============================================================================
169  * Static global variables
170  *============================================================================*/
171 
172 /* Pointer to main velocity pressure coupling model structure */
174 
175 /* Pointer to main velocity pressure coupling parameters structure */
177 
178 /*=============================================================================
179  * Public function prototypes
180  *============================================================================*/
181 
182 /*----------------------------------------------------------------------------
183  * Provide read/write access to cs_glob_velocity_pressure_model
184  *
185  * needed to initialize structure with GUI
186  *----------------------------------------------------------------------------*/
187 
190 
191 /*----------------------------------------------------------------------------*/
199 /*----------------------------------------------------------------------------*/
200 
203 
204 /*----------------------------------------------------------------------------
205  *!
206  * \brief Count and set number of buoyant scalars.
207  */
208 /*----------------------------------------------------------------------------*/
209 
210 void
212 
213 /*----------------------------------------------------------------------------
214  *!
215  * \brief Set `fluid_solid` flag if solid zones are present.
216  */
217 /*----------------------------------------------------------------------------*/
218 
219 void
221 
222 /*----------------------------------------------------------------------------*/
226 /*----------------------------------------------------------------------------*/
227 
228 void
230 
231 /*----------------------------------------------------------------------------*/
235 /*----------------------------------------------------------------------------*/
236 
237 void
239 
240 /*----------------------------------------------------------------------------*/
241 
243 
244 #endif /* __CS_VELOCITY_PRESSURE_H__ */
int ivisse
Definition: cs_velocity_pressure.h:53
int ipucou
Definition: cs_velocity_pressure.h:124
int icalhy
Definition: cs_velocity_pressure.h:87
int nterup
Definition: cs_velocity_pressure.h:145
double epsup
Definition: cs_velocity_pressure.h:148
int iifren
Definition: cs_velocity_pressure.h:102
#define BEGIN_C_DECLS
Definition: cs_defs.h:510
int rcfact
Definition: cs_velocity_pressure.h:135
void cs_velocity_pressure_set_n_buoyant_scalars(void)
Definition: cs_velocity_pressure.c:462
double epsdp
Definition: cs_velocity_pressure.h:159
cs_velocity_pressure_model_t * cs_get_glob_velocity_pressure_model(void)
Definition: cs_velocity_pressure.c:434
int n_buoyant_scal
Definition: cs_velocity_pressure.h:71
int igpust
Definition: cs_velocity_pressure.h:118
void cs_velocity_pressure_set_solid(void)
Definition: cs_velocity_pressure.c:486
cs_velocity_pressure_model_t cs_stokes_model_t
Definition: cs_velocity_pressure.h:165
bool fluid_solid
Definition: cs_velocity_pressure.h:67
double xnrmu
Definition: cs_velocity_pressure.h:152
int irevmc
Definition: cs_velocity_pressure.h:98
int irecmf
Definition: cs_velocity_pressure.h:106
int itpcol
Definition: cs_velocity_pressure.h:128
int staggered
Definition: cs_velocity_pressure.h:140
void cs_velocity_pressure_model_log_setup(void)
Print the stokes model parameters to setup.log.
Definition: cs_velocity_pressure.c:507
void cs_velocity_pressure_param_log_setup(void)
Print Velocity-pressure parameters to setup.log.
Definition: cs_velocity_pressure.c:580
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:450
const cs_velocity_pressure_param_t * cs_glob_velocity_pressure_param
double arak
Definition: cs_velocity_pressure.h:132
int iprco
Definition: cs_velocity_pressure.h:93
Inner velocity/pressure iteration options descriptor.
Definition: cs_velocity_pressure.h:80
#define END_C_DECLS
Definition: cs_defs.h:511
int igprij
Definition: cs_velocity_pressure.h:113
int idilat
Definition: cs_velocity_pressure.h:58
cs_velocity_pressure_param_t cs_piso_t
Definition: cs_velocity_pressure.h:166
double xnrmu0
Definition: cs_velocity_pressure.h:157
int iphydr
Definition: cs_velocity_pressure.h:82
const cs_velocity_pressure_model_t * cs_glob_velocity_pressure_model