src/gui/cs_gui_specific_physics.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_specific_physics.h
Go to the documentation of this file.
1 #ifndef __CS_GUI_SPECIFIC_PHYSICS_H__
2 #define __CS_GUI_SPECIFIC_PHYSICS_H__
3
4 /*============================================================================
5 * Management of the GUI parameters file: specific physics
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 * Local headers
32 *----------------------------------------------------------------------------*/
33
34 #include "cs_base.h"
35
36 /*----------------------------------------------------------------------------*/
37
38 BEGIN_C_DECLS
39
40 /*============================================================================
41 * Type definitions
42 *============================================================================*/
43
44 /*============================================================================
45 * Public Fortran function prototypes
46 *============================================================================*/
47
48 /*-----------------------------------------------------------------------------
49 * Predefined physics indicator.
50 *
51 * Fortran Interface:
52 *
53 * SUBROUTINE UIPPMO
54 * *****************
55 *
56 * INTEGER IPPMOD <-- specific physics indicator array
57 * INTEGER ICOD3P --> diffusion flame in fast complete chemistry
58 * INTEGER ICODEQ --> diffusion flame in fast chemistry to equilibrium
59 * INTEGER ICOEBU --> Eddy Break Up premixing flame
60 * INTEGER ICOBML --> Bray - Moss - Libby premixing flame
61 * INTEGER ICOLWC --> Libby Williams premixing flame
62 * INTEGER ICP3PL --> Coal combustion. Combustible moyen local
63 * INTEGER ICPL3C --> Coal combustion coupled with lagrangien approach
64 * INTEGER ICFUEL --> Fuel combustion
65 * INTEGER IELJOU --> Joule effect
66 * INTEGER IELARC --> electrical arc
67 * INTEGER IELION --> ionique mobility
68 * INTEGER ICOMPF --> compressible without shock
69 * INTEGER IATMOS --> atmospheric flows
70 * INTEGER IAEROS --> cooling tower
71 * INTEGER INDJON --> INDJON=1: a JANAF enthalpy-temperature
72 * tabulation is used. INDJON=1: users tabulation
73 * INTEGER IEOS --> compressible
74 * INTEGER IEQCO2 --> CO2 massic fraction transport
75 *
76 *----------------------------------------------------------------------------*/
77
78 void CS_PROCF (uippmo, UIPPMO) (int *const ippmod,
79 int *const icod3p,
80 int *const icodeq,
81 int *const icoebu,
82 int *const icobml,
83 int *const icolwc,
84 int *const iccoal,
85 int *const icpl3c,
86 int *const icfuel,
87 int *const ieljou,
88 int *const ielarc,
89 int *const ielion,
90 int *const icompf,
91 int *const iatmos,
92 int *const iaeros,
93 int *const ieos,
94 int *const ieqco2);
95
96 /*----------------------------------------------------------------------------
97 * Density under relaxation
98 *
99 * Fortran Interface:
100 *
101 * SUBROUTINE UICPI1 (SRROM)
102 * *****************
103 * DOUBLE PRECISION SRROM <-- density relaxation
104 * DOUBLE PRECISION DIFTL0 <-- dynamic diffusion
105 *----------------------------------------------------------------------------*/
106
107 void CS_PROCF (uicpi1, UICPI1) (double *const srrom,
108 double *const diftl0);
109
110 /*----------------------------------------------------------------------------
111 * Temperature for D3P Gas Combustion
112 *
113 * Fortran Interface:
114 *
115 * SUBROUTINE UICPI2 (SRROM)
116 * *****************
117 * DOUBLE PRECISION Toxy <-- Oxydant temperature
118 * DOUBLE PRECISION Tfuel <-- Fuel temperature
119 *----------------------------------------------------------------------------*/
120
121 void CS_PROCF (uicpi2, UICPI2) (double *const toxy,
122 double *const tfuel);
123
124 /*----------------------------------------------------------------------------
125 * Pointers definition for scalars and coal combustion
126 *----------------------------------------------------------------------------*/
127
128 void CS_PROCF (uicpsc, UICPSC) (const int *const ncharb,
129 const int *const nclass,
130 const int *const noxyd,
131 const int *const ippmod,
132 const int *const iccoal,
133 const int *const ieqnox,
134 const int *const ieqco2,
135 const int *const ihtco2,
136 const int *const ihth2o,
137 const int *const iscalt,
138 const int *const inp,
139 const int *const ixch,
140 const int *const ixck,
141 const int *const ixwt,
142 const int *const ih2,
143 const int *const if1m,
144 const int *const if2m,
145 const int *const if4m,
146 const int *const if5m,
147 const int *const if6m,
148 const int *const if7m,
149 const int *const if8m,
150 const int *const ifvp2m,
151 const int *const iyco2,
152 const int *const if9m,
153 const int *const iyhcn,
154 const int *const iyno,
155 const int *const ihox,
156 const int *const iynh3);
157
158 /*----------------------------------------------------------------------------
159 * Defintion des pointeurs des proprietes pour la combustion gaz
160 *----------------------------------------------------------------------------*/
161
162 void CS_PROCF (uicppr, UICPPR) (const int *const nclass,
163 const int *const nsalpp,
164 const int *const ippmod,
165 const int *const iccoal,
166 const int *const ipppro,
167 const int *const ipproc,
168 const int *const ieqnox,
169 const int *const ihtco2,
170 const int *const ihth2o,
171 const int *const itemp1,
172 const int *const irom1,
173 const int *const ym1,
174 const int *const ighcn1,
175 const int *const ighcn2,
176 const int *const ignoth,
177 const int *const ignh31,
178 const int *const ignh32,
179 const int *const ifhcnd,
180 const int *const ifhcnc,
181 const int *const ifnh3d,
182 const int *const ifnh3c,
183 const int *const ifnohc,
184 const int *const ifnonh,
185 const int *const ifnoch,
186 const int *const ifnoth,
187 const int *const icnohc,
188 const int *const icnonh,
189 const int *const ifhcnr,
190 const int *const icnorb,
191 const int *const igrb,
192 const int *const immel,
193 const int *const itemp2,
194 const int *const ix2,
195 const int *const irom2,
196 const int *const idiam2,
197 const int *const igmdch,
198 const int *const igmdv1,
199 const int *const igmdv2,
200 const int *const igmhet,
201 const int *const ighco2,
202 const int *const ighh2o,
203 const int *const igmsec,
204 const int *const ibcarbone,
205 const int *const iboxygen,
206 const int *const ibhydrogen);
207
208 /*----------------------------------------------------------------------------
209 * Pointers definition for scalars for compressible model
210 *----------------------------------------------------------------------------*/
211
212 void CS_PROCF (uicfsc, UICFSC) (const int *const ienerg,
213 const int *const itempk);
214
215 /*-----------------------------------------------------------------------------
216 * Indirection between the solver numbering and the XML one
217 * for physical properties of the activated specific physics (electrical model)
218 *----------------------------------------------------------------------------*/
219 void CS_PROCF (uielpr, UIELPR) (const int *const nsalpp,
220 const int *const ippmod,
221 const int *const ipppro,
222 const int *const ipproc,
223 const int *const ieljou,
224 const int *const ielarc,
225 const int *const itemp,
226 const int *const iefjou,
227 const int *const idjr,
228 const int *const idji,
229 const int *const ilapla,
230 const int *const idrad,
231 const int *const ixkabe);
232
233 /*------------------------------------------------------------------------------
234 * Indirection between the solver numbering and the XML one
235 * for the model scalar (electrical model)
236 *----------------------------------------------------------------------------*/
237 void CS_PROCF (uielsc, UIELSC) (const int *const ippmod,
238 const int *const ieljou,
239 const int *const ielarc,
240 const int *const ngazg,
241 const int *const iscalt,
242 const int *const ipotr,
243 const int *const iycoel,
244 const int *const ipoti,
245 const int *const ipotva);
246
247 /*-----------------------------------------------------------------------------
248 * Indirection between the solver numbering and the XML one
249 * for physical properties of the activated specific physics (gaz combustion)
250 *----------------------------------------------------------------------------*/
251
252 void CS_PROCF (uicopr, UICOPR) (const int *const nsalpp,
253 const int *const ippmod,
254 const int *const ipppro,
255 const int *const ipproc,
256 const int *const icolwc,
257 const int *const iirayo,
258 const int *const itemp,
259 const int *const imam,
260 const int *const iym,
261 const int *const ickabs,
262 const int *const it4m,
263 const int *const it3m,
264 const int *const itsc,
265 const int *const irhol,
266 const int *const iteml,
267 const int *const ifmel,
268 const int *const ifmal,
269 const int *const iampl,
270 const int *const itscl,
271 const int *const imaml);
272
273 /*------------------------------------------------------------------------------
274 * Indirection between the solver numbering and the XML one
275 * for the model scalar (gas combustion)
276 *----------------------------------------------------------------------------*/
277
278 void CS_PROCF (uicosc, UICOSC) (const int *const ippmod,
279 const int *const icolwc,
280 const int *const icoebu,
281 const int *const icod3p,
282 const int *const iscalt,
283 const int *const ifm,
284 const int *const ifp2m,
285 const int *const iygfm,
286 const int *const iyfm,
287 const int *const iyfp2m,
288 const int *const icoyfp);
289
290 /*----------------------------------------------------------------------------
291 * Electrical model : read parameters
292 *
293 * Fortran Interface:
294 *
295 * subroutine uieli1
296 * *****************
297 * integer ieljou --> joule model
298 * integer ielarc --> arc model
299 * integer ielcor <-- scaling electrical variables
300 * double couimp <-- imposed current intensity
301 * double puisim <-- imposed power
302 * integer modrec <-- scaling type for electric arc
303 * integer idrecal <-- current density component used to scaling
304 * (modrec ==2)
305 * char crit_reca <-- define criteria for plane used to scaling (modrec ==2)
306 *----------------------------------------------------------------------------*/
307
308 void CS_PROCF (uieli1, UIELI1) (const int *const ieljou,
309 const int *const ielarc,
310 int *const ielcor,
311 double *const couimp,
312 double *const puisim,
313 int *const modrec,
314 int *const idreca,
315 double *const crit_reca);
316
317 /*----------------------------------------------------------------------------
318 * Electrical model : define plane for elreca
319 *
320 * Fortran Interface:
321 *
322 * subroutine uielrc
323 * *****************
324 * integer izreca <-- define plane used to scaling (modrec ==2)
325 * char crit_reca <-- define criteria for plane used to scaling (modrec ==2)
326 *----------------------------------------------------------------------------*/
327
328 void CS_PROCF (uielrc, UIELRC) (int *const izreca,
329 double *const crit_reca);
330
331 /*----------------------------------------------------------------------------
332 * Atmospheric flows: read of meteorological file of data
333 *
334 * Fortran Interface:
335 *
336 * subroutine uiati1
337 * *****************
338 * integer imeteo <-- on/off index
339 * char(*) fmeteo <-- meteo file name
340 * int len <-- meteo file name destination string length
341 *----------------------------------------------------------------------------*/
342
343 void CS_PROCF (uiati1, UIATI1) (int *imeteo,
344 char *fmeteo,
345 int *len
346 CS_ARGF_SUPP_CHAINE);
347
348 /*----------------------------------------------------------------------------
349 * Atmospheric flows: indirection between the solver numbering and the XML one
350 * for physical properties
351 *
352 * Fortran Interface:
353 *
354 * subroutine uiatpr
355 * *****************
356 * integer nsalpp -->
357 * integer ippmod --> specific physics indicator array
358 * integer iatmos --> index for atmospheric flow
359 * integer ipppro -->
360 * integer ipproc -->
361 * integer itempc --> index for real temperature
362 * integer iliqwt --> index for liquid water
363 *----------------------------------------------------------------------------*/
364
365 void CS_PROCF (uiatpr, UIATPR) (const int *const nsalpp,
366 const int *const ippmod,
367 const int *const iatmos,
368 const int *const ipppro,
369 const int *const ipproc,
370 const int *const itempc,
371 const int *const iliqwt);
372
373 /*----------------------------------------------------------------------------
374 * Atmospheric flows: indirection between the solver numbering and the XML one
375 * for models scalars.
376 *
377 * Fortran Interface:
378 *
379 * subroutine uiatsc
380 * *****************
381 * integer ippmod --> specific physics indicator array
382 * integer iatmos --> index for atmospheric flow
383 * integer iscalt --> index for thermal variable
384 * integer itotwt --> index for total water content
385 * integer intdrp --> index for total number of droplets
386 *----------------------------------------------------------------------------*/
387
388 void CS_PROCF (uiatsc, UIATSC) (const int *const ippmod,
389 const int *const iatmos,
390 const int *const iscalt,
391 const int *const itotwt,
392 const int *const intdrp);
393
394 /*----------------------------------------------------------------------------
395 * Indirection between the solver numbering and the XML one
396 * for physical properties of the activated specific physics (pulverized solid fuels)
397 *----------------------------------------------------------------------------*/
398
399 void CS_PROCF (uisofu, UISOFU) (const int *const ippmod,
400 const int *const iccoal,
401 const int *const icpl3c,
402 const int *const iirayo,
403 const int *const iihmpr,
404 const int *const ncharm,
405 int *const ncharb,
406 int *const nclpch,
407 int *const nclacp,
408 const int *const ncpcmx,
409 int *const ichcor,
410 double *const diam20,
411 double *const cch,
412 double *const hch,
413 double *const och,
414 double *const nch,
415 double *const sch,
416 double *const ipci,
417 double *const pcich,
418 double *const cp2ch,
419 double *const rho0ch,
420 double *const thcdch,
421 double *const cck,
422 double *const hck,
423 double *const ock,
424 double *const nck,
425 double *const sck,
426 double *const xashch,
427 double *const xashsec,
428 double *const xwatch,
429 double *const h0ashc,
430 double *const cpashc,
431 int *const iy1ch,
432 double *const y1ch,
433 int *const iy2ch,
434 double *const y2ch,
435 double *const a1ch,
436 double *const a2ch,
437 double *const e1ch,
438 double *const e2ch,
439 double *const crepn1,
440 double *const crepn2,
441 double *const ahetch,
442 double *const ehetch,
443 int *const iochet,
444 double *const ahetc2,
445 double *const ehetc2,
446 int *const ioetc2,
447 double *const ahetwt,
448 double *const ehetwt,
449 int *const ioetwt,
450 int *const ieqnox,
451 int *const imdnox,
452 int *const irb,
453 int *const ihtco2,
454 int *const ihth2o,
455 double *const qpr,
456 double *const fn,
457 double *const ckabs1,
458 int *const noxyd,
459 double *const oxyo2,
460 double *const oxyn2,
461 double *const oxyh2o,
462 double *const oxyco2,
463 double *const repnck,
464 double *const repnle,
465 double *const repnlo);
466
467 /*----------------------------------------------------------------------------
468 * Copy name of thermophysical data file from C to Fortran
469 *----------------------------------------------------------------------------*/
470
471 void CS_PROCF(cfnmtd, CFNMTD) (char *fstr, /* --> Fortran string */
472 int *len /* --> String Length */
473 CS_ARGF_SUPP_CHAINE);
474
475 /*=============================================================================
476 * Public function prototypes
477 *============================================================================*/
478
479 /*-----------------------------------------------------------------------------
480 * Return the name of a thermophysical model.
481 *
482 * parameter:
483 * model_thermo --> thermophysical model
484 *----------------------------------------------------------------------------*/
485
486 char *
487 cs_gui_get_thermophysical_model(const char *const model_thermo);
488
489 /*-----------------------------------------------------------------------------
490 * Modify double numerical parameters.
491 *
492 * parameters:
493 * param --> label of the numerical parameter
494 * keyword <--> value of the numerical parameter
495 *----------------------------------------------------------------------------*/
496
497 void
498 cs_gui_numerical_double_parameters(const char *const param,
499 double *const keyword);
500
501 /*-----------------------------------------------------------------------------
502 * Return if a predifined physics model is activated.
503 *----------------------------------------------------------------------------*/
504
505 int
506 cs_gui_get_activ_thermophysical_model(void);
507
508 /*----------------------------------------------------------------------------*/
509
510 END_C_DECLS
511
512 #endif /* __CS_GUI_SPECIFIC_PHYSICS_H__ */