1 /*============================================================================
2 * Base physical constants data.
3 *============================================================================*/
4
5 /*
6 This file is part of Code_Saturne, a general-purpose CFD tool.
7
8 Copyright (C) 1998-2021 EDF S.A.
9
10 This program is free software; you can redistribute it and/or modify it under
11 the terms of the GNU General Public License as published by the Free Software
12 Foundation; either version 2 of the License, or (at your option) any later
13 version.
14
15 This program is distributed in the hope that it will be useful, but WITHOUT
16 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
18 details.
19
20 You should have received a copy of the GNU General Public License along with
21 this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
22 Street, Fifth Floor, Boston, MA 02110-1301, USA.
23 */
24
25 /*----------------------------------------------------------------------------*/
26
27 #include "cs_defs.h"
28
29 /*----------------------------------------------------------------------------*/
30
31 /*----------------------------------------------------------------------------
32 * Standard C library headers
33 *----------------------------------------------------------------------------*/
34
35 #include <assert.h>
36 #include <stdio.h>
37 #include <stdlib.h>
38 #include <string.h>
39
40 /*----------------------------------------------------------------------------
41 * Local headers
42 *----------------------------------------------------------------------------*/
43
44 #include "bft_mem.h"
45 #include "bft_error.h"
46 #include "bft_printf.h"
47
48 #include "cs_log.h"
49 #include "cs_map.h"
50 #include "cs_parall.h"
51 #include "cs_mesh_location.h"
52
53 /*----------------------------------------------------------------------------
54 * Header for the current file
55 *----------------------------------------------------------------------------*/
56
57 #include "cs_physical_constants.h"
58
59 /*----------------------------------------------------------------------------*/
60
61 BEGIN_C_DECLS
62
63 /*=============================================================================
64 * Additional doxygen documentation
65 *============================================================================*/
66
67 /*!
68 \file cs_physical_constants.c
69 Base physical constants and fluid properties data.
70 */
71
72 /*----------------------------------------------------------------------------*/
73
74 /*! \struct cs_physical_constants_t
75
76 \brief Physical constants descriptor.
77
78 Members of this structure are publicly accessible, to allow for
79 concise syntax, as they are expected to be used in many places.
80
81 \var cs_physical_constants_t::gx
82 x component of the gravity vector
83 \var cs_physical_constants_t::gy
84 y component of the gravity vector
85 \var cs_physical_constants_t::gz
86 z component of the gravity vector
87 \var cs_physical_constants_t::icorio
88 Coriolis source terms
89 */
90
91 /*----------------------------------------------------------------------------*/
92
93 /*! \struct cs_fluid_properties_t
94
95 \brief Fluid properties descriptor.
96
97 Members of these fluid properties are publicly accessible, to allow for
98 concise syntax, as they are expected to be used in many places.
99
100 \var cs_fluid_properties_t::ixyzp0
101 filling \ref xyzp0 indicator
102
103 \var cs_fluid_properties_t::icp
104 indicates if the isobaric specific heat \f$C_p\f$ is variable
105 - -1: uniform, no property field is declared
106 - 0: variable, \f$C_p\f$ is declared as a property field\n
107 When gas or coal combustion is activated, \ref icp is automatically
108 set to 0 (constant \f$C_p\f$). With the electric module, it is
109 automatically set to 1. The user is not allowed to modify these
110 default choices.\n When \ref icp = 1 is specified, the code
111 automatically modifies this value to make \ref icp designate the
112 effective index-number of the property "specific heat". For each cell
113 iel, the value of \f$C_p\f$ is then specified by the user in the
114 appropriate subroutine (\ref cs_user_physical_properties for the
115 standard physics).\n Useful if there is
116 1\f$\leqslant\f$N\f$\leqslant\f$\ref dimens::nscal "nscal" so that
117 iscsth(n)=1 (there is a scalar temperature) or with the compressible
118 module for non perfect gases.
119
120 \var cs_fluid_properties_t::icv
121 property index of the isochoric specific heat
122 - -1: uniform isochoric specific heat (no property field defined)
123
124 \var cs_fluid_properties_t::irovar
125 variable density field \f$ \rho \f$:
126 - 1: true, its variation law be given either
127 in the GUI, or in the user subroutine
128 \ref cs_user_physical_properties .\n
129 See \ref physical_properties for more informations.
130 - 0: false, its value is the reference density
131 \ref ro0.
132
133 \var cs_fluid_properties_t::ivivar
134 variable viscosity field \f$ \mu \f$:
135 - 1: true, its variation law be given either
136 in the GUI, or in the user subroutine
137 \ref cs_user_physical_properties .\n
138 See \ref physical_properties for more informations.
139 - 0: false, its value is the reference molecular
140 dynamic viscosity \ref viscl0
141 \var cs_fluid_properties_t::ivsuth
142 Sutherland law for laminar viscosity and thermal conductivity
143 Only useful in gas mix (igmix) specific physics
144 - 1: Sutherland law
145 - 0: low temperature law (linear except for helium)
146
147 \var cs_fluid_properties_t::ro0
148 reference density
149
150 Negative value: not initialized.
151 Its value is not used in gas or coal combustion modelling (it will be
152 calculated following the perfect gas law, with \f$P_0\f$ and \f$T_0\f$).
153 With the compressible module, it is also not used by the code, but it
154 may be (and often is) referenced by the user in user subroutines; it is
155 therefore better to specify its value.
156
157 Always useful otherwise, even if a law defining the density is given by
158 the user subroutines \ref cs_user_physical_properties.
159 Indeed, except with the compressible module, CS does not use the total
160 pressure \f$P\f$ when solving the Navier-Stokes equation, but a reduced
161 pressure \f$ P^*=P-\rho_0\vect{g}.(\vect{x}-\vect{x}_0)+ P^*_0-P_0 \f$,
162 where \f$\vect{x_0}\f$ is a reference point (see \ref xyzp0) and \f$
163 P^*_0 \f$ and \f$ P_0 \f$ are reference values (see \ref pred0 and
164 \ref p0). Hence, the term \f$-\grad{P}+\rho\vect{g}\f$ in the equation
165 is treated as \f$-\grad{P^*}+(\rho-\rho_0)\vect{g}\f$. The closer
166 \ref ro0 is to the value of \f$
167 \rho\f$, the more \f$P^*\f$ will tend to
168 represent only the dynamic part of the pressure and the faster and more
169 precise its solution will be. Whatever the value of \ref ro0, both \f$
170 P\f$ and \f$P^*\f$ appear in the log and the post-processing
171 outputs with the compressible module, the calculation is made directly
172 on the total pressure.
173
174 \var cs_fluid_properties_t::viscl0
175 reference molecular dynamic viscosity
176
177 Negative value: not initialized.
178
179 Always useful, it is the used value unless the user specifies the
180 viscosity in the subroutine \ref cs_user_physical_properties.
181
182 \var cs_fluid_properties_t::viscv0
183 reference volume viscosity
184
185 Noted \f$\kappa\f$ in the equation expressing \f$\tens{\sigma}\f$ in
186 the paragraph dedicated to \ref iviscv)
187
188 Used by the compressible model, unless the user specifies a variable
189 volume viscosity in the GUI or \ref cs_user_physical_properties.
190
191 \var cs_fluid_properties_t::p0
192 reference pressure for the total pressure
193
194 Except with the compressible module, the total pressure \f$P\f$ is
195 evaluated from the reduced pressure \f$P^*\f$ so that \f$P\f$ is equal
196 to \ref p0 at the reference position \f$\vect{x}_0\f$ (given by
197 \ref xyzp0).
198 With the compressible module, the total pressure is solved directly.
199 Always useful.
200
201 \var cs_fluid_properties_t::pred0
202 reference value for the reduced pressure \f$P^*\f$ (see \ref ro0)
203
204 It is especially used to initialise the reduced pressure and as a
205 reference value for the outlet boundary conditions.
206 For an optimised precision in the resolution of \f$P^*\f$, it is wiser
207 to keep \ref pred0 to 0.
208 With the compressible module, the "pressure" variable appearing in the
209 equations directly represents the total pressure.
210 It is therefore initialized to \ref p0 and not \ref pred0 (see
211 \ref ro0).
212 Always useful, except with the compressible module.
213
214 \var cs_fluid_properties_t::xyzp0[3]
215 coordinates of the reference point \f$\vect{x}_0\f$ for the total
216 pressure
217
218 - When there are no Dirichlet conditions for the pressure (closed
219 domain), \ref xyzp0 does not need to be specified (unless the total
220 pressure has a clear physical meaning in the configuration treated).
221 - When Dirichlet conditions on the pressure are specified but only
222 through stantard outlet conditions (as it is in most configurations),
223 \ref xyzp0 does not need to be specified by the user, since it will be
224 set to the coordinates of the reference outlet face (\em i.e. the code
225 will automatically select a reference outlet boundary face and set
226 \ref xyzp0 so that \f$P\f$ equals \ref p0 at this face). Nonetheless, if
227 \ref xyzp0 is specified by the user, the calculation will remain
228 correct.
229 - When direct Dirichlet conditions are specified by the user (specific
230 value set on specific boundary faces), it is better to specify the
231 corresponding reference point (\em i.e. specify where the total pressure
232 is \ref p0). This way, the boundary conditions for the reduced pressure
233 will be close to \ref pred0, ensuring an optimal precision in the
234 resolution. If \ref xyzp0 is not specified, the reduced pressure will be
235 shifted, but the calculations will remain correct.
236 - With the compressible module, the "pressure" variable appearing in the
237 equations directly represents the total pressure. \ref xyzp0 is
238 therefore not used.
239
240 Always useful, except with the compressible module.
241
242 \var cs_fluid_properties_t::t0
243 reference temperature
244
245 Useful for the specific physics gas or coal combustion (initialization
246 of the density), for the electricity modules to initialize the domain
247 temperature and for the compressible module (initializations).
248 It must be given in Kelvin.
249
250 \var cs_fluid_properties_t::cp0
251 reference specific heat
252
253 Useful if \ref cs_thermal_model_t::itherm "cs_glob_thermal_model->itherm"
254 != CS_THERMAL_MODEL_NONE, unless the
255 user specifies the specific heat in the user subroutine \ref cs_user_physical_properties
256 (\ref cstphy::icp "icp" > 0) with the compressible module or coal combustion,
257 \ref cp0 is also needed even when there is no user scalar. \note
258 None of the scalars from the specific physics is a temperature. \note
259 When using the Graphical Interface, \ref cp0 is also used to
260 calculate the diffusivity of the thermal scalars, based on their
261 conductivity; it is therefore needed, unless the diffusivity is also
262 specified in \ref cs_user_physical_properties.
263
264 \var cs_fluid_properties_t::cv0
265 reference isochoric specific heat (J/kg/K)
266
267 Useful for the compressible module.
268
269 \var cs_fluid_properties_t::lambda0
270 reference heat conductivity (W/m/K)
271
272 Always useful. This was previously only available through the GUI,
273 so in most cases, is set to 1.
274
275 \var cs_fluid_properties_t::xmasmr
276 molar mass of the perfect gas in \f$ kg/mol \f$
277 (if \ref cstphy::ieos "ieos"=1)
278
279 Always useful.
280
281 \var cs_fluid_properties_t::ipthrm
282 uniform variable thermodynamic pressure:
283 - 0: false (ie not variable)
284 - 1: true
285
286 \var cs_fluid_properties_t::pther
287 Thermodynamic pressure for the current time step.
288
289 \var cs_fluid_properties_t::pthera
290 thermodynamic pressure for the previous time step
291
292 \var cs_fluid_properties_t::pthermax
293 thermodynamic maximum pressure for user clipping, used to model a
294 venting effect
295
296 \var cs_fluid_properties_t::sleak
297 Leak surface
298
299 \var cs_fluid_properties_t::kleak
300 Leak head loss (2.9 by default, from Idelcick)
301
302 \var cs_fluid_properties_t::roref
303 Initial reference density
304 */
305
306 /*! \cond DOXYGEN_SHOULD_SKIP_THIS */
307
308 /*=============================================================================
309 * Macro definitions
310 *============================================================================*/
311
312 /*============================================================================
313 * Type definitions
314 *============================================================================*/
315
316 /*============================================================================
317 * Static global variables
318 *============================================================================*/
319
320 /* main physical constants structure and associated pointer */
321
322 static cs_physical_constants_t _physical_constants = {
323 .gravity[0] = 0.,
324 .gravity[1] = 0.,
325 .gravity[2] = 0.,
326 .icorio = 0};
327
328 /* main fluid properties structure and associated pointer */
329
330 static cs_fluid_properties_t _fluid_properties = {
331 .ixyzp0 = -1,
332 .icp = -1,
333 .icv = -1,
334 .irovar = 0,
335 .ivivar = 0,
336 .ivsuth = 0,
337 .ro0 = 1.17862,
338 .viscl0 = 1.83337e-5,
339 .viscv0 = 0.,
340 .p0 = 1.01325e5,
341 .pred0 = 0.,
342 .xyzp0 = {-1.e30, -1.e30, -1.e30},
343 .t0 = 293.15,
344 .cp0 = 1017.24,
345 .cv0 = 0.,
346 .lambda0 = 1.,
347 .r_pg_cnst = 287.058, /* dry air pperfect gas constant J/mol/K */
348 .rvsra = 1.607768, /* Note: Rv = 461.52272377 J/mol/K */
349 .clatev = 2.501e6,
350 .xmasmr = 0.028966, /* air molar mass */
351 .ipthrm = 0,
352 .pther = 1.013e5,
353 .pthera = 0.,
354 .pthermax = -1.,
355 .sleak = 0.,
356 .kleak = 2.9,
357 .roref = 1.17862};
358
359 /*! (DOXYGEN_SHOULD_SKIP_THIS) \endcond */
360
361 /*============================================================================
362 * Global variables
363 *============================================================================*/
364
365 /*! Ideal gas constant (\f$J.mol^{-1}.K^{-1}\f$) */
366
367 const double cs_physical_constants_r = 8.31446261815324;
368
369 /*! Boltzmann constant (\f$J.K^{-1}\f$) */
370
371 const double cs_physical_constants_kb = 1.380649e-23;
372
373 /*! Conversion from Celsius to Kelvin: 275.15 */
374
375 const double cs_physical_constants_celsius_to_kelvin = 273.15;
376
377 /* !Stephan constant for the radiative module \f$\sigma\f$
378 in \f$W.m^{-2}.K^{-4}\f$ */
379
380 const double cs_physical_constants_stephan = 5.6703e-8;
381
382 const cs_physical_constants_t *cs_glob_physical_constants =
383 &_physical_constants;
384
385 const cs_fluid_properties_t *cs_glob_fluid_properties = &_fluid_properties;
386
387 /*! \cond DOXYGEN_SHOULD_SKIP_THIS */
388
389 /*============================================================================
390 * Prototypes for functions intended for use only by Fortran wrappers.
391 * (descriptions follow, with function bodies).
392 *============================================================================*/
393
394 void
395 cs_f_physical_constants_get_pointers(double **gx,
396 double **gy,
397 double **gz,
398 int **icorio);
399
400 void
401 cs_f_fluid_properties_get_pointers(int **ixyzp0,
402 int **icp,
403 int **icv,
404 int **irovar,
405 int **ivivar,
406 int **ivsuth,
407 double **ro0,
408 double **viscl0,
409 double **p0,
410 double **pred0,
411 double **xyzp0,
412 double **t0,
413 double **cp0,
414 double **cv0,
415 double **lambda0,
416 double **rair,
417 double **rvsra,
418 double **clatev,
419 double **xmasmr,
420 int **ipthrm,
421 double **pther,
422 double **pthera,
423 double **pthermax,
424 double **sleak,
425 double **kleak,
426 double **roref);
427
428 void
429 cs_f_fluid_properties_pp_get_pointers(double **viscv0);
430
431 /*============================================================================
432 * Private function definitions
433 *============================================================================*/
434
435 /*============================================================================
436 * Fortran wrapper function definitions
437 *============================================================================*/
438
439 /*----------------------------------------------------------------------------
440 * Get pointers to members of the global physical constants structure.
441 *
442 * This function is intended for use by Fortran wrappers, and
443 * enables mapping to Fortran global pointers.
444 *
445 * parameters:
446 * gx --> pointer to cs_glob_physical_constants->gravity[0]
447 * gy --> pointer to cs_glob_physical_constants->gravity[1]
448 * gz --> pointer to cs_glob_physical_constants->gravity[2]
449 * icorio --> pointer to cs_glob_physical_constants->icorio
450 *----------------------------------------------------------------------------*/
451
452 void
cs_f_physical_constants_get_pointers(double ** gx,double ** gy,double ** gz,int ** icorio)453 cs_f_physical_constants_get_pointers(double **gx,
454 double **gy,
455 double **gz,
456 int **icorio)
457 {
458 *gx = &(_physical_constants.gravity[0]);
459 *gy = &(_physical_constants.gravity[1]);
460 *gz = &(_physical_constants.gravity[2]);
461 *icorio = &(_physical_constants.icorio);
462 }
463
464 /*----------------------------------------------------------------------------
465 * Get pointers to members of the global fluid properties structure.
466 *
467 * This function is intended for use by Fortran wrappers, and
468 * enables mapping to Fortran global pointers.
469 *
470 * parameters:
471 * ixyzp0 --> pointer to cs_glob_fluid_properties->ixyzp0
472 * icp --> pointer to cs_glob_fluid_properties->icp
473 * icv --> pointer to cs_glob_fluid_properties->icv
474 * irovar --> pointer to cs_glob_fluid_properties->irovar
475 * ivivar --> pointer to cs_glob_fluid_properties->ivivar
476 * ivsuth --> pointer to cs_glob_fluid_properties->ivsuth
477 * ro0 --> pointer to cs_glob_fluid_properties->ro0
478 * viscl0 --> pointer to cs_glob_fluid_properties->viscl0
479 * p0 --> pointer to cs_glob_fluid_properties->p0
480 * pred0 --> pointer to cs_glob_fluid_properties->pred0
481 * xyzp0 --> pointer to cs_glob_fluid_properties->xyzp0
482 * t0 --> pointer to cs_glob_fluid_properties->t0
483 * cp0 --> pointer to cs_glob_fluid_properties->cp0
484 * cv0 --> pointer to cs_glob_fluid_properties->cv0
485 * lambda0 --> pointer to cs_glob_fluid_properties->lambda0
486 * rair --> pointer to cs_glob_fluid_properties->r_pg_cnst
487 * rvsra --> pointer to cs_glob_fluid_properties->rvsra
488 * clatev --> pointer to cs_glob_fluid_properties->clatev
489 * xmasmr --> pointer to cs_glob_fluid_properties->xmasmr
490 * ipthrm --> pointer to cs_glob_fluid_properties->ipthrm
491 * pther --> pointer to cs_glob_fluid_properties->pther
492 * pthera --> pointer to cs_glob_fluid_properties->pthera
493 * pthermax --> pointer to cs_glob_fluid_properties->pthermax
494 * sleak --> pointer to cs_glob_fluid_properties->sleak
495 * kleak --> pointer to cs_glob_fluid_properties->kleak
496 * roref --> pointer to cs_glob_fluid_properties->roref
497 *----------------------------------------------------------------------------*/
498
499 void
cs_f_fluid_properties_get_pointers(int ** ixyzp0,int ** icp,int ** icv,int ** irovar,int ** ivivar,int ** ivsuth,double ** ro0,double ** viscl0,double ** p0,double ** pred0,double ** xyzp0,double ** t0,double ** cp0,double ** cv0,double ** lambda0,double ** rair,double ** rvsra,double ** clatev,double ** xmasmr,int ** ipthrm,double ** pther,double ** pthera,double ** pthermax,double ** sleak,double ** kleak,double ** roref)500 cs_f_fluid_properties_get_pointers(int **ixyzp0,
501 int **icp,
502 int **icv,
503 int **irovar,
504 int **ivivar,
505 int **ivsuth,
506 double **ro0,
507 double **viscl0,
508 double **p0,
509 double **pred0,
510 double **xyzp0,
511 double **t0,
512 double **cp0,
513 double **cv0,
514 double **lambda0,
515 double **rair,
516 double **rvsra,
517 double **clatev,
518 double **xmasmr,
519 int **ipthrm,
520 double **pther,
521 double **pthera,
522 double **pthermax,
523 double **sleak,
524 double **kleak,
525 double **roref)
526 {
527 *ixyzp0 = &(_fluid_properties.ixyzp0);
528 *icp = &(_fluid_properties.icp);
529 *icv = &(_fluid_properties.icv);
530 *irovar = &(_fluid_properties.irovar);
531 *ivivar = &(_fluid_properties.ivivar);
532 *ivsuth = &(_fluid_properties.ivsuth);
533 *ro0 = &(_fluid_properties.ro0);
534 *viscl0 = &(_fluid_properties.viscl0);
535 *p0 = &(_fluid_properties.p0);
536 *pred0 = &(_fluid_properties.pred0);
537 *xyzp0 = (_fluid_properties.xyzp0);
538 *t0 = &(_fluid_properties.t0);
539 *cp0 = &(_fluid_properties.cp0);
540 *cv0 = &(_fluid_properties.cv0);
541 *lambda0 = &(_fluid_properties.lambda0);
542 *rair = &(_fluid_properties.r_pg_cnst);
543 *rvsra = &(_fluid_properties.rvsra);
544 *clatev = &(_fluid_properties.clatev);
545 *xmasmr = &(_fluid_properties.xmasmr);
546 *ipthrm = &(_fluid_properties.ipthrm);
547 *pther = &(_fluid_properties.pther);
548 *pthera = &(_fluid_properties.pthera);
549 *pthermax = &(_fluid_properties.pthermax);
550 *sleak = &(_fluid_properties.sleak);
551 *kleak = &(_fluid_properties.kleak);
552 *roref = &(_fluid_properties.roref);
553 }
554
555 /*----------------------------------------------------------------------------
556 * Get pointers to members of the global fluid properties structure.
557 *
558 * This function is intended for use by Fortran wrappers, and
559 * enables mapping to Fortran global pointers.
560 *
561 * parameters:
562 * visv0 --> pointer to cs_glob_fluid_properties->viscv0
563 *----------------------------------------------------------------------------*/
564
565 void
cs_f_fluid_properties_pp_get_pointers(double ** viscv0)566 cs_f_fluid_properties_pp_get_pointers(double **viscv0)
567 {
568 *viscv0 = &(_fluid_properties.viscv0);
569 }
570
571 /*! (DOXYGEN_SHOULD_SKIP_THIS) \endcond */
572
573 /*=============================================================================
574 * Public function definitions
575 *============================================================================*/
576
577 /*----------------------------------------------------------------------------
578 *!
579 * \brief Provide access to cs_glob_physical_constants
580 *
581 * needed to initialize structure with GUI
582 *----------------------------------------------------------------------------*/
583
584 cs_physical_constants_t *
cs_get_glob_physical_constants(void)585 cs_get_glob_physical_constants(void)
586 {
587 return &_physical_constants;
588 }
589
590 /*----------------------------------------------------------------------------
591 *!
592 * \brief Provide access to cs_glob_fluid_properties
593 *
594 * needed to initialize structure with GUI
595 *----------------------------------------------------------------------------*/
596
597 cs_fluid_properties_t *
cs_get_glob_fluid_properties(void)598 cs_get_glob_fluid_properties(void)
599 {
600 return &_fluid_properties;
601 }
602
603 /*----------------------------------------------------------------------------
604 *!
605 * \brief Print the physical constants structure to setup.log.
606 *
607 *----------------------------------------------------------------------------*/
608
609 void
cs_physical_constants_log_setup(void)610 cs_physical_constants_log_setup(void)
611 {
612
613 cs_log_printf
614 (CS_LOG_SETUP,
615 _("\n"
616 "Physical properties\n"
617 "-------------------\n\n"));
618
619 cs_log_printf
620 (CS_LOG_SETUP,
621 _(" gravity vector: [%g, %g, %g]\n"),
622 cs_glob_physical_constants->gravity[0],
623 cs_glob_physical_constants->gravity[1],
624 cs_glob_physical_constants->gravity[2]);
625
626 const char *icorio_value_str[]
627 = {N_(" 0 (ignore Coriolis source terms)"),
628 N_(" 1 (apply Coriolis source terms)")};
629
630 cs_log_printf(CS_LOG_SETUP,
631 _(" icorio: %s\n"),
632 _(icorio_value_str[cs_glob_physical_constants->icorio]));
633 }
634
635 /*----------------------------------------------------------------------------
636 *!
637 * \brief Print the fluid properties structure to setup.log.
638 *
639 *----------------------------------------------------------------------------*/
640
641 void
cs_fluid_properties_log_setup(void)642 cs_fluid_properties_log_setup(void)
643 {
644 cs_log_printf
645 (CS_LOG_SETUP,
646 _("\n"
647 " Continuous phase:\n"
648 " ro0: %14.5e (Reference density)\n"
649 " viscl0: %14.5e (Ref. molecular dyn. visc.)\n"
650 " cp0: %14.5e (Ref. specific heat)\n"
651 " icp: %4d (> 0: Variable Cp (cs_user_physical_properties))\n"
652 " p0: %14.5e (Ref. total pressure)\n"
653 " pred0: %14.5e (Ref. reduced pressure)\n"
654 " t0: %14.5e (Ref. temperature)\n\n"
655 " Initial reference point for pressure\n"
656 " xyzp0: %14.5e %14.5e %14.5e\n\n"),
657 cs_glob_fluid_properties->ro0,
658 cs_glob_fluid_properties->viscl0,
659 cs_glob_fluid_properties->cp0,
660 cs_glob_fluid_properties->icp,
661 cs_glob_fluid_properties->p0,
662 cs_glob_fluid_properties->pred0,
663 cs_glob_fluid_properties->t0,
664 cs_glob_fluid_properties->xyzp0[0],
665 cs_glob_fluid_properties->xyzp0[1],
666 cs_glob_fluid_properties->xyzp0[2]);
667
668 const char *irovar_value_str[] = {N_("0 (constant density)"),
669 N_("1 (variable density)")};
670 const char *ivivar_value_str[] = {N_("0 (constant molecular viscosity)"),
671 N_("1 (variable molecular viscosity)")};
672
673 cs_log_printf(CS_LOG_SETUP,
674 _(" irovar: %s\n"),
675 _(irovar_value_str[cs_glob_fluid_properties->irovar]));
676
677 cs_log_printf(CS_LOG_SETUP,
678 _(" ivivar: %s\n"),
679 _(ivivar_value_str[cs_glob_fluid_properties->ivivar]));
680 }
681
682 /*----------------------------------------------------------------------------*/
683
684 END_C_DECLS
685