programmer's documentation
cs_gui.h
Go to the documentation of this file.
1 #ifndef __CS_GUI_H__
2 #define __CS_GUI_H__
3 
4 /*============================================================================
5  * Management of the GUI parameters file: main parameters
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 function prototypes for Fortran API
46  *============================================================================*/
47 
48 /*----------------------------------------------------------------------------
49  * Thermal model.
50  *
51  * Fortran Interface:
52  *
53  * SUBROUTINE CSTHER ()
54  * *****************
55  *
56  *----------------------------------------------------------------------------*/
57 
58 
59 void CS_PROCF (csther, CSTHER) (void);
60 
61 /*----------------------------------------------------------------------------
62  * Turbulence model.
63  *
64  * Fortran Interface:
65  *
66  * SUBROUTINE CSTURB
67  * *****************
68  *
69  *----------------------------------------------------------------------------*/
70 
71 void CS_PROCF (csturb, CSTURB) (void);
72 
73 /*----------------------------------------------------------------------------
74  * Specific heat variable or constant indicator.
75  *
76  * Fortran Interface:
77  *
78  * SUBROUTINE CSCPVA
79  * *****************
80  *
81  *----------------------------------------------------------------------------*/
82 
83 void CS_PROCF (cscpva, CSCPVA) (void);
84 
85 /*----------------------------------------------------------------------------
86  * Volumic viscosity variable or constant indicator.
87  *
88  * Fortran Interface:
89  *
90  * SUBROUTINE CSCVVVA (ICP)
91  * *****************
92  *
93  * INTEGER IVISCV --> specific heat variable or constant indicator
94  *----------------------------------------------------------------------------*/
95 
96 void CS_PROCF (csvvva, CSVVVA) (int *iviscv);
97 
98 /*----------------------------------------------------------------------------
99  * User thermal scalar.
100  *
101  * Fortran Interface:
102  *
103  * SUBROUTINE UITHSC
104  * *****************
105  *----------------------------------------------------------------------------*/
106 
107 void CS_PROCF (uithsc, UITHSC) (void);
108 
109 /*----------------------------------------------------------------------------
110  * Constant or variable indicator for the user scalar laminar viscosity.
111  *
112  * Fortran Interface:
113  *
114  * subroutine csivis
115  * *****************
116  *----------------------------------------------------------------------------*/
117 
118 void CS_PROCF (csivis, CSIVIS) (void);
119 
120 /*----------------------------------------------------------------------------
121  * Time passing parameter.
122  *
123  * Fortran Interface:
124  *
125  * SUBROUTINE CSIDTV ()
126  * *****************
127  *
128  *----------------------------------------------------------------------------*/
129 
130 void CS_PROCF(csidtv, CSIDTV) (void);
131 
132 /*----------------------------------------------------------------------------
133  * Hydrostatic pressure parameter.
134  *
135  * Fortran Interface:
136  *
137  * SUBROUTINE CSIPHY ()
138  * *****************
139  *
140  *----------------------------------------------------------------------------*/
141 
142 void CS_PROCF (csiphy, CSIPHY) (void);
143 
144 /*----------------------------------------------------------------------------
145  * Hydrostatic equilibrium parameter.
146  *
147  * Fortran Interface:
148  *
149  * SUBROUTINE CSCFGP (ICFGRP)
150  * *****************
151  *
152  * INTEGER ICFGRP --> hydrostatic equilibrium
153  *----------------------------------------------------------------------------*/
154 
155 void CS_PROCF (cscfgp, CSCFGP) (int *icfgrp);
156 
157 /*----------------------------------------------------------------------------
158  * Restart parameters.
159  *
160  * Fortran Interface:
161  *
162  * SUBROUTINE CSISUI
163  * *****************
164  *
165  * INTEGER NTSUIT --> checkpoint frequency
166  * INTEGER ILEAUX --> restart with auxiliary
167  * INTEGER ICCFVG --> restart with frozen field
168  *----------------------------------------------------------------------------*/
169 
170 
171 void CS_PROCF (csisui, CSISUI) (int *ntsuit,
172  int *ileaux,
173  int *iccvfg);
174 
175 /*----------------------------------------------------------------------------
176  * Time passing parameters.
177  *
178  * Fortran Interface:
179  *
180  * SUBROUTINE CSTIME
181  * *****************
182  *
183  *----------------------------------------------------------------------------*/
184 
185 void CS_PROCF (cstime, CSTIME) (void);
186 
187 /*----------------------------------------------------------------------------
188  *
189  * Fortran Interface:
190  *
191  * SUBROUTINE UINUM1
192  * *****************
193  *
194  *----------------------------------------------------------------------------*/
195 
196 void CS_PROCF (uinum1, UINUM1) (double *blencv,
197  int *ischcv,
198  int *isstpc,
199  int *ircflu,
200  double *cdtvar,
201  double *epsilo,
202  int *nswrsm);
203 
204 /*----------------------------------------------------------------------------
205  * Global numerical parameters.
206  *
207  * Fortran Interface:
208  *
209  * SUBROUTINE CSNUM2
210  * *****************
211  *
212  * INTEGER RELAXP --> pressure relaxation
213  * INTEGER EXTRAG --> wall pressure extrapolation
214  * INTEGER IMRGRA --> gradient reconstruction
215  *----------------------------------------------------------------------------*/
216 
217 void CS_PROCF (csnum2, CSNUM2) (double *relaxp,
218  double *extrag,
219  int *imrgra);
220 
221 void CS_PROCF (csphys, CSPHYS) (const int *nmodpp,
222  double *viscv0,
223  double *visls0,
224  const int *itempk);
225 
226 /*----------------------------------------------------------------------------
227  * User scalar min and max values for clipping.
228  *
229  * Fortran Interface:
230  *
231  * subroutine cssca2
232  * *****************
233  *
234  * integer iturt --> turbulent flux model
235  *----------------------------------------------------------------------------*/
236 
237 void CS_PROCF (cssca2, CSSCA2) (int *iturt);
238 
239 void CS_PROCF (cssca3, CSSCA3) (double *visls0);
240 
241 /*----------------------------------------------------------------------------
242  * Turbulence initialization parameters.
243  *
244  * Fortran Interface:
245  *
246  * SUBROUTINE CSTINI
247  * *****************
248  *
249  *----------------------------------------------------------------------------*/
250 
251 void CS_PROCF (cstini, CSTINI) (void);
252 
253 /*----------------------------------------------------------------------------
254  * Solver taking a scalar porosity into account
255  *
256  * Fortran Interface:
257  *
258  * SUBROUTINE UIIPSU
259  * *****************
260  *
261  * INTEGER IPOROS --> porosity
262  *----------------------------------------------------------------------------*/
263 
264 void CS_PROCF (uiipsu, UIIPSU) (int *iporos);
265 
266 /*----------------------------------------------------------------------------
267  * Define porosity.
268  *
269  * Fortran Interface:
270  *
271  * SUBROUTINE UIPORO
272  * *****************
273  *
274  * INTEGER IPOROS <-- porosity
275  *----------------------------------------------------------------------------*/
276 
277 void CS_PROCF (uiporo, UIPORO) (const int *iporos);
278 
279 /*----------------------------------------------------------------------------
280  * User momentum source terms.
281  *
282  * Fortran Interface:
283  *
284  * subroutine uitsnv (ncelet, vel, tsexp, tsimp)
285  * *****************
286  *
287  * integer ncelet <-- number of cells with halo
288  * double precision vel <-- fluid velocity
289  * double precision tsexp --> explicit source terms
290  * double precision tsimp --> implicit source terms
291  *----------------------------------------------------------------------------*/
292 
293 void CS_PROCF(uitsnv, UITSNV)(const cs_real_3_t *restrict vel,
294  cs_real_3_t *restrict tsexp,
295  cs_real_33_t *restrict tsimp);
296 
297 /*----------------------------------------------------------------------------
298  * User scalar source terms.
299  *
300  * Fortran Interface:
301  *
302  * subroutine uitssc (f_id, pvar, tsexp, tsimp)
303  * *****************
304  *
305  * integer f_id <-- field id
306  * double precision pvar <-- scalar
307  * double precision tsexp --> explicit source terms
308  * double precision tsimp --> implicit source terms
309  *----------------------------------------------------------------------------*/
310 
311 void CS_PROCF(uitssc, UITSSC)(const int *f_id,
312  const cs_real_t *restrict pvar,
313  cs_real_t *restrict tsexp,
314  cs_real_t *restrict tsimp);
315 
316 /*----------------------------------------------------------------------------
317  * Thermal scalar source terms.
318  *
319  * Fortran Interface:
320  *
321  * subroutine uitsth (f_id, pvar, tsexp, tsimp)
322  * *****************
323  *
324  * integer f_id <-- field id
325  * double precision pvar <-- scalar
326  * double precision tsexp --> explicit source terms
327  * double precision tsimp --> implicit source terms
328  *----------------------------------------------------------------------------*/
329 
330 void CS_PROCF(uitsth, UITSTH)(const int *f_id,
331  const cs_real_t *restrict pvar,
332  cs_real_t *restrict tsexp,
333  cs_real_t *restrict tsimp);
334 
335 /*----------------------------------------------------------------------------
336  * Variables and user scalars initialization.
337  *
338  * Fortran Interface:
339  *
340  * subroutine uiiniv
341  * *****************
342  *
343  * integer isuite <-- restart indicator
344  * integer idarcy <-- darcy module activation
345  * integer iccfth <-- type of initialization (compressible model)
346  *----------------------------------------------------------------------------*/
347 
348 void CS_PROCF(uiiniv, UIINIV)(const int *isuite,
349  const int *idarcy,
350  int *iccfth);
351 
352 /*----------------------------------------------------------------------------
353  * User law for material Properties
354  *
355  * Fortran Interface:
356  *
357  * subroutine uiphyv
358  * *****************
359  *
360  * integer iviscv <-- pointer for volumic viscosity viscv
361  * integer itempk <-- pointer for temperature (in K)
362  * double precision visls0 <-- diffusion coefficient of the scalars
363  * double precision viscv0 <-- volumic viscosity
364  *----------------------------------------------------------------------------*/
365 
366 void CS_PROCF(uiphyv, UIPHYV)(const cs_int_t *iviscv,
367  const cs_int_t *itempk,
368  const cs_real_t *visls0,
369  const cs_real_t *viscv0);
370 
371 /*----------------------------------------------------------------------------
372  * Head losses definition
373  *
374  * Fortran Interface:
375  *
376  * subroutine uikpdc
377  * *****************
378  *
379  * integer iappel <-- number of calls during a time step
380  * integer ncepdp --> number of cells with head losses
381  * integer icepdc --> ncepdp cells number with head losses
382  * double precision ckupdc --> head losses matrix
383  *----------------------------------------------------------------------------*/
384 
385 void CS_PROCF(uikpdc, UIKPDC)(const int* iappel,
386  int* ncepdp,
387  int icepdc[],
388  double ckupdc[]);
389 
390 /*----------------------------------------------------------------------------
391  * 1D profile postprocessing
392  *
393  * Fortran Interface:
394  *
395  * SUBROUTINE UIPROF
396  * *****************
397  *
398  *----------------------------------------------------------------------------*/
399 
400 void CS_PROCF (uiprof, UIPROF)(void);
401 
402 /*----------------------------------------------------------------------------
403  * darcy model : read laws for capacity, saturation and permeability
404  *
405  * Fortran Interface:
406  *
407  * subroutine uidapp
408  * *****************
409  * integer permeability <-- permeability type
410  * integer diffusion <-- diffusion type
411  * integer gravity <-- check if gravity is taken into account
412  * double gravity_x <-- x component for gravity vector
413  * double gravity_y <-- y component for gravity vector
414  * double gravity_z <-- z component for gravity vector
415  *----------------------------------------------------------------------------*/
416 
417 void CS_PROCF (uidapp, UIDAPP) (const cs_int_t *permeability,
418  const cs_int_t *diffusion,
419  const cs_int_t *gravity,
420  const double *gravity_x,
421  const double *gravity_y,
422  const double *gravity_z);
423 
424 /*----------------------------------------------------------------------------
425  * Free memory: clean global private variables and libxml2 variables.
426  *
427  * Fortran Interface:
428  *
429  * SUBROUTINE MEMUI1
430  * *****************
431  *
432  * INTEGER NCHARB <-- number of coal
433  *----------------------------------------------------------------------------*/
434 
435 void CS_PROCF (memui1, MEMUI1) (const int *ncharb);
436 
437 /*=============================================================================
438  * Public function prototypes
439  *============================================================================*/
440 
441 /*----------------------------------------------------------------------------
442  * Initialize GUI reader structures.
443  *----------------------------------------------------------------------------*/
444 
445 void
446 cs_gui_init(void);
447 
448 /*-----------------------------------------------------------------------------
449  * Free memory: clean global private variables and libxml2 variables
450  *----------------------------------------------------------------------------*/
451 
452 void
453 cs_gui_finalize(void);
454 
455 /*-----------------------------------------------------------------------------
456  * Selection of linear solvers.
457  *----------------------------------------------------------------------------*/
458 
459 void
461 
462 /*-----------------------------------------------------------------------------
463  * Define parallel IO settings.
464  *----------------------------------------------------------------------------*/
465 
466 void
467 cs_gui_parallel_io(void);
468 
469 /*-----------------------------------------------------------------------------
470  * Set partitioning options.
471  *----------------------------------------------------------------------------*/
472 
473 void
474 cs_gui_partition(void);
475 
476 /*-----------------------------------------------------------------------------
477  * Get initial value from property markup.
478  *
479  * parameters:
480  * property_name <-- name of the property
481  * value --> new initial value of the property
482  *----------------------------------------------------------------------------*/
483 
484 void
485 cs_gui_properties_value(const char *property_name,
486  double *value);
487 
488 /*-----------------------------------------------------------------------------
489  * Initialization choice of the reference variables parameters.
490  *
491  * parameters:
492  * name <-- parameter name
493  * value --> parameter value
494  *----------------------------------------------------------------------------*/
495 
496 void
497 cs_gui_reference_initialization(const char *param,
498  double *value);
499 
500 /*----------------------------------------------------------------------------
501  * Get thermal scalar model.
502  *
503  * return:
504  * value of itherm
505  *----------------------------------------------------------------------------*/
506 
507 int
509 
510 /*----------------------------------------------------------------------------
511  * Time moments definition
512  *----------------------------------------------------------------------------*/
513 
514 void
515 cs_gui_time_moments(void);
516 
517 /*-----------------------------------------------------------------------------
518  * Set turbomachinery model
519  *----------------------------------------------------------------------------*/
520 
521 void
523 
524 /*-----------------------------------------------------------------------------
525  * Set turbomachinery options.
526  *----------------------------------------------------------------------------*/
527 
528 void
530 
531 /*----------------------------------------------------------------------------
532  * Logging output for MEI usage.
533  *----------------------------------------------------------------------------*/
534 
535 void
536 cs_gui_usage_log(void);
537 
538 /*----------------------------------------------------------------------------
539  * Set GUI-defined user scalar labels.
540  *----------------------------------------------------------------------------*/
541 
542 void
544 
545 /*----------------------------------------------------------------------------
546  * Define user variables through the GUI.
547  *----------------------------------------------------------------------------*/
548 
549 void
551 
552 /*----------------------------------------------------------------------------*/
553 
555 
556 #endif /* __CS_GUI_H__ */
void csidtv(void)
Definition: cs_gui.c:2450
void cs_gui_reference_initialization(const char *param, double *value)
Definition: cs_gui.c:5997
double precision, save viscv0
reference volume viscosity (noted in the equation expressing in the paragraph dedicated to iviscv) ...
Definition: ppincl.f90:701
void uiprof(void)
Definition: cs_gui.c:4761
#define restrict
Definition: cs_defs.h:122
void csnum2(double *relaxp, double *extrag, int *imrgra)
Definition: cs_gui.c:2742
void cs_gui_user_variables(void)
Definition: cs_gui.c:6335
void uiipsu(int *iporos)
Definition: cs_gui.c:3117
integer, save iporos
take the porosity fomulation into account
Definition: optcal.f90:855
void cscfgp(int *icfgrp)
Definition: cs_gui.c:2519
void csisui(int *ntsuit, int *ileaux, int *iccvfg)
Definition: cs_gui.c:2552
integer, save ntsuit
saving period of the restart filesy5
Definition: entsor.f90:78
void cssca3(double *visls0)
Definition: cs_gui.c:2999
integer, dimension(:), allocatable icepdc
number of the ncepdc cells in which a pressure drop is imposed. See {iicepd} and the user subroutine ...
Definition: pointe.f90:252
#define BEGIN_C_DECLS
Definition: cs_defs.h:429
int cs_int_t
Fortran-compatible integer.
Definition: cs_defs.h:295
void cs_gui_turbomachinery(void)
Definition: cs_gui.c:6140
void cs_gui_parallel_io(void)
Definition: cs_gui.c:5727
integer idarcy
pointer to specify richards model
Definition: ppincl.f90:243
int cs_gui_thermal_model(void)
Definition: cs_gui.c:6023
void cssca2(int *iturt)
Definition: cs_gui.c:2921
void uinum1(double *blencv, int *ischcv, int *isstpc, int *ircflu, double *cdtvar, double *epsilo, int *nswrsm)
Definition: cs_gui.c:2648
integer, dimension(nvarmx), save ischcv
type of convective scheme
Definition: optcal.f90:242
integer, dimension(nvarmx), save isstpc
switch off the slope test:
Definition: optcal.f90:247
integer, save isuite
Definition: optcal.f90:371
void cs_gui_usage_log(void)
Definition: cs_gui.c:6286
integer, save ncharb
Number of coals.
Definition: cpincl.f90:49
void cs_gui_partition(void)
Definition: cs_gui.c:5819
void cs_gui_turbomachinery_rotor(void)
Definition: cs_gui.c:6175
double precision, dimension(nvarmx), save blencv
percentage of upwind:
Definition: optcal.f90:237
void cscpva(void)
Definition: cs_gui.c:2289
integer(c_int), pointer, save iccvfg
Definition: optcal.f90:705
void csther(void)
Definition: cs_gui.c:2146
void csivis(void)
Definition: cs_gui.c:2375
double precision, dimension(nscamx), save visls0
visls0 : viscosity of scalars if constant
Definition: optcal.f90:971
integer, save icfgrp
indicates if the boundary conditions should take into account (=1) or not (=0) the hydrostatic balanc...
Definition: ppincl.f90:741
void uiporo(const int *iporos)
Definition: cs_gui.c:3168
double precision, dimension(:,:), allocatable ckupdc
value of the coefficients of the pressure drop tensor of the ncepdc cells in which a pressure drop is...
Definition: pointe.f90:261
void uiphyv(const cs_int_t *iviscv, const cs_int_t *itempk, const cs_real_t *visls0, const cs_real_t *viscv0)
Definition: cs_gui.c:4493
integer, save itempk
temperature deduced from the specific total energy
Definition: ppincl.f90:657
cs_real_t cs_real_3_t[3]
vector of 3 floating-point values
Definition: cs_defs.h:307
void uitssc(const int *f_id, const cs_real_t *restrict pvar, cs_real_t *restrict tsexp, cs_real_t *restrict tsimp)
Definition: cs_gui.c:3472
double precision, dimension(nvarmx), save cdtvar
multiplicator coefficient for the time step of each variable
Definition: optcal.f90:456
void cs_gui_properties_value(const char *property_name, double *value)
Definition: cs_gui.c:5970
void uitsth(const int *f_id, const cs_real_t *restrict pvar, cs_real_t *restrict tsexp, cs_real_t *restrict tsimp)
Definition: cs_gui.c:3581
#define END_C_DECLS
Definition: cs_defs.h:430
void cs_gui_finalize(void)
Definition: cs_gui.c:5506
integer, save ileaux
Definition: optcal.f90:371
double cs_real_t
Definition: cs_defs.h:296
void csturb(void)
Definition: cs_gui.c:2197
void uidapp(const cs_int_t *permeability, const cs_int_t *diffusion, const cs_int_t *gravity, const double *gravity_x, const double *gravity_y, const double *gravity_z)
Definition: cs_gui.c:5055
void cs_gui_user_scalar_labels(void)
Definition: cs_gui.c:6314
#define CS_PROCF(x, y)
Definition: cs_defs.h:453
void uitsnv(const cs_real_3_t *restrict vel, cs_real_3_t *restrict tsexp, cs_real_33_t *restrict tsimp)
Definition: cs_gui.c:3323
void memui1(const int *ncharb)
Definition: cs_gui.c:5476
double precision, dimension(nvarmx), save epsilo
relative precision of the linear solver
Definition: optcal.f90:342
cs_real_t cs_real_33_t[3][3]
3x3 matrix of floating-point values
Definition: cs_defs.h:311
void csvvva(int *iviscv)
Definition: cs_gui.c:2314
void cs_gui_init(void)
Definition: cs_gui.c:5491
integer, dimension(nscamx), save iturt
turbulent flux model for for any scalar , iturt(isca)
Definition: optcal.f90:644
void csiphy(void)
Definition: cs_gui.c:2486
void cstime(void)
Definition: cs_gui.c:2577
void cs_gui_time_moments(void)
Definition: cs_gui.c:6060
void cstini(void)
Definition: cs_gui.c:3082
integer, dimension(nvarmx), save nswrsm
max number of iteration for the iterative process used to solved the convection diffusion equations ...
Definition: optcal.f90:323
void csphys(const int *nmodpp, double *viscv0, double *visls0, const int *itempk)
Definition: cs_gui.c:2771
integer, save iviscv
additional property:
Definition: ppincl.f90:678
void uikpdc(const int *iappel, int *ncepdp, int icepdc[], double ckupdc[])
double precision, dimension(nvarmx), save extrag
gradient extrapolation at the boundary
Definition: optcal.f90:291
void uiiniv(const int *isuite, const int *idarcy, int *iccfth)
Definition: cs_gui.c:3689
void uithsc(void)
Definition: cs_gui.c:2336
integer(c_int), pointer, save imrgra
type of gradient reconstruction
Definition: optcal.f90:266
void cs_gui_linear_solvers(void)
Definition: cs_gui.c:5535
integer, dimension(nvarmx), save ircflu
face flux reconstruction:
Definition: optcal.f90:307