programmer's documentation
 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-2016 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 
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  * INTEGER IDARCY --> darcy model
76  *
77  *----------------------------------------------------------------------------*/
78 
79 void CS_PROCF (uippmo, UIPPMO) (int *const ippmod,
80  int *const icod3p,
81  int *const icodeq,
82  int *const icoebu,
83  int *const icobml,
84  int *const icolwc,
85  int *const iccoal,
86  int *const icpl3c,
87  int *const icfuel,
88  int *const ieljou,
89  int *const ielarc,
90  int *const ielion,
91  int *const icompf,
92  int *const iatmos,
93  int *const iaeros,
94  int *const ieos,
95  int *const ieqco2,
96  int *const idarcy);
97 
98 /*----------------------------------------------------------------------------
99  * Density under relaxation
100  *
101  * Fortran Interface:
102  *
103  * SUBROUTINE UICPI1 (SRROM)
104  * *****************
105  * DOUBLE PRECISION SRROM <-- density relaxation
106  * DOUBLE PRECISION DIFTL0 <-- dynamic diffusion
107  *----------------------------------------------------------------------------*/
108 
109 void CS_PROCF (uicpi1, UICPI1) (double *const srrom,
110  double *const diftl0);
111 
112 /*----------------------------------------------------------------------------
113  * Temperature for D3P Gas Combustion
114  *
115  * Fortran Interface:
116  *
117  * SUBROUTINE UICPI2 (SRROM)
118  * *****************
119  * DOUBLE PRECISION Toxy <-- Oxydant temperature
120  * DOUBLE PRECISION Tfuel <-- Fuel temperature
121  *----------------------------------------------------------------------------*/
122 
123 void CS_PROCF (uicpi2, UICPI2) (double *const toxy,
124  double *const tfuel);
125 
126 /*----------------------------------------------------------------------------
127  * Electrical model : read parameters
128  *
129  * Fortran Interface:
130  *
131  * subroutine uieli1
132  * *****************
133  * integer ieljou --> joule model
134  * integer ielarc --> arc model
135  * integer ielcor <-- scaling electrical variables
136  * double couimp <-- imposed current intensity
137  * double puisim <-- imposed power
138  * integer modrec <-- scaling type for electric arc
139  * integer idrecal <-- current density component used to scaling
140  * (modrec ==2)
141  * char crit_reca <-- define criteria for plane used to scaling (modrec ==2)
142  *----------------------------------------------------------------------------*/
143 
144 void CS_PROCF (uieli1, UIELI1) (const int *const ieljou,
145  const int *const ielarc,
146  int *const ielcor,
147  double *const couimp,
148  double *const puisim,
149  int *const modrec,
150  int *const idreca,
151  double *const crit_reca);
152 
153 /*----------------------------------------------------------------------------
154  * Electrical model : define plane for elreca
155  *
156  * Fortran Interface:
157  *
158  * subroutine uielrc
159  * *****************
160  * integer izreca <-- define plane used to scaling (modrec ==2)
161  * char crit_reca <-- define criteria for plane used to scaling (modrec ==2)
162  *----------------------------------------------------------------------------*/
163 
164 void CS_PROCF (uielrc, UIELRC) (int *const izreca,
165  double *const crit_reca);
166 
167 /*----------------------------------------------------------------------------
168  * Atmospheric flows: read of meteorological file of data
169  *
170  * Fortran Interface:
171  *
172  * subroutine uiati1
173  * *****************
174  * integer imeteo <-- on/off index
175  * char(*) fmeteo <-- meteo file name
176  * int len <-- meteo file name destination string length
177  *----------------------------------------------------------------------------*/
178 
179 void CS_PROCF (uiati1, UIATI1) (int *imeteo,
180  char *fmeteo,
181  int *len
183 
184 
185 /*----------------------------------------------------------------------------
186  * Indirection between the solver numbering and the XML one
187  * for physical properties of the activated specific physics (pulverized solid fuels)
188  *----------------------------------------------------------------------------*/
189 
190 void CS_PROCF (uisofu, UISOFU) (const int *const ippmod,
191  const int *const iccoal,
192  const int *const icpl3c,
193  const int *const iirayo,
194  const int *const iihmpr,
195  const int *const ncharm,
196  int *const ncharb,
197  int *const nclpch,
198  int *const nclacp,
199  const int *const ncpcmx,
200  int *const ichcor,
201  double *const diam20,
202  double *const cch,
203  double *const hch,
204  double *const och,
205  double *const nch,
206  double *const sch,
207  int *const ipci,
208  double *const pcich,
209  double *const cp2ch,
210  double *const rho0ch,
211  double *const thcdch,
212  double *const cck,
213  double *const hck,
214  double *const ock,
215  double *const nck,
216  double *const sck,
217  double *const xashch,
218  double *const xashsec,
219  double *const xwatch,
220  double *const h0ashc,
221  double *const cpashc,
222  int *const iy1ch,
223  double *const y1ch,
224  int *const iy2ch,
225  double *const y2ch,
226  double *const a1ch,
227  double *const a2ch,
228  double *const e1ch,
229  double *const e2ch,
230  double *const crepn1,
231  double *const crepn2,
232  double *const ahetch,
233  double *const ehetch,
234  int *const iochet,
235  double *const ahetc2,
236  double *const ehetc2,
237  int *const ioetc2,
238  double *const ahetwt,
239  double *const ehetwt,
240  int *const ioetwt,
241  int *const ieqnox,
242  int *const imdnox,
243  int *const irb,
244  int *const ihtco2,
245  int *const ihth2o,
246  double *const qpr,
247  double *const fn,
248  double *const ckabs1,
249  int *const noxyd,
250  double *const oxyo2,
251  double *const oxyn2,
252  double *const oxyh2o,
253  double *const oxyco2,
254  double *const repnck,
255  double *const repnle,
256  double *const repnlo);
257 
258 /*----------------------------------------------------------------------------
259  * Copy name of thermophysical data file from C to Fortran
260  *----------------------------------------------------------------------------*/
261 
262 void CS_PROCF(cfnmtd, CFNMTD) (char *fstr, /* --> Fortran string */
263  int *len /* --> String Length */
265 
266 
267 /*----------------------------------------------------------------------------
268  * darcy model : read parameters
269  *
270  * Fortran Interface:
271  *
272  * subroutine uidai1
273  * *****************
274  * integer iricha --> richards model
275  * integer permeability <-- permeability type
276  * integer diffusion <-- diffusion type
277  * integer unsteady <-- steady flow
278  * integer convergence <-- convergence criterion of Newton scheme
279  * integer gravity <-- check if gravity is taken into account
280  * double gravity_x <-- x component for gravity vector
281  * double gravity_y <-- y component for gravity vector
282  * double gravity_z <-- z component for gravity vector
283  *----------------------------------------------------------------------------*/
284 
285 void CS_PROCF (uidai1, UIDAI1) (const int *const idarcy,
286  int *const permeability,
287  int *const diffusion,
288  int *const unsteady,
289  int *const convergence,
290  int *const gravity,
291  double *gravity_x,
292  double *gravity_y,
293  double *gravity_z);
294 
295 
296 /*=============================================================================
297  * Public function prototypes
298  *============================================================================*/
299 
300 /*-----------------------------------------------------------------------------
301  * Return the name of a thermophysical model.
302  *
303  * parameter:
304  * model_thermo --> thermophysical model
305  *----------------------------------------------------------------------------*/
306 
307 char *
308 cs_gui_get_thermophysical_model(const char *const model_thermo);
309 
310 /*-----------------------------------------------------------------------------
311  * Modify double numerical parameters.
312  *
313  * parameters:
314  * param --> label of the numerical parameter
315  * keyword <--> value of the numerical parameter
316  *----------------------------------------------------------------------------*/
317 
318 void
319 cs_gui_numerical_double_parameters(const char *const param,
320  double *const keyword);
321 
322 /*-----------------------------------------------------------------------------
323  * Return if a predifined physics model is activated.
324  *----------------------------------------------------------------------------*/
325 
326 int
328 
329 /*------------------------------------------------------------------------------
330  * Set GUI-defined labels for the atmospheric module
331  *----------------------------------------------------------------------------*/
332 
333 void
335 
336 /*------------------------------------------------------------------------------
337  * Set GUI-defined labels for the coal combustion module
338  *
339  * parameters:
340  * n_coals <-- number of coals
341  * n_classes <-- number of coal classes
342  *----------------------------------------------------------------------------*/
343 
344 void
346  int n_classes);
347 
348 /*------------------------------------------------------------------------------
349  * Set GUI-defined labels for the electric arcs module
350  *
351  * parameters:
352  * n_gasses <-- number of constituent gasses
353  *----------------------------------------------------------------------------*/
354 
355 void
356 cs_gui_labels_electric_arcs(int n_gasses);
357 
358 /*------------------------------------------------------------------------------
359  * Set GUI-defined labels for the gas combustion variables
360  *----------------------------------------------------------------------------*/
361 
362 void
364 
365 /*------------------------------------------------------------------------------
366  * Set GUI-defined labels for the compressible model variables
367  *----------------------------------------------------------------------------*/
368 
369 void
371 
372 /*----------------------------------------------------------------------------*/
373 
375 
376 #endif /* __CS_GUI_SPECIFIC_PHYSICS_H__ */
void uiati1(int *imeteo, char *fmeteo, int *len CS_ARGF_SUPP_CHAINE)
Definition: cs_gui_specific_physics.c:2055
void uielrc(int *const izreca, double *const crit_reca)
Definition: cs_gui_specific_physics.c:1998
void uidai1(const int *const idarcy, int *const permeability, int *const diffusion, int *const unsteady, int *const convergence, int *const gravity, double *gravity_x, double *gravity_y, double *gravity_z)
Definition: cs_gui_specific_physics.c:2570
#define BEGIN_C_DECLS
Definition: cs_defs.h:429
void cs_gui_labels_gas_combustion(void)
Definition: cs_gui_specific_physics.c:2974
#define CS_ARGF_SUPP_CHAINE
Definition: cs_defs.h:468
void cs_gui_labels_compressible(void)
Definition: cs_gui_specific_physics.c:2916
void cfnmtd(char *fstr, int *lenCS_ARGF_SUPP_CHAINE)
Definition: cs_gui_specific_physics.c:2507
char * cs_gui_get_thermophysical_model(const char *const model_thermo)
Definition: cs_gui_specific_physics.c:2694
void cs_gui_labels_coal_combustion(int n_coals, int n_classes)
Definition: cs_gui_specific_physics.c:2795
void cs_gui_labels_atmospheric(void)
Definition: cs_gui_specific_physics.c:2769
void uippmo(int *const ippmod, int *const icod3p, int *const icodeq, int *const icoebu, int *const icobml, int *const icolwc, int *const iccoal, int *const icpl3c, int *const icfuel, int *const ieljou, int *const ielarc, int *const ielion, int *const icompf, int *const iatmos, int *const iaeros, int *const ieos, int *const ieqco2, int *const idarcy)
Definition: cs_gui_specific_physics.c:1586
void uisofu(const int *const ippmod, const int *const iccoal, const int *const icpl3c, const int *const iirayo, const int *const iihmpr, const int *const ncharm, int *const ncharb, int *const nclpch, int *const nclacp, const int *const ncpcmx, int *const ichcor, double *const diam20, double *const cch, double *const hch, double *const och, double *const nch, double *const sch, int *const ipci, double *const pcich, double *const cp2ch, double *const rho0ch, double *const thcdch, double *const cck, double *const hck, double *const ock, double *const nck, double *const sck, double *const xashch, double *const xashsec, double *const xwatch, double *const h0ashc, double *const cpashc, int *const iy1ch, double *const y1ch, int *const iy2ch, double *const y2ch, double *const a1ch, double *const a2ch, double *const e1ch, double *const e2ch, double *const crepn1, double *const crepn2, double *const ahetch, double *const ehetch, int *const iochet, double *const ahetc2, double *const ehetc2, int *const ioetc2, double *const ahetwt, double *const ehetwt, int *const ioetwt, int *const ieqnox, int *const imdnox, int *const irb, int *const ihtco2, int *const ihth2o, double *const qpr, double *const fn, double *const ckabs1, int *const noxyd, double *const oxyo2, double *const oxyn2, double *const oxyh2o, double *const oxyco2, double *const repnck, double *const repnle, double *const repnlo)
Definition: cs_gui_specific_physics.c:2125
void uieli1(const int *const ieljou, const int *const ielarc, int *const ielcor, double *const couimp, double *const puisim, int *const modrec, int *const idreca, double *const crit_reca)
Definition: cs_gui_specific_physics.c:1829
#define END_C_DECLS
Definition: cs_defs.h:430
void cs_gui_numerical_double_parameters(const char *const param, double *const keyword)
Definition: cs_gui.c:5710
#define CS_PROCF(x, y)
Definition: cs_defs.h:453
void uicpi2(double *const toxy, double *const tfuel)
Definition: cs_gui_specific_physics.c:1798
void cs_gui_labels_electric_arcs(int n_gasses)
Definition: cs_gui_specific_physics.c:2938
void uicpi1(double *const srrom, double *const diftl0)
Definition: cs_gui_specific_physics.c:1766
int cs_gui_get_activ_thermophysical_model(void)
Definition: cs_gui_specific_physics.c:2721