src/gui/cs_gui_boundary_conditions.h Source File

| programmer's documentation

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- File List
- Globals

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
cs_gui_boundary_conditions.h
Go to the documentation of this file.
1 #ifndef __CS_GUI_BOUNDARY_CONDITION_H__
2 #define __CS_GUI_BOUNDARY_CONDITION_H__
3
4 /*============================================================================
5 * Management of the GUI parameters file: boundary conditions
6 *============================================================================*/
7
8 /*
9 This file is part of Code_Saturne, a general-purpose CFD tool.
10
11 Copyright (C) 1998-2013 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 * MEI library headers
32 *----------------------------------------------------------------------------*/
33
34 #include "mei_evaluate.h"
35
36 /*----------------------------------------------------------------------------
37 * Local headers
38 *----------------------------------------------------------------------------*/
39
40 #include "cs_base.h"
41
42 /*----------------------------------------------------------------------------*/
43
44 BEGIN_C_DECLS
45
46 /*============================================================================
47 * Type definitions
48 *============================================================================*/
49
50 /*----------------------------------------------------------------------------
51 * Structures associated to boundary conditions definition
52 *----------------------------------------------------------------------------*/
53
54 typedef struct {
55 double val1; /* fortran array RCODCL(.,.,1) mapping */
56 double val2; /* fortran array RCODCL(.,.,2) mapping */
57 double val3; /* fortran array RCODCL(.,.,3) mapping */
58 } cs_val_t;
59
60 typedef struct {
61 int read_data; /* 1 if profile is calculated from data */
62 int automatic; /* 1 if nature of the boundary is automatic */
63 } cs_meteo_t;
64
65 typedef struct {
66 char **label; /* label for each boundary zone */
67 char **nature; /* nature for each boundary zone */
68 int *iqimp; /* 1 if a flow rate is applied */
69 int *ientfu; /* 1 for a fuel flow inlet (gas combustion - D3P) */
70 int *ientox; /* 1 for an air flow inlet (gas combustion - D3P) */
71 int *ientgb; /* 1 for burned gas inlet (gas combustion) */
72 int *ientgf; /* 1 for unburned gas inlet (gas combustion) */
73 int *ientat; /* 1 if inlet for oxydant (coal combustion) */
74 int *ientcp; /* 1 if inlet for oxydant+coal (coal combustion) */
75 int *icalke; /* automatic boundaries for turbulent variables */
76 double *qimp; /* oxydant flow rate (coal combustion) */
77 double *inmoxy; /* oxydant number (coal combustion) */
78 double *timpat; /* inlet temperature of oxydant (coal combustion) */
79 double *tkent; /* inlet temperature (gas combustion) */
80 double **qimpcp; /* inlet coal flow rate (coal combustion) */
81 double **timpcp; /* inlet coal temperature (coal combustion) */
82 double *fment; /* Mean Mixture Fraction at Inlet (gas combustion) */
83 int *itype; /* type of inlet/outlet (compressible model) */
84 double *prein; /* inlet pressure (compressible model) */
85 double *rhoin; /* inlet density (compressible model) */
86 double *tempin; /* inlet temperature (compressible model) */
87 double *entin; /* inlet total energy (compressible model) */
88 double *preout; /* outlet pressure for subsonic(compressible model)*/
89 double *dh; /* inlet hydraulic diameter */
90 double *xintur; /* inlet turbulent intensity */
91 int **type_code; /* type of boundary for each variables */
92 cs_val_t **values; /* fortran array RCODCL mapping */
93 double ***distch; /* ratio for each coal */
94 double *rough; /* roughness size */
95 double *norm; /* norm of velocity vector */
96 double *dirx; /* directions x inlet velocity */
97 double *diry; /* directions y inlet velocity */
98 double *dirz; /* directions z inlet velocity */
99 mei_tree_t **velocity; /* formula for norm or mass flow rate of velocity */
100 mei_tree_t **direction; /* formula for direction of velocity */
101 cs_meteo_t *meteo; /* inlet or outlet info for atmospheric flow */
102 mei_tree_t ***scalar; /* formula for scalar (neumann, dirichlet or
103 exchange coefficient)*/
104 } cs_boundary_t;
105
106 /*============================================================================
107 * Static global variables
108 *============================================================================*/
109
110 /* Pointer on the main boundaries structure */
111
112 extern cs_boundary_t *boundaries;
113
114 /*============================================================================
115 * Public function prototypes for Fortran API
116 *============================================================================*/
117 /*----------------------------------------------------------------------------
118 * Boundary conditions treatment
119 *
120 * Remember: rdoccl[k][j][i] = rcodcl[ k * dim1 *dim2 + j *dim1 + i]
121 *
122 * Fortran Interface:
123 *
124 * subroutine uiclim
125 * *****************
126 *----------------------------------------------------------------------------*/
127
128 void CS_PROCF (uiclim, UICLIM)(const int *ntcabs,
129 const int *nfabor,
130 const int *nozppm,
131 const int *ncharm,
132 const int *ncharb,
133 const int *nclpch,
134 const int *iindef,
135 const int *ientre,
136 const int *iesicf,
137 const int *isspcf,
138 const int *iephcf,
139 const int *isopcf,
140 const int *iparoi,
141 const int *iparug,
142 const int *isymet,
143 const int *isolib,
144 const int *isca,
145 const int *ipr,
146 const int *iscalt,
147 const int *itempk,
148 const int *ienerg,
149 int *iqimp,
150 int *icalke,
151 int *ientat,
152 int *ientcp,
153 int *inmoxy,
154 int *ientox,
155 int *ientfu,
156 int *ientgf,
157 int *ientgb,
158 int *iprofm,
159 double *coejou,
160 double *dpot,
161 cs_real_t rtpa[],
162 int *ielcor,
163 int *ipotr,
164 int *ipoti,
165 int ipotva[],
166 int *ncelet,
167 int *itypfb,
168 int *izfppp,
169 int *icodcl,
170 double *dtref,
171 double *ttcabs,
172 double *surfbo,
173 double *cdgfbo,
174 double *qimp,
175 double *qimpat,
176 double *qimpcp,
177 double *dh,
178 double *xintur,
179 double *timpat,
180 double *timpcp,
181 double *tkent,
182 double *fment,
183 double *distch,
184 double *rcodcl);
185
186 /*----------------------------------------------------------------------------
187 * Boundary conditions input verification
188 *
189 * Fortran Interface:
190 *
191 * SUBROUTINE UICLVE
192 * *****************
193 *
194 * INTEGER NFABOR --> number of boundary faces
195 * INTEGER NOZPPM --> max number of boundary conditions zone
196 * INTEGER IINDEF --> type of boundary: not defined
197 * INTEGER IENTRE --> type of boundary: inlet
198 * INTEGER IESICF --> type of boundary: imposed inlet (compressible)
199 * INTEGER ISSPCF --> type of boundary: supersonic outlet (compressible)
200 * INTEGER IEPHCF --> type of boundary: subsonic inlet imposed total pressure and total enthalpy (compressible)
201 * INTEGER ISOPCF --> type of boundary: subsonic outlet (compressible)
202 * INTEGER IPAROI --> type of boundary: wall
203 * INTEGER IPARUG --> type of boundary: wall with rugosity
204 * INTEGER ISYMET --> type of boundary: symmetry
205 * INTEGER ISOLIB --> type of boundary: outlet
206 * INTEGER ITYPFB --> type of boundary for each face
207 * INTEGER IZFPPP --> zone number
208 *----------------------------------------------------------------------------*/
209
210 void CS_PROCF (uiclve, UICLVE) (const int *nfabor,
211 const int *nozppm,
212 const int *iindef,
213 const int *ientre,
214 const int *iesicf,
215 const int *iephcf,
216 const int *isspcf,
217 const int *isopcf,
218 const int *iparoi,
219 const int *iparug,
220 const int *isymet,
221 const int *isolib,
222 int *itypfb,
223 int *izfppp);
224
225 /*=============================================================================
226 * Public function prototypes
227 *============================================================================*/
228
229 /*-----------------------------------------------------------------------------
230 * Return number of boundary regions definition
231 *----------------------------------------------------------------------------*/
232
233 int
234 cs_gui_boundary_zones_number(void);
235
236 /*-----------------------------------------------------------------------------
237 * Return the nature of boundary condition for the given zone
238 *----------------------------------------------------------------------------*/
239
240 char *
241 cs_gui_boundary_zone_nature(int ith_zone);
242
243 /*-----------------------------------------------------------------------------
244 * Return the label of boundary condition for the given zone
245 *----------------------------------------------------------------------------*/
246
247 char *
248 cs_gui_boundary_zone_label(int ith_zone);
249
250 /*-----------------------------------------------------------------------------
251 * Return the zone number of boundary condition for the given zone
252 *----------------------------------------------------------------------------*/
253
254 int
255 cs_gui_boundary_zone_number(int ith_zone);
256
257 /*-----------------------------------------------------------------------------
258 * Return the description of a boundary zone
259 *
260 * parameters:
261 * label <-- label of boundary zone
262 *----------------------------------------------------------------------------*/
263
264 char *
265 cs_gui_boundary_zone_localization(const char *label);
266
267 /*-----------------------------------------------------------------------------
268 * Helper to get the face list for the izone
269 *
270 * parameters:
271 * izone <-- zone index
272 * label <-- boundary label
273 * nfabor <-- number of boundary faces
274 * nozppm <-- max number of boundary zone for preefined physics
275 * faces --> number of faces
276 *----------------------------------------------------------------------------*/
277
278 int*
279 cs_gui_get_faces_list(int izone,
280 const char *label,
281 int nfabor,
282 int nozppm,
283 int *faces );
284
285 /*----------------------------------------------------------------------------
286 * Free boundary conditions structures
287 *
288 * parameters:
289 * ncharb <-- number of coals
290 *----------------------------------------------------------------------------*/
291
292 void
293 cs_gui_boundary_conditions_free_memory(const int *ncharb);
294
295 /*----------------------------------------------------------------------------*/
296
297 END_C_DECLS
298
299 #endif /* __CS_GUI_BOUNDARY_CONDITION_H__ */