1
/*============================================================================
3
* This file is part of the Code_Saturne Kernel, element of the
4
* Code_Saturne CFD tool.
6
* Copyright (C) 1998-2009 EDF S.A., France
8
* contact: saturne-support@edf.fr
10
* The Code_Saturne Kernel is free software; you can redistribute it
11
* and/or modify it under the terms of the GNU General Public License
12
* as published by the Free Software Foundation; either version 2 of
13
* the License, or (at your option) any later version.
15
* The Code_Saturne Kernel is distributed in the hope that it will be
16
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty
17
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
* GNU General Public License for more details.
20
* You should have received a copy of the GNU General Public License
21
* along with the Code_Saturne Kernel; if not, write to the
22
* Free Software Foundation, Inc.,
23
* 51 Franklin St, Fifth Floor,
24
* Boston, MA 02110-1301 USA
26
*============================================================================*/
28
#ifndef __CS_GUI_BOUNDARY_CONDITION_H__
29
#define __CS_GUI_BOUNDARY_CONDITION_H__
31
/*============================================================================
32
* Management of the GUI parameters file: boundary conditions
33
*============================================================================*/
35
/*----------------------------------------------------------------------------
37
*----------------------------------------------------------------------------*/
40
#include "mei_evaluate.h"
43
/*----------------------------------------------------------------------------
45
*----------------------------------------------------------------------------*/
49
/*----------------------------------------------------------------------------*/
53
/*============================================================================
55
*============================================================================*/
57
/*----------------------------------------------------------------------------
58
* Structures associated to boundary conditions definition
59
*----------------------------------------------------------------------------*/
62
double val1; /* fortran array RCODCL(.,.,1) mapping */
63
double val2; /* fortran array RCODCL(.,.,2) mapping */
64
double val3; /* fortran array RCODCL(.,.,3) mapping */
68
int read_data; /* 1 if profile is calculated from data */
69
int automatic; /* 1 if nature of the boundary is automatic */
73
char **label; /* label for each boundary zone */
74
char **nature; /* nature for each boundary zone */
75
int *iqimp; /* 1 if a flow rate is applied */
76
int *ientat; /* 1 if inlet for oxydant (coal combustion) */
77
int *ientcp; /* 1 if inlet for oxydant+coal (coal combustion) */
78
int *icalke; /* automatic boundaries for turbulent variables */
79
double *qimp; /* oxydant flow rate (coal combustion) */
80
double *inmoxy; /* oxydant number (coal combustion) */
81
double *timpat; /* inlet temperature of oxydant (coal combustion) */
82
double **qimpcp; /* inlet coal flow rate (coal combustion) */
83
double **timpcp; /* inlet coal temperature (coal combustion) */
84
double *dh; /* inlet hydraulic diameter */
85
double *xintur; /* inlet turbulent intensity */
86
int **type_code; /* type of boundary for each variables */
87
cs_val_t **values; /* fortran array RCODCL mapping */
88
double ***distch; /* ratio for each coal */
89
double *rough; /* roughness size */
90
double *norm; /* norm of velocity vector */
91
double *dirx; /* directions x inlet velocity */
92
double *diry; /* directions y inlet velocity */
93
double *dirz; /* directions z inlet velocity */
95
mei_tree_t **velocity; /* formula for norm or mass flow rate of velocity */
96
mei_tree_t **direction; /* formula for direction of velocity */
98
cs_meteo_t *meteo; /* inlet or outlet info for atmospheric flow */
102
/*----------------------------------------------------------------------------
103
* Enum for boundary conditions
104
*----------------------------------------------------------------------------*/
115
} cs_boundary_value_t;
117
/*============================================================================
118
* Static global variables
119
*============================================================================*/
121
/* Pointer on the main boundaries structure */
123
extern cs_boundary_t *boundaries;
125
/*============================================================================
126
* Public function prototypes for Fortran API
127
*============================================================================*/
129
/*----------------------------------------------------------------------------
130
* Boundary conditions treatment
137
* INTEGER NTCABS --> current iteration number
138
* INTEGER NFABOR --> number of boundary faces
139
* INTEGER NOZPPM --> max number of boundary conditions zone
140
* INTEGER NCHARM --> maximal number of coals
141
* INTEGER NCHARB --> number of simulated coals
142
* INTEGER NCLPCH --> number of simulated class per coals
143
* INTEGER IINDEF --> type of boundary: not defined
144
* INTEGER IENTRE --> type of boundary: inlet
145
* INTEGER IPAROI --> type of boundary: smooth wall
146
* INTEGER IPARUG --> type of boundary: rough wall
147
* INTEGER ISYMET --> type of boundary: symetry
148
* INTEGER ISOLIB --> type of boundary: outlet
149
* INTEGER IQIMP --> 1 if flow rate is applied
150
* INTEGER ICALKE --> 1 for automatic turbulent boundary conditions
151
* INTEGER IENTAT --> 1 for air temperature boundary conditions (coal)
152
* INTEGER IENTCP --> 1 for coal temperature boundary conditions (coal)
153
* INTEGER inmoxy --> oxydant number (coal)
154
* integer iprofm --> atmospheric flows: on/off for profile from data
155
* INTEGER ITYPFB --> type of boundary for each face
156
* INTEGER IZFPPP --> zone number for each boundary face
157
* INTEGER ICODCL --> boundary conditions array type
158
* DOUBLE PRECISION DTREF --> time step
159
* DOUBLE PRECISION TTCABS --> current time
160
* DOUBLE PRECISION SURFBO --> boundary faces surface
161
* DOUBLE PRECISION CGDFBO --> boundary faces center of gravity
162
* DOUBLE PRECISION QIMP --> inlet flow rate
163
* DOUBLE PRECISION QIMPAT --> inlet air flow rate (coal)
164
* DOUBLE PRECISION QIMPCP --> inlet coal flow rate (coal)
165
* DOUBLE PRECISION DH --> hydraulic diameter
166
* DOUBLE PRECISION XINTUR --> turbulent intensity
167
* DOUBLE PRECISION TIMPAT --> air temperature boundary conditions (coal)
168
* DOUBLE PRECISION TIMPCP --> inlet coal temperature (coal)
169
* DOUBLE PRECISION DISTCH --> ratio for each coal
170
* DOUBLE PRECISION RCODCL --> boundary conditions array value
171
*----------------------------------------------------------------------------*/
173
void CS_PROCF (uiclim, UICLIM)(const int *const ntcabs,
174
const int *const nfabor,
175
const int *const nozppm,
176
const int *const ncharm,
177
const int *const ncharb,
178
const int *const nclpch,
179
const int *const iindef,
180
const int *const ientre,
181
const int *const iparoi,
182
const int *const iparug,
183
const int *const isymet,
184
const int *const isolib,
195
double *const ttcabs,
196
double *const surfbo,
197
double *const cdgfbo,
199
double *const qimpat,
200
double *const qimpcp,
202
double *const xintur,
203
double *const timpat,
204
double *const timpcp,
205
double *const distch,
206
double *const rcodcl);
208
/*----------------------------------------------------------------------------
209
* Boundary conditions input verification
216
* INTEGER NFABOR --> number of boundary faces
217
* INTEGER NOZPPM --> max number of boundary conditions zone
218
* INTEGER IINDEF --> type of boundary: not defined
219
* INTEGER IENTRE --> type of boundary: inlet
220
* INTEGER IPAROI --> type of boundary: wall
221
* INTEGER IPARUG --> type of boundary: wall with rugosity
222
* INTEGER ISYMET --> type of boundary: symmetry
223
* INTEGER ISOLIB --> type of boundary: outlet
224
* INTEGER ITYPFB --> type of boundary for each face
225
* INTEGER IZFPPP --> zone number
226
*----------------------------------------------------------------------------*/
228
void CS_PROCF (uiclve, UICLVE) (const int *const nfabor,
229
const int *const nozppm,
230
const int *const iindef,
231
const int *const ientre,
232
const int *const iparoi,
233
const int *const iparug,
234
const int *const isymet,
235
const int *const isolib,
239
/*=============================================================================
240
* Public function prototypes
241
*============================================================================*/
243
/*-----------------------------------------------------------------------------
244
* Return number of boundary regions definition
245
*----------------------------------------------------------------------------*/
248
cs_gui_boundary_zones_number(void);
250
/*-----------------------------------------------------------------------------
251
* Return the nature of boundary condition for the given zone
252
*----------------------------------------------------------------------------*/
255
cs_gui_boundary_zone_nature(const int ith_zone);
257
/*-----------------------------------------------------------------------------
258
* Return the label of boundary condition for the given zone
259
*----------------------------------------------------------------------------*/
262
cs_gui_boundary_zone_label(const int ith_zone);
264
/*-----------------------------------------------------------------------------
265
* Return the zone number of boundary condition for the given zone
266
*----------------------------------------------------------------------------*/
269
cs_gui_boundary_zone_number(const int ith_zone);
271
/*-----------------------------------------------------------------------------
272
* Return the description of a boundary zone
275
* label --> label of boundary zone
276
*----------------------------------------------------------------------------*/
279
cs_gui_boundary_zone_localization(const char *const label);
281
/*-----------------------------------------------------------------------------
282
* Helper to get the face list for the izone
285
* izone --> zone index
286
* label --> boundary label
287
* nfabor --> number of boundary faces
288
* nozppm --> max number of boundary zone for preefined physics
289
* faces <-- number of face
290
*----------------------------------------------------------------------------*/
293
cs_gui_get_faces_list(const int izone,
299
/*----------------------------------------------------------------------------
302
* INTEGER NCHARB --> number of coal
303
*----------------------------------------------------------------------------*/
306
cs_gui_boundary_conditions_free_memory(const int *const ncharb);
308
/*----------------------------------------------------------------------------*/
312
#endif /* __CS_GUI_BOUNDARY_CONDITION_H__ */