programmer's documentation
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-2015 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
double precision, dimension(ncharm), save thcdch
Definition: cpincl.f90:97
integer ncharm
maximum number of coals
Definition: ppppar.f90:55
double precision, dimension(ncharm), save xashch
Definition: cpincl.f90:97
integer, dimension(ncharm), save iy2ch
Definition: cpincl.f90:146
integer, dimension(ncharm), save nclpch
Number of classes per coal.
Definition: cpincl.f90:56
double precision, dimension(ncharm), save cck
Definition: cpincl.f90:97
double precision, dimension(ncharm), save xashsec
Definition: cs_coal_incl.f90:42
double precision, dimension(ncharm), save ahetc2
Definition: cpincl.f90:148
size_t len
Definition: mei_scanner.c:615
integer iccoal
pointer to specify multi-coals and multi-classes pulverised coal combustion with indicator ippmod(icc...
Definition: ppincl.f90:199
double precision, dimension(ncharm), save ehetc2
Definition: cpincl.f90:148
double precision, dimension(ncharm), save ahetwt
Definition: cpincl.f90:148
integer icodeq
Definition: ppincl.f90:133
void uielrc(int *const izreca, double *const crit_reca)
Definition: cs_gui_specific_physics.c:1998
double precision, dimension(5), save crit_reca
Definition: elincl.f90:138
integer, save nclacp
Definition: cpincl.f90:179
integer, save ieqco2
Definition: ppcpfu.f90:60
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
double precision, dimension(ncharm), save e1ch
Definition: cpincl.f90:148
double precision, dimension(ncharm), save a1ch
Definition: cpincl.f90:148
double precision, dimension(ncharm), save h0ashc
Definition: cpincl.f90:97
integer icolwc
pointer to specify Libby-Williams pre-mixed flame withy indicator ippmod(icolwc)
Definition: ppincl.f90:154
double precision, dimension(ncharm), save sch
Definition: cpincl.f90:97
double precision, dimension(3), save oxyn2
Definition: ppcpfu.f90:168
void cs_gui_labels_gas_combustion(void)
Definition: cs_gui_specific_physics.c:2974
double precision, save couimp
Definition: elincl.f90:142
double precision, dimension(ncharm), save hck
Definition: cpincl.f90:97
integer ielion
Definition: ppincl.f90:179
double precision, dimension(3), save oxyo2
Definition: ppcpfu.f90:168
integer icompf
pointer to specify compressible module with indicator ippmod(icompf)
Definition: ppincl.f90:213
integer idarcy
pointer to specify richards model
Definition: ppincl.f90:243
double precision, dimension(ncharm), save hch
Definition: cpincl.f90:97
integer icpl3c
pointer to specify Lagrangian modelling of multi-coals and multi-classes pulverised coal combustion w...
Definition: ppincl.f90:188
double precision, dimension(3), save oxyco2
Definition: ppcpfu.f90:168
double precision, dimension(ncharm), save cp2ch
Definition: cpincl.f90:97
double precision, dimension(ncharm), save sck
Definition: cpincl.f90:97
integer iaeros
Definition: ppincl.f90:228
double precision, dimension(nclcpm), save diam20
Definition: cpincl.f90:192
#define CS_ARGF_SUPP_CHAINE
Definition: cs_defs.h:468
double precision, dimension(ncharm), save e2ch
Definition: cpincl.f90:148
double precision, dimension(ncharm), save y2ch
Definition: cpincl.f90:148
integer icod3p
pointer for speciphic physics
Definition: ppincl.f90:131
void cs_gui_labels_compressible(void)
Definition: cs_gui_specific_physics.c:2916
double precision, dimension(ncharm), save nch
Definition: cpincl.f90:97
integer, save ieqnox
Definition: ppcpfu.f90:95
double precision, dimension(ncharm), save cpashc
Definition: cpincl.f90:97
void cfnmtd(char *fstr, int *lenCS_ARGF_SUPP_CHAINE)
Definition: cs_gui_specific_physics.c:2507
integer, save ncharb
Number of coals.
Definition: cpincl.f90:49
double precision, dimension(ncharm), save och
Definition: cpincl.f90:97
integer, dimension(:), allocatable izreca
Definition: elincl.f90:140
double precision, dimension(ncharm), save repnck
Definition: cs_coal_incl.f90:79
double precision, dimension(ncharm), save y1ch
Definition: cpincl.f90:148
double precision, dimension(ncharm), save fn
Definition: cs_coal_incl.f90:42
double precision, dimension(ncharm), save cch
Definition: cpincl.f90:97
double precision, dimension(ncharm), save pcich
Definition: cpincl.f90:97
char * cs_gui_get_thermophysical_model(const char *const model_thermo)
Definition: cs_gui_specific_physics.c:2694
integer, save iirayo
Activation of the radiative transfer module:
Definition: radiat.f90:45
void cs_gui_labels_coal_combustion(int n_coals, int n_classes)
Definition: cs_gui_specific_physics.c:2795
integer ielarc
pointer to specify Electric arcs module (Joule effect and Laplace forces) with indicator ippmod(ielar...
Definition: ppincl.f90:176
void cs_gui_labels_atmospheric(void)
Definition: cs_gui_specific_physics.c:2769
integer ncpcmx
maximum number of coals classes
Definition: ppppar.f90:57
double precision, save diftl0
molecular diffusivity for the enthalpy ( ) for gas or coal combustion (the code then automatically se...
Definition: ppthch.f90:132
integer, dimension(ncharm), save ioetwt
Definition: cpincl.f90:147
integer, save iihmpr
indicator of the use of the GUI (We could avoid this module by querying a C structure) ...
Definition: ihmpre.f90:44
integer, dimension(ncharm), save ioetc2
Definition: cpincl.f90:147
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
integer iatmos
pointer to specify atmospheric flow module with indicator ippmod(iatmos)
Definition: ppincl.f90:220
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
double precision, dimension(2, ncharm), save crepn1
Definition: cpincl.f90:97
integer, save imeteo
imeteo –> flag for reading the meteo input file
Definition: atincl.f90:114
double precision, dimension(ncharm), save nck
Definition: cpincl.f90:97
integer, dimension(nmodmx), save ippmod
global indicator for speciphic physics By default, all the indicators ippmod(i.....) are initialized to -1, which means that no specific physics is activated.
Definition: ppincl.f90:118
double precision, dimension(ncharm), save ock
Definition: cpincl.f90:97
double precision, dimension(ncharm), save ahetch
Definition: cpincl.f90:148
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
integer, dimension(nclcpm), save ichcor
Definition: cpincl.f90:191
double precision, dimension(ncharm), save repnle
Definition: cs_coal_incl.f90:79
integer, save noxyd
Definition: ppcpfu.f90:161
integer, dimension(ncharm), save ipci
Definition: cs_coal_incl.f90:36
double precision, dimension(ncharm), save xwatch
Definition: cpincl.f90:97
double precision, save puisim
Definition: elincl.f90:142
integer, dimension(ncharm), save iochet
Definition: cpincl.f90:147
integer icobml
Definition: ppincl.f90:144
double precision, save srrom
with gas combustion, pulverised coal or the electric module, srrom is the sub-relaxation coefficient ...
Definition: ppincl.f90:788
double precision, save ckabs1
Absorption coefficient of gas mixture.
Definition: ppthch.f90:124
#define END_C_DECLS
Definition: cs_defs.h:430
integer, save ihtco2
Definition: ppcpfu.f90:64
integer icoebu
pointer to specify Eddy Break Up pre-mixed flame with indicator ippmod(icoebu)
Definition: ppincl.f90:141
integer icfuel
pointer to specify multi-classes pulverised heavy fuel combustion with indicator ippmod(icfuel) ...
Definition: ppincl.f90:208
void cs_gui_numerical_double_parameters(const char *const param, double *const keyword)
Definition: cs_gui.c:5705
#define CS_PROCF(x, y)
Definition: cs_defs.h:453
double precision, dimension(ncharm), save a2ch
Definition: cpincl.f90:148
double precision, dimension(2, ncharm), save crepn2
Definition: cpincl.f90:97
void uicpi2(double *const toxy, double *const tfuel)
Definition: cs_gui_specific_physics.c:1798
integer(c_int), pointer, save ieos
indicates the equation of state for compressible module. Only perfect gas with a constant adiabatic c...
Definition: cstphy.f90:81
double precision, dimension(ncharm), save ehetch
Definition: cpincl.f90:148
integer, dimension(ncharm), save iy1ch
Definition: cpincl.f90:146
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
integer, save imdnox
Definition: ppcpfu.f90:95
double precision, dimension(ncharm), save qpr
Definition: cs_coal_incl.f90:42
integer, save ihth2o
Definition: cs_coal_incl.f90:36
integer, save irb
Definition: ppcpfu.f90:95
int cs_gui_get_activ_thermophysical_model(void)
Definition: cs_gui_specific_physics.c:2721
double precision, dimension(3), save oxyh2o
Definition: ppcpfu.f90:168
double precision, dimension(ncharm), save ehetwt
Definition: cpincl.f90:148
integer, save idreca
Definition: elincl.f90:139
double precision, dimension(ncharm), save rho0ch
Definition: cpincl.f90:97
double precision, dimension(ncharm), save repnlo
Definition: cs_coal_incl.f90:79
integer ieljou
pointer to specify Joule effect module (Laplace forces not taken into account) with indicator ippmod(...
Definition: ppincl.f90:168
integer, save ielcor
Definition: elincl.f90:139
integer, save modrec
Definition: elincl.f90:139