8.2
general documentation
Loading...
Searching...
No Matches
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/*----------------------------------------------------------------------------*/
37
39
40/*=============================================================================
41 * Macro definitions
42 *============================================================================*/
43
44/*============================================================================
45 * Type definitions
46 *============================================================================*/
47
48/* Velocity-pressure coupling model descriptor */
49/*---------------------------------------------*/
50
51typedef 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
84typedef 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 - 2: compute an hydrostatic pressure due to
91 buoyancy forces before the prediction step
92 - 0: no treatment (default) */
93
94 int icalhy; /* compute the hydrostatic pressure in order to
95 compute the Dirichlet conditions on the
96 pressure at outlets
97 - 1: true
98 - 0: false (default) */
99
100 int iprco; /* compute the pressure step thanks to the
101 continuity equation
102 - 1: true (default)
103 - 0: false */
104
105 int ipredfl; /* deprecated:
106 switch on mass flux prediction before momentum
107 solving to be fully conservative in momentum
108 over time for variable density flows. */
109
110 int irevmc; /* reconstruction of the velocity field with the
111 updated pressure option
112 - 0: default */
113
114 int iifren; /* indicates the presence of a Bernoulli boundary
115 face (automatically computed)
116 - 0: no face
117 - 1: at least one face */
118 int irecmf; /* use interpolated face diffusion coefficient
119 instead of cell diffusion coefficient for the
120 mass flux reconstruction for the
121 non-orthogonalities
122 - 1: true
123 - 0: false (default) */
124
125 int igprij; /* improve static pressure algorithm
126 - 1: take -div(rho R) in the static pressure
127 treatment IF iphydr=1
128 - 0: no treatment (default) */
129
130 int igpust; /* improve static pressure algorithm
131 - 1: take user momemtum source terms in the
132 static pressure treatment IF iphydr=1
133 (default)
134 - 0: no treatment */
135
136 int igrdpp; /* For the compressible algorithm, indicate whether
137 the pressure should be updated after solution
138 of the acoustic equation.
139 - 1: true (default)
140 - 0: false */
141
142 int ipucou; /* pseudo coupled pressure-velocity solver
143 - 1: true (default)
144 - 0: false */
145
146 int itpcol; /* time scheme option:
147 - 0: staggered.
148 - 1: colocated time scheme. */
149
150 double arak; /* Arakawa multiplier for the Rhie and Chow
151 filter (1 by default) */
152
153 int rcfact; /* Indicates the factor of the Rhie and Chow
154 filter
155 - 1: dt (default)
156 - 0: 1/A_u */
157
158 int staggered; /* indicates if one works with the 1D staggered
159 scheme
160 - 0: colocated (default)
161 - 1: staggered */
162
163 int nterup; /* number of iterations on the pressure-velocity
164 coupling on Navier-Stokes */
165
166 double epsup; /* relative precision for the convergence test of
167 the iterative process on pressure-velocity
168 coupling */
169
170 double xnrmu; /* norm of the increment
171 \f$ \vect{u}^{k+1} - \vect{u}^k \f$
172 of the iterative process on pressure-velocity
173 coupling */
174
175 double xnrmu0; /* norm of \f$ \vect{u}^0 \f$ */
176
177 double epsdp; /* parameter of diagonal pressure strengthening */
178
180
181/* Deprecated structures (partial compatibilty mode) */
182
185
186/*============================================================================
187 * Static global variables
188 *============================================================================*/
189
190/* Pointer to main velocity pressure coupling model structure */
192
193/* Pointer to main velocity pressure coupling parameters structure */
195
196/*=============================================================================
197 * Public function prototypes
198 *============================================================================*/
199
200/*----------------------------------------------------------------------------
201 * Provide read/write access to cs_glob_velocity_pressure_model
202 *
203 * needed to initialize structure with GUI
204 *----------------------------------------------------------------------------*/
205
208
209/*----------------------------------------------------------------------------*/
217/*----------------------------------------------------------------------------*/
218
221
222/*----------------------------------------------------------------------------
223 *!
224 * \brief Count and set number of buoyant scalars.
225 */
226/*----------------------------------------------------------------------------*/
227
228void
230
231/*----------------------------------------------------------------------------
232 *!
233 * \brief Set `fluid_solid` flag if solid zones are present.
234 */
235/*----------------------------------------------------------------------------*/
236
237void
239
240/*----------------------------------------------------------------------------*/
244/*----------------------------------------------------------------------------*/
245
246void
248
249/*----------------------------------------------------------------------------*/
253/*----------------------------------------------------------------------------*/
254
255void
257
258/*----------------------------------------------------------------------------*/
259
261
262#endif /* __CS_VELOCITY_PRESSURE_H__ */
#define BEGIN_C_DECLS
Definition cs_defs.h:528
#define END_C_DECLS
Definition cs_defs.h:529
cs_velocity_pressure_model_t cs_stokes_model_t
Definition cs_velocity_pressure.h:183
void cs_velocity_pressure_set_n_buoyant_scalars(void)
Definition cs_velocity_pressure.c:498
void cs_velocity_pressure_param_log_setup(void)
Print Velocity-pressure parameters to setup.log.
Definition cs_velocity_pressure.c:621
cs_velocity_pressure_param_t cs_piso_t
Definition cs_velocity_pressure.h:184
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:486
void cs_velocity_pressure_set_solid(void)
Definition cs_velocity_pressure.c:522
cs_velocity_pressure_model_t * cs_get_glob_velocity_pressure_model(void)
Definition cs_velocity_pressure.c:470
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.c:543
Stokes equation model descriptor.
Definition cs_velocity_pressure.h:51
int idilat
Definition cs_velocity_pressure.h:58
int n_buoyant_scal
Definition cs_velocity_pressure.h:71
int iprcdo
Definition cs_velocity_pressure.h:74
int ivisse
Definition cs_velocity_pressure.h:53
bool fluid_solid
Definition cs_velocity_pressure.h:67
Inner velocity/pressure iteration options descriptor.
Definition cs_velocity_pressure.h:84
double xnrmu
Definition cs_velocity_pressure.h:170
double arak
Definition cs_velocity_pressure.h:150
int irevmc
Definition cs_velocity_pressure.h:110
int staggered
Definition cs_velocity_pressure.h:158
int iprco
Definition cs_velocity_pressure.h:100
int nterup
Definition cs_velocity_pressure.h:163
int igprij
Definition cs_velocity_pressure.h:125
int iifren
Definition cs_velocity_pressure.h:114
int iphydr
Definition cs_velocity_pressure.h:86
int irecmf
Definition cs_velocity_pressure.h:118
int icalhy
Definition cs_velocity_pressure.h:94
double xnrmu0
Definition cs_velocity_pressure.h:175
int igrdpp
Definition cs_velocity_pressure.h:136
double epsup
Definition cs_velocity_pressure.h:166
int igpust
Definition cs_velocity_pressure.h:130
int ipredfl
Definition cs_velocity_pressure.h:105
int itpcol
Definition cs_velocity_pressure.h:146
int rcfact
Definition cs_velocity_pressure.h:153
double epsdp
Definition cs_velocity_pressure.h:177
int ipucou
Definition cs_velocity_pressure.h:142