7.0
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  double arak; /* Arakawa multiplier for the Rhie and Chow
129  filter (1 by default) */
130 
131  int rcfact; /* Indicates the factor of the Rhie and Chow
132  filter
133  - 1: dt (default)
134  - 0: 1/A_u */
135 
136  int nterup; /* number of iterations on the pressure-velocity
137  coupling on Navier-Stokes */
138 
139  double epsup; /* relative precision for the convergence test of
140  the iterative process on pressure-velocity
141  coupling */
142 
143  double xnrmu; /* norm of the increment
144  \f$ \vect{u}^{k+1} - \vect{u}^k \f$
145  of the iterative process on pressure-velocity
146  coupling */
147 
148  double xnrmu0; /* norm of \f$ \vect{u}^0 \f$ */
149 
150  double epsdp; /* parameter of diagonal pressure strengthening */
151 
153 
154 /* Deprecated structures (partial compatibilty mode) */
155 
158 
159 /*============================================================================
160  * Static global variables
161  *============================================================================*/
162 
163 /* Pointer to main velocity pressure coupling model structure */
165 
166 /* Pointer to main velocity pressure coupling parameters structure */
168 
169 /*=============================================================================
170  * Public function prototypes
171  *============================================================================*/
172 
173 /*----------------------------------------------------------------------------
174  * Provide read/write access to cs_glob_velocity_pressure_model
175  *
176  * needed to initialize structure with GUI
177  *----------------------------------------------------------------------------*/
178 
181 
182 /*----------------------------------------------------------------------------*/
190 /*----------------------------------------------------------------------------*/
191 
194 
195 /*----------------------------------------------------------------------------
196  *!
197  * \brief Count and set number of buoyant scalars.
198  */
199 /*----------------------------------------------------------------------------*/
200 
201 void
203 
204 /*----------------------------------------------------------------------------
205  *!
206  * \brief Set `fluid_solid` flag if solid zones are present.
207  */
208 /*----------------------------------------------------------------------------*/
209 
210 void
212 
213 /*----------------------------------------------------------------------------*/
217 /*----------------------------------------------------------------------------*/
218 
219 void
221 
222 /*----------------------------------------------------------------------------*/
226 /*----------------------------------------------------------------------------*/
227 
228 void
230 
231 /*----------------------------------------------------------------------------*/
232 
234 
235 #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:136
double epsup
Definition: cs_velocity_pressure.h:139
int iifren
Definition: cs_velocity_pressure.h:102
#define BEGIN_C_DECLS
Definition: cs_defs.h:495
int rcfact
Definition: cs_velocity_pressure.h:131
void cs_velocity_pressure_set_n_buoyant_scalars(void)
Definition: cs_velocity_pressure.c:439
double epsdp
Definition: cs_velocity_pressure.h:150
cs_velocity_pressure_model_t * cs_get_glob_velocity_pressure_model(void)
Definition: cs_velocity_pressure.c:411
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:463
cs_velocity_pressure_model_t cs_stokes_model_t
Definition: cs_velocity_pressure.h:156
bool fluid_solid
Definition: cs_velocity_pressure.h:67
double xnrmu
Definition: cs_velocity_pressure.h:143
int irevmc
Definition: cs_velocity_pressure.h:98
int irecmf
Definition: cs_velocity_pressure.h:106
void cs_velocity_pressure_model_log_setup(void)
Print the stokes model parameters to setup.log.
Definition: cs_velocity_pressure.c:484
void cs_velocity_pressure_param_log_setup(void)
Print Velocity-pressure parameters to setup.log.
Definition: cs_velocity_pressure.c:556
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:427
const cs_velocity_pressure_param_t * cs_glob_velocity_pressure_param
double arak
Definition: cs_velocity_pressure.h:128
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:496
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:157
double xnrmu0
Definition: cs_velocity_pressure.h:148
int iphydr
Definition: cs_velocity_pressure.h:82
const cs_velocity_pressure_model_t * cs_glob_velocity_pressure_model