8.3
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-2024 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#include "cs_time_control.h"
37
38/*----------------------------------------------------------------------------*/
39
41
42/*=============================================================================
43 * Macro definitions
44 *============================================================================*/
45
46/*============================================================================
47 * Type definitions
48 *============================================================================*/
49
50/* Velocity-pressure coupling model descriptor */
51/*---------------------------------------------*/
52
53typedef struct {
54
55 int ivisse; /* take viscous term of transposed velocity
56 gradient into account in momentum equation
57 - 1: true (default)
58 - 0: false */
59
60 int idilat; /* algorithm to take into account the density
61 variation in time
62 - 1: dilatable steady algorithm (default)
63 - 2: dilatable unsteady algorithm
64 - 3: low-Mach algorithm
65 - 4: algorithm for fire
66 - 0: boussinesq algorithm with constant
67 density */
68
69 bool fluid_solid; /* Has a solid zone where dynamics must be killed?
70 - false (default)
71 - true */
72
73 int n_buoyant_scal; /* number of buoyant scalars,
74 zero if there is no buoyant scalar */
75
76 int iprcdo; /* Discretization method for pressure:
77 - 0: Legacy finite Volume method.
78 - 1: CDO method, if CDO/FV is coupled. */
79
81
82/*----------------------------------------------------------------------------
83 * Velocity-pressure coupling parameters
84 *----------------------------------------------------------------------------*/
85
86typedef struct {
87
88 int iphydr; /* improve hydrostatic pressure algorithm
89 - 1: impose the equilibrium of the hydrostaic
90 part of the pressure with any external force,
91 even head losses
92 - 2: compute an hydrostatic pressure due to
93 buoyancy forces before the prediction step
94 - 0: no treatment (default) */
95
96 int icalhy; /* compute the hydrostatic pressure in order to
97 compute the Dirichlet conditions on the
98 pressure at outlets
99 - 1: true
100 - 0: false (default) */
101
102 int iprco; /* compute the pressure step thanks to the
103 continuity equation
104 - 1: true (default)
105 - 0: false */
106
107 int ipredfl; /* deprecated:
108 switch on mass flux prediction before momentum
109 solving to be fully conservative in momentum
110 over time for variable density flows. */
111
112 int irevmc; /* reconstruction of the velocity field with the
113 updated pressure option
114 - 0: default */
115
116 int iifren; /* indicates the presence of a Bernoulli boundary
117 face (automatically computed)
118 - 0: no face
119 - 1: at least one face */
120 int irecmf; /* use interpolated face diffusion coefficient
121 instead of cell diffusion coefficient for the
122 mass flux reconstruction for the
123 non-orthogonalities
124 - 1: true
125 - 0: false (default) */
126
127 int igprij; /* improve static pressure algorithm
128 - 1: take -div(rho R) in the static pressure
129 treatment IF iphydr=1
130 - 0: no treatment (default) */
131
132 int igpust; /* improve static pressure algorithm
133 - 1: take user momemtum source terms in the
134 static pressure treatment IF iphydr=1
135 (default)
136 - 0: no treatment */
137
138 int igrdpp; /* For the compressible algorithm, indicate whether
139 the pressure should be updated after solution
140 of the acoustic equation.
141 - 1: true (default)
142 - 0: false */
143
144 int ipucou; /* pseudo coupled pressure-velocity solver
145 - 1: true (default)
146 - 0: false */
147
148 int itpcol; /* time scheme option:
149 - 0: staggered.
150 - 1: colocated time scheme. */
151
152 double arak; /* Arakawa multiplier for the Rhie and Chow
153 filter (1 by default) */
154
155 int rcfact; /* Indicates the factor of the Rhie and Chow
156 filter
157 - 1: dt (default)
158 - 0: 1/A_u */
159
160 int staggered; /* indicates if one works with the 1D staggered
161 scheme
162 - 0: colocated (default)
163 - 1: staggered */
164
165 int nterup; /* number of iterations on the pressure-velocity
166 coupling on Navier-Stokes */
167
168 double epsup; /* relative precision for the convergence test of
169 the iterative process on pressure-velocity
170 coupling */
171
172 double xnrmu; /* norm of the increment
173 \f$ \vect{u}^{k+1} - \vect{u}^k \f$
174 of the iterative process on pressure-velocity
175 coupling */
176
177 double xnrmu0; /* norm of \f$ \vect{u}^0 \f$ */
178
179 double epsdp; /* parameter of diagonal pressure strengthening */
180
181 cs_time_control_t time_control; /* Time control for radiation updates */
182
184
185/* Deprecated structures (partial compatibility mode) */
186
189
190/*============================================================================
191 * Static global variables
192 *============================================================================*/
193
194/* Pointer to main velocity pressure coupling model structure */
196
197/* Pointer to main velocity pressure coupling parameters structure */
199
200/*=============================================================================
201 * Public function prototypes
202 *============================================================================*/
203
204/*----------------------------------------------------------------------------
205 * Provide read/write access to cs_glob_velocity_pressure_model
206 *
207 * needed to initialize structure with GUI
208 *----------------------------------------------------------------------------*/
209
212
213/*----------------------------------------------------------------------------*/
221/*----------------------------------------------------------------------------*/
222
225
226/*----------------------------------------------------------------------------
227 *!
228 * \brief Count and set number of buoyant scalars.
229 */
230/*----------------------------------------------------------------------------*/
231
232void
234
235/*----------------------------------------------------------------------------
236 *!
237 * \brief Set `fluid_solid` flag if solid zones are present.
238 */
239/*----------------------------------------------------------------------------*/
240
241void
243
244/*----------------------------------------------------------------------------*/
248/*----------------------------------------------------------------------------*/
249
250void
252
253/*----------------------------------------------------------------------------*/
257/*----------------------------------------------------------------------------*/
258
259void
261
262/*----------------------------------------------------------------------------*/
263
265
266#endif /* __CS_VELOCITY_PRESSURE_H__ */
#define BEGIN_C_DECLS
Definition: cs_defs.h:542
#define END_C_DECLS
Definition: cs_defs.h:543
cs_velocity_pressure_model_t cs_stokes_model_t
Definition: cs_velocity_pressure.h:187
void cs_velocity_pressure_set_n_buoyant_scalars(void)
Definition: cs_velocity_pressure.cpp:453
void cs_velocity_pressure_param_log_setup(void)
Print Velocity-pressure parameters to setup.log.
Definition: cs_velocity_pressure.cpp:576
cs_velocity_pressure_param_t cs_piso_t
Definition: cs_velocity_pressure.h:188
cs_velocity_pressure_param_t * cs_get_glob_velocity_pressure_param(void)
Provide access to cs_glob_velocity_pressure_param.
Definition: cs_velocity_pressure.cpp:441
void cs_velocity_pressure_set_solid(void)
Definition: cs_velocity_pressure.cpp:477
cs_velocity_pressure_model_t * cs_get_glob_velocity_pressure_model(void)
Definition: cs_velocity_pressure.cpp:425
const cs_velocity_pressure_param_t * cs_glob_velocity_pressure_param
const cs_velocity_pressure_model_t * cs_glob_velocity_pressure_model
void cs_velocity_pressure_model_log_setup(void)
Print the stokes model parameters to setup.log.
Definition: cs_velocity_pressure.cpp:498
Definition: cs_time_control.h:96
Stokes equation model descriptor.
Definition: cs_velocity_pressure.h:53
int ivisse
Definition: cs_velocity_pressure.h:55
int idilat
Definition: cs_velocity_pressure.h:60
int n_buoyant_scal
Definition: cs_velocity_pressure.h:73
bool fluid_solid
Definition: cs_velocity_pressure.h:69
int iprcdo
Definition: cs_velocity_pressure.h:76
Inner velocity/pressure iteration options descriptor.
Definition: cs_velocity_pressure.h:86
int icalhy
Definition: cs_velocity_pressure.h:96
int irevmc
Definition: cs_velocity_pressure.h:112
double arak
Definition: cs_velocity_pressure.h:152
double epsdp
Definition: cs_velocity_pressure.h:179
double xnrmu
Definition: cs_velocity_pressure.h:172
int iifren
Definition: cs_velocity_pressure.h:116
int igrdpp
Definition: cs_velocity_pressure.h:138
int ipredfl
Definition: cs_velocity_pressure.h:107
int nterup
Definition: cs_velocity_pressure.h:165
double xnrmu0
Definition: cs_velocity_pressure.h:177
int ipucou
Definition: cs_velocity_pressure.h:144
cs_time_control_t time_control
Definition: cs_velocity_pressure.h:181
int rcfact
Definition: cs_velocity_pressure.h:155
int igpust
Definition: cs_velocity_pressure.h:132
int iprco
Definition: cs_velocity_pressure.h:102
double epsup
Definition: cs_velocity_pressure.h:168
int igprij
Definition: cs_velocity_pressure.h:127
int iphydr
Definition: cs_velocity_pressure.h:88
int staggered
Definition: cs_velocity_pressure.h:160
int irecmf
Definition: cs_velocity_pressure.h:120
int itpcol
Definition: cs_velocity_pressure.h:148