My Project
programmer's documentation
Loading...
Searching...
No Matches
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-2019 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#include "cs_volume_zone.h"
36
37/*----------------------------------------------------------------------------*/
38
40
41/*============================================================================
42 * Type definitions
43 *============================================================================*/
44
45/*============================================================================
46 * Public function prototypes for Fortran API
47 *============================================================================*/
48
49/*----------------------------------------------------------------------------
50 * Thermal model.
51 *
52 * Fortran Interface:
53 *
54 * SUBROUTINE CSTHER ()
55 * *****************
56 *
57 *----------------------------------------------------------------------------*/
58
59void CS_PROCF (csther, CSTHER) (void);
60
61/*----------------------------------------------------------------------------
62 * Turbulence model
63 *----------------------------------------------------------------------------*/
64
65void cs_gui_turb_model(void);
66
67/*----------------------------------------------------------------------------
68 * Define reference length and reference velocity for the initialization of
69 * the turbulence variables
70 *----------------------------------------------------------------------------*/
71
72void cs_gui_turb_ref_values(void);
73
74/*----------------------------------------------------------------------------
75 * Specific heat variable or constant indicator.
76 *
77 * Fortran Interface:
78 *
79 * SUBROUTINE CSCPVA
80 * *****************
81 *
82 *----------------------------------------------------------------------------*/
83
84void CS_PROCF (cscpva, CSCPVA) (void);
85
86/*----------------------------------------------------------------------------
87 * Volumic viscosity variable or constant indicator.
88 *
89 * Fortran Interface:
90 *
91 * SUBROUTINE CSCVVVA (ICP)
92 * *****************
93 *
94 * INTEGER IVISCV --> specific heat variable or constant indicator
95 *----------------------------------------------------------------------------*/
96
97void CS_PROCF (csvvva, CSVVVA) (int *iviscv);
98
99/*----------------------------------------------------------------------------
100 * User thermal scalar.
101 *
102 * Fortran Interface:
103 *
104 * SUBROUTINE UITHSC
105 * *****************
106 *----------------------------------------------------------------------------*/
107
108void CS_PROCF (uithsc, UITHSC) (void);
109
110/*----------------------------------------------------------------------------
111 * Constant or variable indicator for the user scalar laminar viscosity.
112 *
113 * Fortran Interface:
114 *
115 * subroutine csivis
116 * *****************
117 *----------------------------------------------------------------------------*/
118
119void CS_PROCF (csivis, CSIVIS) (void);
120
121/*----------------------------------------------------------------------------
122 * Time passing parameter.
123 *
124 * Fortran Interface:
125 *
126 * SUBROUTINE CSIDTV ()
127 * *****************
128 *
129 *----------------------------------------------------------------------------*/
130
131void CS_PROCF(csidtv, CSIDTV) (void);
132
133/*----------------------------------------------------------------------------
134 * Hydrostatic pressure parameter.
135 *
136 * Fortran Interface:
137 *
138 * SUBROUTINE CSIPHY ()
139 * *****************
140 *
141 *----------------------------------------------------------------------------*/
142
143void CS_PROCF (csiphy, CSIPHY) (void);
144
145/*----------------------------------------------------------------------------
146 * Hydrostatic equilibrium parameter.
147 *
148 * Fortran Interface:
149 *
150 * SUBROUTINE CSCFGP (ICFGRP)
151 * *****************
152 *
153 * INTEGER ICFGRP --> hydrostatic equilibrium
154 *----------------------------------------------------------------------------*/
155
156void CS_PROCF (cscfgp, CSCFGP) (int *icfgrp);
157
158/*----------------------------------------------------------------------------
159 * Restart parameters.
160 *
161 * Fortran Interface:
162 *
163 * SUBROUTINE CSISUI
164 * *****************
165 *
166 * INTEGER NTSUIT --> checkpoint frequency
167 * INTEGER ILEAUX --> restart with auxiliary
168 * INTEGER ICCFVG --> restart with frozen field
169 *----------------------------------------------------------------------------*/
170
171
172void CS_PROCF (csisui, CSISUI) (int *ntsuit,
173 int *ileaux,
174 int *iccvfg);
175
176/*----------------------------------------------------------------------------
177 * Time passing parameters.
178 *
179 * Fortran Interface:
180 *
181 * SUBROUTINE CSTIME
182 * *****************
183 *
184 *----------------------------------------------------------------------------*/
185
186void CS_PROCF (cstime, CSTIME) (void);
187
188/*----------------------------------------------------------------------------
189 *
190 * Fortran Interface:
191 *
192 * SUBROUTINE UINUM1
193 * *****************
194 *
195 *----------------------------------------------------------------------------*/
196
197void CS_PROCF (uinum1, UINUM1) (double *cdtvar);
198
199/*----------------------------------------------------------------------------
200 * Global numerical parameters.
201 *
202 * Fortran Interface:
203 *
204 * SUBROUTINE CSNUM2
205 * *****************
206 *
207 * INTEGER RELAXP --> pressure relaxation
208 * INTEGER EXTRAG --> wall pressure extrapolation
209 * INTEGER IMRGRA --> gradient reconstruction
210 *----------------------------------------------------------------------------*/
211
212void CS_PROCF (csnum2, CSNUM2) (double *relaxp,
213 double *extrag,
214 int *imrgra);
215
216void CS_PROCF (csphys, CSPHYS) (
217 double *viscv0,
218 double *visls0,
219 const int *itempk);
220
221/*----------------------------------------------------------------------------
222 * User scalar min and max values for clipping.
223 *
224 * Fortran Interface:
225 *
226 * subroutine cssca2
227 * *****************
228 *
229 * integer iturt --> turbulent flux model
230 *----------------------------------------------------------------------------*/
231
232void CS_PROCF (cssca2, CSSCA2) (int *iturt);
233
234void CS_PROCF (cssca3, CSSCA3) (double *visls0);
235
236/*----------------------------------------------------------------------------
237 * Turbulence initialization parameters.
238 *
239 * Fortran Interface:
240 *
241 * SUBROUTINE CSTINI
242 * *****************
243 *
244 *----------------------------------------------------------------------------*/
245
246void CS_PROCF (cstini, CSTINI) (void);
247
248/*----------------------------------------------------------------------------
249 * Define porosity.
250 *
251 * Fortran Interface:
252 *
253 * SUBROUTINE UIPORO
254 *----------------------------------------------------------------------------*/
255
256void CS_PROCF (uiporo, UIPORO) (void);
257
258/*----------------------------------------------------------------------------
259 * User momentum source terms.
260 *
261 * Fortran Interface:
262 *
263 * subroutine uitsnv (ncelet, vel, tsexp, tsimp)
264 * *****************
265 *
266 * integer ncelet <-- number of cells with halo
267 * double precision vel <-- fluid velocity
268 * double precision tsexp --> explicit source terms
269 * double precision tsimp --> implicit source terms
270 *----------------------------------------------------------------------------*/
271
272void CS_PROCF(uitsnv, UITSNV)(const cs_real_3_t *restrict vel,
273 cs_real_3_t *restrict tsexp,
274 cs_real_33_t *restrict tsimp);
275
276/*----------------------------------------------------------------------------
277 * User scalar source terms.
278 *
279 * Fortran Interface:
280 *
281 * subroutine uitssc (f_id, pvar, tsexp, tsimp)
282 * *****************
283 *
284 * integer idarcy <-- groundwater module activation
285 * integer f_id <-- field id
286 * double precision pvar <-- scalar
287 * double precision tsexp --> explicit source terms
288 * double precision tsimp --> implicit source terms
289 *----------------------------------------------------------------------------*/
290
291void CS_PROCF(uitssc, UITSSC)(const int *idarcy,
292 const int *f_id,
293 const cs_real_t *restrict pvar,
294 cs_real_t *restrict tsexp,
295 cs_real_t *restrict tsimp);
296
297/*----------------------------------------------------------------------------
298 * Thermal scalar source terms.
299 *
300 * Fortran Interface:
301 *
302 * subroutine uitsth (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
311void CS_PROCF(uitsth, UITSTH)(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 * Variables and user scalars initialization.
318 *
319 * Fortran Interface:
320 *
321 * subroutine uiiniv
322 * *****************
323 *
324 * integer isuite <-- restart indicator
325 * integer idarcy <-- groundwater module activation
326 * integer iccfth <-- type of initialization (compressible model)
327 *----------------------------------------------------------------------------*/
328
329void CS_PROCF(uiiniv, UIINIV)(const int *isuite,
330 const int *idarcy,
331 int *iccfth);
332
333/*----------------------------------------------------------------------------
334 * User law for material Properties
335 *
336 * Fortran Interface:
337 *
338 * subroutine uiphyv
339 * *****************
340 *
341 * integer iviscv <-- pointer for volumic viscosity viscv
342 * integer itempk <-- pointer for temperature (in K)
343 * double precision visls0 <-- diffusion coefficient of the scalars
344 * double precision viscv0 <-- volumic viscosity
345 *----------------------------------------------------------------------------*/
346
347void CS_PROCF(uiphyv, UIPHYV)(const cs_int_t *iviscv,
348 const cs_int_t *itempk,
349 const cs_real_t *visls0,
350 const cs_real_t *viscv0);
351
352/*----------------------------------------------------------------------------
353 * extra operations
354 *
355 * Fortran Interface:
356 *
357 * SUBROUTINE UIEXOP
358 * *****************
359 *
360 *----------------------------------------------------------------------------*/
361
362void CS_PROCF (uiexop, UIEXOP)(void);
363
364/*----------------------------------------------------------------------------
365 * groundwater model : read laws for capacity, saturation and permeability
366 *
367 * Fortran Interface:
368 *
369 * subroutine uidapp
370 * *****************
371 * integer permeability <-- permeability type
372 * integer diffusion <-- diffusion type
373 * integer gravity <-- check if gravity is taken into account
374 * double gravity_x <-- gravity direction
375 * double gravity_y <-- gravity direction
376 * double gravity_z <-- gravity direction
377 * integer unsaturated <-- unsaturated zone taken into account
378 *----------------------------------------------------------------------------*/
379
380void CS_PROCF (uidapp, UIDAPP) (const int *permeability,
381 const int *diffusion,
382 const int *gravity,
383 const cs_real_t *gravity_x,
384 const cs_real_t *gravity_y,
385 const cs_real_t *gravity_z,
386 const int *unsaturated);
387
388/*----------------------------------------------------------------------------
389 * Define fans with GUI
390 *
391 * Fortran Interface:
392 *
393 * SUBROUTINE UIFANS
394 * *****************
395 *
396 *----------------------------------------------------------------------------*/
397
398void CS_PROCF (uifans, UIFANS) (void);
399
400/*----------------------------------------------------------------------------
401 * Define error estimators
402 *
403 * Fortran Interface:
404 *
405 * SUBROUTINE UIERES
406 * *****************
407 *
408 *----------------------------------------------------------------------------*/
409
410void CS_PROCF (uieres, UIERES) (int *iescal,
411 int *iespre,
412 int *iesder,
413 int *iescor,
414 int *iestot);
415
416/*=============================================================================
417 * Public function prototypes
418 *============================================================================*/
419
420/*----------------------------------------------------------------------------
421 * Initialize GUI reader structures.
422 *----------------------------------------------------------------------------*/
423
424void
425cs_gui_init(void);
426
427/*-----------------------------------------------------------------------------
428 * Free memory: clean global private variables.
429 *----------------------------------------------------------------------------*/
430
431void
432cs_gui_finalize(void);
433
434/*----------------------------------------------------------------------------*/
440/*----------------------------------------------------------------------------*/
441
442void
444
445/*----------------------------------------------------------------------------*/
456/*----------------------------------------------------------------------------*/
457
458void
459cs_gui_head_losses(const cs_zone_t *zone,
460 const cs_real_3_t *cvara_vel,
461 cs_real_t cku[][6]);
462
463/*-----------------------------------------------------------------------------
464 * Selection of linear solvers.
465 *----------------------------------------------------------------------------*/
466
467void
469
470/*-----------------------------------------------------------------------------
471 * Define parallel IO settings.
472 *----------------------------------------------------------------------------*/
473
474void
476
477/*-----------------------------------------------------------------------------
478 * Set partitioning options.
479 *----------------------------------------------------------------------------*/
480
481void
482cs_gui_partition(void);
483
484/*----------------------------------------------------------------------------
485 * Determine porosity model type
486 *----------------------------------------------------------------------------*/
487
488void
490
491/*----------------------------------------------------------------------------
492 * 1D profile postprocessing
493 *----------------------------------------------------------------------------*/
494
495void
497
498/*-----------------------------------------------------------------------------
499 * Get initial value from property markup.
500 *
501 * parameters:
502 * property_name <-- name of the property
503 * value --> new initial value of the property
504 *----------------------------------------------------------------------------*/
505
506void
507cs_gui_properties_value(const char *property_name,
508 double *value);
509
510/*-----------------------------------------------------------------------------
511 * Get value of property markup for fluid of given id
512 *
513 * parameters:
514 * fluid_id <-- fluid index
515 * property_name <-- name of the property
516 * value --> new initial value of the property
517 *----------------------------------------------------------------------------*/
518
519void
520cs_gui_properties_value_by_fluid_id(const int fluid_id,
521 const char *property_name,
522 double *value);
523
524/*-----------------------------------------------------------------------------
525 * Get value of reference fluid properties parameter.
526 *
527 * parameters:
528 * name <-- parameter name
529 * value --> parameter value
530 *----------------------------------------------------------------------------*/
531
532void
533cs_gui_fluid_properties_value(const char *param,
534 double *value);
535
536/*----------------------------------------------------------------------------
537 * Get thermal scalar model.
538 *
539 * return:
540 * value of itherm
541 *----------------------------------------------------------------------------*/
542
543int
545
546/*----------------------------------------------------------------------------
547 * Time moments definition
548 *----------------------------------------------------------------------------*/
549
550void
552
553/*-----------------------------------------------------------------------------
554 * Set turbomachinery model
555 *----------------------------------------------------------------------------*/
556
557void
559
560/*-----------------------------------------------------------------------------
561 * Set turbomachinery options.
562 *----------------------------------------------------------------------------*/
563
564void
566
567/*----------------------------------------------------------------------------
568 * Logging output for MEI usage.
569 *----------------------------------------------------------------------------*/
570
571void
572cs_gui_usage_log(void);
573
574/*----------------------------------------------------------------------------
575 * Define user variables through the GUI.
576 *----------------------------------------------------------------------------*/
577
578void
580
581/*----------------------------------------------------------------------------
582 * Define user arrays through the GUI.
583 *----------------------------------------------------------------------------*/
584
585void
587
588/*----------------------------------------------------------------------------
589 * Define balance by zone through the GUI.
590 *----------------------------------------------------------------------------*/
591
592void
594
595/*----------------------------------------------------------------------------
596 * Define pressure drop through the GUI.
597 *----------------------------------------------------------------------------*/
598
599void
601
602/*----------------------------------------------------------------------------
603 * Define fans through the GUI.
604 *----------------------------------------------------------------------------*/
605
606void
608
609/*----------------------------------------------------------------------------
610 * Define error estimator through the GUI.
611 *----------------------------------------------------------------------------*/
612
613void
614cs_gui_error_estimator(int *iescal,
615 int *iespre,
616 int *iesder,
617 int *iescor,
618 int *iestot);
619
620/*----------------------------------------------------------------------------
621 * Define volume and boundary zones through the GUI.
622 *----------------------------------------------------------------------------*/
623
624void
625cs_gui_zones(void);
626
627/*----------------------------------------------------------------------------*/
628
630
631#endif /* __CS_GUI_H__ */
#define restrict
Definition cs_defs.h:127
#define BEGIN_C_DECLS
Definition cs_defs.h:467
double cs_real_t
Floating-point value.
Definition cs_defs.h:302
int cs_int_t
Fortran-compatible integer.
Definition cs_defs.h:301
#define CS_PROCF(x, y)
Definition cs_defs.h:481
cs_real_t cs_real_3_t[3]
vector of 3 floating-point values
Definition cs_defs.h:315
#define END_C_DECLS
Definition cs_defs.h:468
cs_real_t cs_real_33_t[3][3]
3x3 matrix of floating-point values
Definition cs_defs.h:321
@ vel
Definition cs_field_pointer.h:68
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:2728
void cs_gui_porous_model(void)
Definition cs_gui.c:4405
void cs_gui_error_estimator(int *iescal, int *iespre, int *iesder, int *iescor, int *iestot)
Definition cs_gui.c:5463
void uiporo(void)
Definition cs_gui.c:2532
void uifans(void)
Definition cs_gui.c:3908
void cs_gui_pressure_drop_by_zone(void)
Definition cs_gui.c:5373
void cs_gui_parallel_io(void)
Definition cs_gui.c:4238
void cs_gui_finalize(void)
Definition cs_gui.c:3959
void uiexop(void)
Definition cs_gui.c:3512
void cs_gui_init(void)
Definition cs_gui.c:3941
void cs_gui_properties_value(const char *property_name, double *value)
Definition cs_gui.c:4726
void cscpva(void)
Definition cs_gui.c:1748
void uieres(int *iescal, int *iespre, int *iesder, int *iescor, int *iestot)
Definition cs_gui.c:3923
void cs_gui_turb_model(void)
Definition cs_gui.c:1607
void csiphy(void)
Definition cs_gui.c:1910
void cstime(void)
Definition cs_gui.c:1994
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:2611
void csphys(double *viscv0, double *visls0, const int *itempk)
Definition cs_gui.c:2209
void cs_gui_time_moments(void)
Definition cs_gui.c:4840
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:3338
void cs_gui_properties_value_by_fluid_id(const int fluid_id, const char *property_name, double *value)
Definition cs_gui.c:4752
void cs_gui_user_variables(void)
Definition cs_gui.c:5108
void cscfgp(int *icfgrp)
Definition cs_gui.c:1937
void cs_gui_linear_solvers(void)
Definition cs_gui.c:4094
void cs_gui_fluid_properties_value(const char *param, double *value)
Definition cs_gui.c:4788
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:2815
void csidtv(void)
Definition cs_gui.c:1886
void cs_gui_turbomachinery(void)
Definition cs_gui.c:4971
void cs_gui_user_arrays(void)
Definition cs_gui.c:5168
void cssca2(int *iturt)
Definition cs_gui.c:2368
void cssca3(double *visls0)
Definition cs_gui.c:2447
void cs_gui_profile_output(void)
Definition cs_gui.c:4435
void cs_gui_zones(void)
Definition cs_gui.c:5205
void cs_gui_define_fans(void)
Definition cs_gui.c:5395
void cs_gui_add_notebook_variables(void *ev_law)
Add notebook variable to a formula.
Definition cs_gui.c:3984
void csvvva(int *iviscv)
Definition cs_gui.c:1773
void cs_gui_balance_by_zone(void)
Definition cs_gui.c:5344
void cs_gui_usage_log(void)
Definition cs_gui.c:5080
void uinum1(double *cdtvar)
Definition cs_gui.c:2067
void csivis(void)
Definition cs_gui.c:1812
void csther(void)
Definition cs_gui.c:1567
void cs_gui_turb_ref_values(void)
Definition cs_gui.c:1703
void uiiniv(const int *isuite, const int *idarcy, int *iccfth)
Definition cs_gui.c:2896
void cs_gui_turbomachinery_rotor(void)
Definition cs_gui.c:4986
void uidapp(const int *permeability, const int *diffusion, const int *gravity, const cs_real_t *gravity_x, const cs_real_t *gravity_y, const cs_real_t *gravity_z, const int *unsaturated)
Definition cs_gui.c:3534
void csisui(int *ntsuit, int *ileaux, int *iccvfg)
Definition cs_gui.c:1965
int cs_gui_thermal_model(void)
Definition cs_gui.c:4806
void cs_gui_partition(void)
Definition cs_gui.c:4306
void uithsc(void)
Definition cs_gui.c:1795
void cstini(void)
void cs_gui_head_losses(const cs_zone_t *zone, const cs_real_3_t *cvara_vel, cs_real_t cku[][6])
Compute GUI-defined head losses for a given volume zone.
Definition cs_gui.c:4021
void csnum2(double *relaxp, double *extrag, int *imrgra)
Definition cs_gui.c:2180
integer, save icfgrp
indicates if the boundary conditions should take into account (=1) or not (=0) the hydrostatic balanc...
Definition ppincl.f90:663
double precision, save viscv0
reference volume viscosity (noted in the equation expressing in the paragraph dedicated to iviscv) ...
Definition ppincl.f90:623
integer, save iviscv
additional property:
Definition ppincl.f90:600
integer, save itempk
temperature deduced from the specific total energy
Definition ppincl.f90:560
integer, save ntsuit
saving period of the restart filesy5
Definition entsor.f90:72
integer(c_int), pointer, save imrgra
type of gradient reconstruction
Definition optcal.f90:286
integer, save ileaux
Indicates the reading (=1) or not (=0) of the auxiliary calculation restart file Useful only in the ...
Definition optcal.f90:317
double precision, dimension(nscamx), save visls0
reference molecular diffusivity related to the scalar J ( ).
Definition optcal.f90:1190
integer(c_int), pointer, save iccvfg
indicates whether the dynamic field should be frozen or not:
Definition optcal.f90:853
double precision, dimension(nvarmx), save cdtvar
multiplicator coefficient for the time step of each variable
Definition optcal.f90:480
integer, dimension(nscamx), save iturt
turbulent flux model for for any scalar , iturt(isca)
Definition optcal.f90:787
Definition cs_zone.h:55