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-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 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 idarcy <-- groundwater module activation
306  * integer f_id <-- field id
307  * double precision pvar <-- scalar
308  * double precision tsexp --> explicit source terms
309  * double precision tsimp --> implicit source terms
310  *----------------------------------------------------------------------------*/
311 
312 void CS_PROCF(uitssc, UITSSC)(const int *idarcy,
313  const int *f_id,
314  const cs_real_t *restrict pvar,
315  cs_real_t *restrict tsexp,
316  cs_real_t *restrict tsimp);
317 
318 /*----------------------------------------------------------------------------
319  * Thermal scalar source terms.
320  *
321  * Fortran Interface:
322  *
323  * subroutine uitsth (f_id, pvar, tsexp, tsimp)
324  * *****************
325  *
326  * integer f_id <-- field id
327  * double precision pvar <-- scalar
328  * double precision tsexp --> explicit source terms
329  * double precision tsimp --> implicit source terms
330  *----------------------------------------------------------------------------*/
331 
332 void CS_PROCF(uitsth, UITSTH)(const int *f_id,
333  const cs_real_t *restrict pvar,
334  cs_real_t *restrict tsexp,
335  cs_real_t *restrict tsimp);
336 
337 /*----------------------------------------------------------------------------
338  * Variables and user scalars initialization.
339  *
340  * Fortran Interface:
341  *
342  * subroutine uiiniv
343  * *****************
344  *
345  * integer isuite <-- restart indicator
346  * integer idarcy <-- groundwater module activation
347  * integer iccfth <-- type of initialization (compressible model)
348  *----------------------------------------------------------------------------*/
349 
350 void CS_PROCF(uiiniv, UIINIV)(const int *isuite,
351  const int *idarcy,
352  int *iccfth);
353 
354 /*----------------------------------------------------------------------------
355  * User law for material Properties
356  *
357  * Fortran Interface:
358  *
359  * subroutine uiphyv
360  * *****************
361  *
362  * integer iviscv <-- pointer for volumic viscosity viscv
363  * integer itempk <-- pointer for temperature (in K)
364  * double precision visls0 <-- diffusion coefficient of the scalars
365  * double precision viscv0 <-- volumic viscosity
366  *----------------------------------------------------------------------------*/
367 
368 void CS_PROCF(uiphyv, UIPHYV)(const cs_int_t *iviscv,
369  const cs_int_t *itempk,
370  const cs_real_t *visls0,
371  const cs_real_t *viscv0);
372 
373 /*----------------------------------------------------------------------------
374  * Head losses definition
375  *
376  * Fortran Interface:
377  *
378  * subroutine uikpdc
379  * *****************
380  *
381  * integer iappel <-- number of calls during a time step
382  * integer ncepdp --> number of cells with head losses
383  * integer icepdc --> ncepdp cells number with head losses
384  * double precision ckupdc --> head losses matrix
385  *----------------------------------------------------------------------------*/
386 
387 void CS_PROCF(uikpdc, UIKPDC)(const int* iappel,
388  int* ncepdp,
389  int icepdc[],
390  double ckupdc[]);
391 
392 /*----------------------------------------------------------------------------
393  * 1D profile postprocessing
394  *
395  * Fortran Interface:
396  *
397  * SUBROUTINE UIPROF
398  * *****************
399  *
400  *----------------------------------------------------------------------------*/
401 
402 void CS_PROCF (uiprof, UIPROF)(void);
403 
404 /*----------------------------------------------------------------------------
405  * groundwater model : read laws for capacity, saturation and permeability
406  *
407  * Fortran Interface:
408  *
409  * subroutine uidapp
410  * *****************
411  * integer permeability <-- permeability type
412  * integer diffusion <-- diffusion type
413  * integer gravity <-- check if gravity is taken into account
414  *----------------------------------------------------------------------------*/
415 
416 void CS_PROCF (uidapp, UIDAPP) (const cs_int_t *permeability,
417  const cs_int_t *diffusion,
418  const cs_int_t *gravity,
419  const cs_real_t *gravity_x,
420  const cs_real_t *gravity_y,
421  const cs_real_t *gravity_z);
422 
423 /*----------------------------------------------------------------------------
424  * Free memory: clean global private variables and libxml2 variables.
425  *
426  * Fortran Interface:
427  *
428  * SUBROUTINE MEMUI1
429  * *****************
430  *
431  * INTEGER NCHARB <-- number of coal
432  *----------------------------------------------------------------------------*/
433 
434 void CS_PROCF (memui1, MEMUI1) (const int *ncharb);
435 
436 /*=============================================================================
437  * Public function prototypes
438  *============================================================================*/
439 
440 /*----------------------------------------------------------------------------
441  * Initialize GUI reader structures.
442  *----------------------------------------------------------------------------*/
443 
444 void
445 cs_gui_init(void);
446 
447 /*-----------------------------------------------------------------------------
448  * Free memory: clean global private variables and libxml2 variables
449  *----------------------------------------------------------------------------*/
450 
451 void
452 cs_gui_finalize(void);
453 
454 /*-----------------------------------------------------------------------------
455  * Selection of linear solvers.
456  *----------------------------------------------------------------------------*/
457 
458 void
460 
461 /*-----------------------------------------------------------------------------
462  * Define parallel IO settings.
463  *----------------------------------------------------------------------------*/
464 
465 void
466 cs_gui_parallel_io(void);
467 
468 /*-----------------------------------------------------------------------------
469  * Set partitioning options.
470  *----------------------------------------------------------------------------*/
471 
472 void
473 cs_gui_partition(void);
474 
475 /*-----------------------------------------------------------------------------
476  * Get initial value from property markup.
477  *
478  * parameters:
479  * property_name <-- name of the property
480  * value --> new initial value of the property
481  *----------------------------------------------------------------------------*/
482 
483 void
484 cs_gui_properties_value(const char *property_name,
485  double *value);
486 
487 /*-----------------------------------------------------------------------------
488  * Initialization choice of the reference variables parameters.
489  *
490  * parameters:
491  * name <-- parameter name
492  * value --> parameter value
493  *----------------------------------------------------------------------------*/
494 
495 void
496 cs_gui_reference_initialization(const char *param,
497  double *value);
498 
499 /*----------------------------------------------------------------------------
500  * Get thermal scalar model.
501  *
502  * return:
503  * value of itherm
504  *----------------------------------------------------------------------------*/
505 
506 int
508 
509 /*----------------------------------------------------------------------------
510  * Time moments definition
511  *----------------------------------------------------------------------------*/
512 
513 void
514 cs_gui_time_moments(void);
515 
516 /*-----------------------------------------------------------------------------
517  * Set turbomachinery model
518  *----------------------------------------------------------------------------*/
519 
520 void
522 
523 /*-----------------------------------------------------------------------------
524  * Set turbomachinery options.
525  *----------------------------------------------------------------------------*/
526 
527 void
529 
530 /*----------------------------------------------------------------------------
531  * Logging output for MEI usage.
532  *----------------------------------------------------------------------------*/
533 
534 void
535 cs_gui_usage_log(void);
536 
537 /*----------------------------------------------------------------------------
538  * Set GUI-defined user scalar labels.
539  *----------------------------------------------------------------------------*/
540 
541 void
543 
544 /*----------------------------------------------------------------------------
545  * Define user variables through the GUI.
546  *----------------------------------------------------------------------------*/
547 
548 void
550 
551 /*----------------------------------------------------------------------------*/
552 
554 
555 #endif /* __CS_GUI_H__ */
void csidtv(void)
Definition: cs_gui.c:2473
void cs_gui_reference_initialization(const char *param, double *value)
Definition: cs_gui.c:6040
double precision, save viscv0
reference volume viscosity (noted in the equation expressing in the paragraph dedicated to iviscv) ...
Definition: ppincl.f90:616
void uiprof(void)
Definition: cs_gui.c:4793
#define restrict
Definition: cs_defs.h:122
void csnum2(double *relaxp, double *extrag, int *imrgra)
Definition: cs_gui.c:2765
void cs_gui_user_variables(void)
Definition: cs_gui.c:6378
void uiipsu(int *iporos)
Definition: cs_gui.c:3140
integer, save iporos
take the porosity fomulation into account
Definition: optcal.f90:859
void uidapp(const cs_int_t *permeability, const cs_int_t *diffusion, const cs_int_t *gravity, const cs_real_t *gravity_x, const cs_real_t *gravity_y, const cs_real_t *gravity_z)
Definition: cs_gui.c:5087
void cscfgp(int *icfgrp)
Definition: cs_gui.c:2542
void csisui(int *ntsuit, int *ileaux, int *iccvfg)
Definition: cs_gui.c:2575
integer, save ntsuit
saving period of the restart filesy5
Definition: entsor.f90:78
void cssca3(double *visls0)
Definition: cs_gui.c:3022
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:248
#define BEGIN_C_DECLS
Definition: cs_defs.h:448
int cs_int_t
Fortran-compatible integer.
Definition: cs_defs.h:295
void cs_gui_turbomachinery(void)
Definition: cs_gui.c:6183
void cs_gui_parallel_io(void)
Definition: cs_gui.c:5770
integer idarcy
pointer to specify richards model
Definition: ppincl.f90:237
int cs_gui_thermal_model(void)
Definition: cs_gui.c:6066
void cssca2(int *iturt)
Definition: cs_gui.c:2944
void uinum1(double *blencv, int *ischcv, int *isstpc, int *ircflu, double *cdtvar, double *epsilo, int *nswrsm)
Definition: cs_gui.c:2671
integer, dimension(nvarmx), save ischcv
type of convective scheme
Definition: optcal.f90:243
integer, dimension(nvarmx), save isstpc
Slope test, Min/MAx limiter or Roe and Sweby limiters.
Definition: optcal.f90:251
double cs_real_t
Floating-point value.
Definition: cs_defs.h:296
integer, save isuite
Definition: optcal.f90:375
void cs_gui_usage_log(void)
Definition: cs_gui.c:6329
integer, save ncharb
Number of coals.
Definition: cpincl.f90:51
void cs_gui_partition(void)
Definition: cs_gui.c:5862
void cs_gui_turbomachinery_rotor(void)
Definition: cs_gui.c:6218
double precision, dimension(nvarmx), save blencv
percentage of upwind:
Definition: optcal.f90:237
void cscpva(void)
Definition: cs_gui.c:2312
integer(c_int), pointer, save iccvfg
Definition: optcal.f90:709
void csther(void)
Definition: cs_gui.c:2169
void csivis(void)
Definition: cs_gui.c:2398
void uitssc(const int *idarcy, const int *f_id, const cs_real_t *restrict pvar, cs_real_t *restrict tsexp, cs_real_t *restrict tsimp)
Definition: cs_gui.c:3496
double precision, dimension(nscamx), save visls0
visls0 : viscosity of scalars if constant
Definition: optcal.f90:975
integer, save icfgrp
indicates if the boundary conditions should take into account (=1) or not (=0) the hydrostatic balanc...
Definition: ppincl.f90:656
void uiporo(const int *iporos)
Definition: cs_gui.c:3191
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:257
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:4525
integer, save itempk
temperature deduced from the specific total energy
Definition: ppincl.f90:572
cs_real_t cs_real_3_t[3]
vector of 3 floating-point values
Definition: cs_defs.h:308
double precision, dimension(nvarmx), save cdtvar
multiplicator coefficient for the time step of each variable
Definition: optcal.f90:460
void cs_gui_properties_value(const char *property_name, double *value)
Definition: cs_gui.c:6013
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:3638
#define END_C_DECLS
Definition: cs_defs.h:449
void cs_gui_finalize(void)
Definition: cs_gui.c:5576
integer, save ileaux
Definition: optcal.f90:375
void csturb(void)
Definition: cs_gui.c:2220
void cs_gui_user_scalar_labels(void)
Definition: cs_gui.c:6357
#define CS_PROCF(x, y)
Definition: cs_defs.h:472
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:3346
void memui1(const int *ncharb)
Definition: cs_gui.c:5546
double precision, dimension(nvarmx), save epsilo
relative precision of the linear solver
Definition: optcal.f90:346
cs_real_t cs_real_33_t[3][3]
3x3 matrix of floating-point values
Definition: cs_defs.h:314
void csvvva(int *iviscv)
Definition: cs_gui.c:2337
void cs_gui_init(void)
Definition: cs_gui.c:5561
integer, dimension(nscamx), save iturt
turbulent flux model for for any scalar , iturt(isca)
Definition: optcal.f90:648
void csiphy(void)
Definition: cs_gui.c:2509
void cstime(void)
Definition: cs_gui.c:2600
void cs_gui_time_moments(void)
Definition: cs_gui.c:6103
void cstini(void)
Definition: cs_gui.c:3105
integer, dimension(nvarmx), save nswrsm
max number of iteration for the iterative process used to solved the convection diffusion equations ...
Definition: optcal.f90:327
void csphys(const int *nmodpp, double *viscv0, double *visls0, const int *itempk)
Definition: cs_gui.c:2794
integer, save iviscv
additional property:
Definition: ppincl.f90:593
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:295
void uiiniv(const int *isuite, const int *idarcy, int *iccfth)
Definition: cs_gui.c:3746
void uithsc(void)
Definition: cs_gui.c:2359
integer(c_int), pointer, save imrgra
type of gradient reconstruction
Definition: optcal.f90:270
void cs_gui_linear_solvers(void)
Definition: cs_gui.c:5605
integer, dimension(nvarmx), save ircflu
face flux reconstruction:
Definition: optcal.f90:311