1
/*============================================================================
3
* This file is part of the Code_Saturne Kernel, element of the
4
* Code_Saturne CFD tool.
6
* Copyright (C) 1998-2009 EDF S.A., France
8
* contact: saturne-support@edf.fr
10
* The Code_Saturne Kernel is free software; you can redistribute it
11
* and/or modify it under the terms of the GNU General Public License
12
* as published by the Free Software Foundation; either version 2 of
13
* the License, or (at your option) any later version.
15
* The Code_Saturne Kernel is distributed in the hope that it will be
16
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty
17
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
* GNU General Public License for more details.
20
* You should have received a copy of the GNU General Public License
21
* along with the Code_Saturne Kernel; if not, write to the
22
* Free Software Foundation, Inc.,
23
* 51 Franklin St, Fifth Floor,
24
* Boston, MA 02110-1301 USA
26
*============================================================================*/
31
/*============================================================================
32
* Management of the GUI parameters file: main parameters
33
*============================================================================*/
35
/*----------------------------------------------------------------------------
37
*----------------------------------------------------------------------------*/
41
/*----------------------------------------------------------------------------*/
45
/*============================================================================
47
*============================================================================*/
49
/*============================================================================
50
* Public function prototypes for Fortran API
51
*============================================================================*/
53
/*----------------------------------------------------------------------------
54
* Initialise the global 'vars' structure.
60
*----------------------------------------------------------------------------*/
62
void CS_PROCF (uiinit, UIINIT) (void);
64
/*----------------------------------------------------------------------------
72
* INTEGER ITURB <-- turbulence model
73
* INTEGER IDEUCH <-- wall law treatment
74
* INTEGER IGRAKE <-- k-eps gravity effects
75
* INTEGER IGRAKI <-- Rij-eps gravity effects
76
* DOUBLE PRECISION XLOMLG <-- mixing_length_scale
77
*----------------------------------------------------------------------------*/
79
void CS_PROCF (csturb, CSTURB) (int *const iturb,
83
double *const xlomlg);
85
/*----------------------------------------------------------------------------
86
* Specific heat variable or constant indicator.
93
* INTEGER ICP <-- Specific heat variable or constant indicator
94
*----------------------------------------------------------------------------*/
96
void CS_PROCF (cscpva, CSCPVA) (int *const icp);
98
/*----------------------------------------------------------------------------
99
* User scalars number.
106
* INTEGER NSCAUS <-- user scalars number
107
*----------------------------------------------------------------------------*/
109
void CS_PROCF (csnsca, CSNSCA) (int *const nscaus);
111
/*----------------------------------------------------------------------------
112
* User scalars which are variance.
116
* SUBROUTINE CSISCA (ISCAVR)
119
* INTEGER ISCAVR <-- user scalars variance array
120
*----------------------------------------------------------------------------*/
122
void CS_PROCF (csisca, CSISCA) (int *const iscavr);
124
/*----------------------------------------------------------------------------
125
* Constant or variable indicator for the user scalar laminar viscosity.
129
* SUBROUTINE CSIVIS (IDTVAR)
132
* INTEGER ISCAVR <--> number of the related variance if any
133
* INTEGER IVISLS <-- indicator for the user scalar viscosity
134
* INTEGER ISCALT <--> number of the user thermal scalar if any
135
* INTEGER ISCSTH <--> type of the user thermal scalar
136
*----------------------------------------------------------------------------*/
138
void CS_PROCF (csivis, CSIVIS) (int *const iscavr,
143
/*----------------------------------------------------------------------------
144
* Time passing parameter.
148
* SUBROUTINE CSIDTV (IDTVAR)
151
* INTEGER IDTVAR <-- fixed or variable time step
152
*----------------------------------------------------------------------------*/
154
void CS_PROCF(csidtv, CSIDTV) (int *const idtvar);
156
/*----------------------------------------------------------------------------
157
* Hydrostatic pressure parameter.
161
* SUBROUTINE CSIPHY (IPHYDR)
164
* INTEGER IPHYDR <-- hydrostatic pressure
165
*----------------------------------------------------------------------------*/
167
void CS_PROCF (csiphy, CSIPHY) (int *const iphydr);
169
/*----------------------------------------------------------------------------
171
* SUBROUTINE CSVNUM()
173
*----------------------------------------------------------------------------*/
175
void CS_PROCF (csvnum, CSVNUM) (const int *const nvar,
179
const int *const ipr,
180
const int *const iturb,
182
const int *const iep,
183
const int *const ir11,
184
const int *const ir22,
185
const int *const ir33,
186
const int *const ir12,
187
const int *const ir13,
188
const int *const ir23,
189
const int *const iomg,
190
const int *const iphi,
191
const int *const ifb,
192
const int *const iale,
193
const int *const iuma,
194
const int *const ivma,
195
const int *const iwma,
196
const int *const isca,
197
const int *const iscapp);
199
/*----------------------------------------------------------------------------
200
* Restart parameters.
207
* INTEGER ISUITE <-- restart
208
* INTEGER NTSUIT <-- checkpoint frequency
209
* INTEGER ILEAUX <-- restart with auxiliary
210
* INTEGER ICCFVG <-- restart with frozen field
211
*----------------------------------------------------------------------------*/
214
void CS_PROCF (csisui, CSISUI) (int *const isuite,
219
/*----------------------------------------------------------------------------
220
* Time passing parameters.
227
* INTEGER INPDT0 <-- zero tim step
228
* INTEGER IPTLTO <-- thermal time step control
229
* INTEGER NTMABS <-- iterations numbers
230
* INTEGER IDTVAR <-- time step's options
231
* DOUBLE PRECISION DTREF <-- time step
232
* DOUBLE PRECISION DTMIN <-- minimal time step
233
* DOUBLE PRECISION DTMAX <-- maximal time step
234
* DOUBLE PRECISION COUMAX <-- maximal courant number
235
* DOUBLE PRECISION FOUMAX <-- maximal fournier number
236
* DOUBLE PRECISION VARRDT <-- max time step variation between 2 iterations
237
* DOUBLE PRECISION RELXST <-- relaxation coefficient if idtvar = -1
238
*----------------------------------------------------------------------------*/
240
void CS_PROCF (cstime, CSTIME) (int *const inpdt0,
247
double *const coumax,
248
double *const foumax,
249
double *const varrdt,
250
double *const relxst);
252
/*----------------------------------------------------------------------------
253
* Check if a users thermal scalar is defined.
260
* INTEGER ISCALT <-- number of the user thermal scalar if any
261
* INTEGER ISCSTH <-- type of the user thermal scalar
262
*----------------------------------------------------------------------------*/
264
void CS_PROCF (cssca1, CSSCA1) (int *const iscalt,
267
/*----------------------------------------------------------------------------
274
*----------------------------------------------------------------------------*/
276
void CS_PROCF (uinum1, UINUM1) (const int *const isca,
277
const int *const iscapp,
278
double *const blencv,
282
double *const cdtvar,
284
double *const epsilo);
286
/*----------------------------------------------------------------------------
287
* Global numerical parameters.
294
* INTEGER IVISSE <-- gradient transpose
295
* INTEGER RELAXP <-- pressure relaxation
296
* INTEGER IPUCOU <-- velocity pressure coupling
297
* INTEGER EXTRAG <-- wall pressure extrapolation
298
* INTEGER IMRGRA <-- gradient reconstruction
299
* INTEGER IMGR <-- multigrid algorithm for pressure
300
*----------------------------------------------------------------------------*/
302
void CS_PROCF (csnum2, CSNUM2) ( int *const ivisse,
303
double *const relaxp,
305
double *const extrag,
309
void CS_PROCF (csphys, CSPHYS) (const int *const nmodpp,
316
double *const omegax,
317
double *const omegay,
318
double *const omegaz,
320
double *const viscl0,
325
/*----------------------------------------------------------------------------
326
* User scalar min and max values for clipping.
333
* INTEGER ISCAVR --> number of the related variance if any
334
* DOUBLE PRECISION SCAMIN <-- user scalar min array
335
* DOUBLE PRECISION SCAMAX <-- user scalar max array
336
*----------------------------------------------------------------------------*/
338
void CS_PROCF (cssca2, CSSCA2) ( const int *const iscavr,
339
double *const scamin,
340
double *const scamax);
342
void CS_PROCF (cssca3, CSSCA3) (const int *const iscalt,
343
const int *const iscavr,
344
double *const visls0,
348
/*----------------------------------------------------------------------------
349
* Array of properties used in the calculation
350
*----------------------------------------------------------------------------*/
352
void CS_PROCF (uiprop, UIPROP) (const int *const irom,
353
const int *const iviscl,
354
const int *const ivisct,
355
const int *const ivisls,
356
const int *const icour,
357
const int *const ifour,
358
const int *const ismago,
359
const int *const iale,
360
const int *const icp,
361
const int *const iscalt,
362
const int *const iscavr,
363
const int *const iprtot,
364
const int *const ipppro,
365
const int *const ipproc,
366
const int *const icmome,
367
const int *const ipptx,
368
const int *const ippty,
369
const int *const ipptz,
370
const int *const ippdt,
371
const int *const ivisma,
372
const int *const idtvar,
373
const int *const ipucou,
374
const int *const iappel);
376
/*----------------------------------------------------------------------------
377
* Temporal averaging treatment
378
*----------------------------------------------------------------------------*/
380
void CS_PROCF (uimoyt, UIMOYT) (const int *const ndgmox,
385
/*----------------------------------------------------------------------------
386
* Turbulence initialization parameters.
393
* INTEGER UREF <-- reference velocity
394
* INTEGER ALMAX <-- reference length
395
*----------------------------------------------------------------------------*/
397
void CS_PROCF (cstini, CSTINI) (double *const uref,
398
double *const almax);
400
void CS_PROCF (csenso, CSENSO) (const int *const nvppmx,
422
const int *const isca,
423
const int *const iscapp,
424
const int *const ipprtp,
425
double *const xyzcap);
427
void CS_PROCF(fcnmva, FCNMVA)
429
const char *const fstr, /* --> Fortran string */
430
int *const len, /* --> String Length */
431
int *const var_id /* --> Variable Id (1 to n) */
435
void CS_PROCF(cfnmva, CFNMVA)
437
char *const fstr, /* --> Fortran string */
438
int *const len, /* --> String Length */
439
int *const var_id /* --> Variable Id (1 to n) */
443
void CS_PROCF(nvamem, NVAMEM) (void);
445
/*----------------------------------------------------------------------------
450
* SUBROUTINE UIUSAR (ICOFTU)
453
* INTEGER ICOFTU --> Dimension coef for user arrays
454
*----------------------------------------------------------------------------*/
456
void CS_PROCF (uiusar, UIUSAR) (int *const icoftu);
458
/*----------------------------------------------------------------------------
459
* Variables and user scalars initialization.
463
* subroutine uiiniv (ncelet, isuite, isca, iscold, rtp)
466
* integer ncelet --> number of cells with halo
467
* integer isuite --> restart indicator
468
* integer isca --> indirection array for scalar number
469
* integer iscold --> scalar number for restart
470
* double precision rtp <-- variables and scalars array
471
*----------------------------------------------------------------------------*/
473
void CS_PROCF(uiiniv, UIINIV) (const int *ncelet,
479
/*----------------------------------------------------------------------------
480
* User law for material Properties
484
* SUBROUTINE UIPHYV (NCELET, ISCA, RTP)
487
* INTEGER NCEL --> number of cells whithout halo
488
* INTEGER NCELET --> number of cells whith halo
489
* INTEGER NSCAUS --> number of user scalar including thermal scalar
490
* INTEGER IROM --> pointer for density rho
491
* INTEGER IVISCL --> pointer for mulecular viscosity mu
492
* INTEGER ICP --> pointer for predifined heat Cp
493
* INTEGER IVISLS --> pointer for Lambda/Cp
494
* INTEGER IROVAR --> =1 if rho variable, =0 if rho constant
495
* INTEGER IVIVAR --> =1 if mu variable, =0 if mu constant
496
* INTEGER ISCA --> indirection array for scalar number
497
* INTEGER ISCALT --> pointer for the thermal scalar in ISCA
498
* INTEGER ISCAVR --> scalars that are variance
499
* INTEGER IPPROC --> indirection array for cell properties
500
* DOUBLE PRECISION RO0 --> value of density if IROVAR=0
501
* DOUBLE PRECISION CP0 --> value of predifined heat if ICP=0
502
* DOUBLE PRECISION RTP --> variables and scalars array
503
* DOUBLE PRECISION PROPCE <-- cell properties array
504
*----------------------------------------------------------------------------*/
506
void CS_PROCF(uiphyv, UIPHYV)(const cs_int_t *const ncel,
507
const cs_int_t *const ncelet,
508
const cs_int_t *const nscaus,
509
const cs_int_t irom[],
510
const cs_int_t iviscl[],
511
const cs_int_t icp[],
512
const cs_int_t ivisls[],
513
const cs_int_t irovar[],
514
const cs_int_t ivivar[],
515
const cs_int_t isca[],
516
const cs_int_t iscalt[],
517
const cs_int_t iscavr[],
518
const cs_int_t ipproc[],
519
const cs_real_t ro0[],
520
const cs_real_t cp0[],
521
const cs_real_t rtp[],
524
/*----------------------------------------------------------------------------
525
* Head losses definition
532
* integer iappel --> number of calls during a time step
533
* integer iphas --> number of phase (only 1 allowed)
534
* integer ncelet --> number of cells with halo
535
* integer ncepdp <-- number of cells with head losses
536
* integer icepdc <-- ncepdp cells number with head losses
537
* double precision ckupdc <-- head losses matrix
538
* double precision rtpa --> variables array at previous time step
539
*----------------------------------------------------------------------------*/
541
void CS_PROCF(uikpdc, UIKPDC)(const int* iappel,
547
const double rtpa[] );
549
/*----------------------------------------------------------------------------
550
* 1D profile postprocessing
557
* INTEGER NCELET --> number of cells with halo
558
* INTEGER NCEL --> number of cells without halo
559
* INTEGER NTMABS --> max iterations numbers
560
* INTEGER NTCABS --> current iteration number
561
* DOUBLE PRECISION TTCABS --> current physical time
562
* DOUBLE PRECISION XYZCEN --> cell's gravity center
563
* DOUBLE PRECISION RTP --> variables and scalars array
564
* DOUBLE PRECISION PROPCE --> property array
565
*----------------------------------------------------------------------------*/
567
void CS_PROCF (uiprof, UIPROF)(const int *const ncelet,
568
const int *const ncel,
569
const int *const ntmabs,
570
const int *const ntcabs,
571
const double *const ttcabs,
572
const double *const xyzcen,
573
const double *const rtp,
574
const double *const propce);
576
/*----------------------------------------------------------------------------
577
* Free memory: clean global private variables and libxml2 variables.
584
* INTEGER NCHARB --> number of coal
585
*----------------------------------------------------------------------------*/
587
void CS_PROCF (memui1, MEMUI1) (const int *const ncharb);
589
/*=============================================================================
590
* Public function prototypes
591
*============================================================================*/
593
/*-----------------------------------------------------------------------------
594
* Free memory: clean global private variables and libxml2 variables
595
*----------------------------------------------------------------------------*/
598
cs_gui_clean_memory(void);
600
/*----------------------------------------------------------------------------*/
604
#endif /* __CS_GUI_H__ */