programmer's documentation
cs_physical_constants.h
Go to the documentation of this file.
1 #ifndef __CS_PHYSICAL_CONSTANTS_H__
2 #define __CS_PHYSICAL_CONSTANTS_H__
3 
4 /*============================================================================
5  * Base physical constants data.
6  *============================================================================*/
7 
8 /*
9  This file is part of Code_Saturne, a general-purpose CFD tool.
10 
11  Copyright (C) 1998-2015 EDF S.A.
12 
13  This program is free software; you can redistribute it and/or modify it under
14  the terms of the GNU General Public License as published by the Free Software
15  Foundation; either version 2 of the License, or (at your option) any later
16  version.
17 
18  This program is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
20  FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
21  details.
22 
23  You should have received a copy of the GNU General Public License along with
24  this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
25  Street, Fifth Floor, Boston, MA 02110-1301, USA.
26 */
27 
28 /*----------------------------------------------------------------------------*/
29 
30 /*----------------------------------------------------------------------------
31  * Local headers
32  *----------------------------------------------------------------------------*/
33 
34 #include "cs_defs.h"
35 
36 /*----------------------------------------------------------------------------*/
37 
39 
40 /*=============================================================================
41  * Macro definitions
42  *============================================================================*/
43 
44 /*============================================================================
45  * Type definitions
46  *============================================================================*/
47 
48 /* physical constants descriptor */
49 /*-------------------------------*/
50 
51 typedef struct {
52 
53  double r; /* perfect gas constant in J/mol/K */
54  double gx, gy, gz; /* gravity components */
55  int icorio; /* Coriolis source terms indicator */
56 
58 
59 /* fluid properties descriptor */
60 /*-----------------------------*/
61 
62 typedef struct {
63 
64  int ixyzp0; /* indicator for filling of reference point for
65  total pressure */
66  int ieos; /* indicator of equation of state for the
67  compressible module */
68  int icp; /* property index of the isobaric specific heat */
69  int icv; /* property index of the isochoric specific
70  heat */
71  int irovar; /* variable density field */
72  int ivivar; /* variable viscosity field */
73  int ivsuth; /* Sutherland law for laminar viscosity and
74  thermal conductivity in gas mix spec. phys. */
75  double ro0; /* reference density */
76  double viscl0; /* reference molecular dynamic viscosity */
77  double p0; /* reference pressure for the total pressure */
78  double pred0; /* reference value for the reduced pressure */
79  double xyzp0[3]; /* reference point coordinates for the total
80  pressure */
81  double t0; /* reference temperature */
82  double cp0; /* reference specific heat */
83  double cv0; /* reference specific heat */
84  double xmasmr; /* molar mass of the perfect gas in kg/mol
85  (if ieos=1) */
86  double psginf; /* stiffened gas (ieos=2) limit pressure (zero in
87  perfect gas) (Pa) */
88  double gammasg; /* stiffened gas (ieos=2) polytropic coefficient,
89  (dimensionless) */
90  double pther; /* uniform thermodynamic pressure for the low-Mach
91  algorithm */
92  double pthera; /* thermodynamic pressure for the previous time
93  step */
94  double pthermax; /* thermodynamic maximum pressure for user
95  clipping, used to model a venting effect */
96 
98 
99 /*============================================================================
100  * Static global variables
101  *============================================================================*/
102 
103 /* Pointer to main physical constants structure */
104 
106 
107 /* Pointer to main fluid properties structure */
108 
110 
111 /*=============================================================================
112  * Public function prototypes
113  *============================================================================*/
114 
115 /*----------------------------------------------------------------------------
116  * Provide acces to cs_glob_physical_constants
117  *
118  * needed to initialize structure with GUI
119  *----------------------------------------------------------------------------*/
120 
123 
124 /*----------------------------------------------------------------------------
125  * Provide acces to cs_glob_fluid_properties
126  *
127  * needed to initialize structure with GUI
128  *----------------------------------------------------------------------------*/
129 
132 
133 /*----------------------------------------------------------------------------*/
134 
136 
137 #endif /* __CS_PHYSICAL_CONSTANTS_H__ */
real(c_double), pointer, save gy
Definition: cstphy.f90:68
Fluid properties descriptor.
Definition: cs_physical_constants.h:62
int ixyzp0
Definition: cs_physical_constants.h:64
double cp0
Definition: cs_physical_constants.h:82
cs_fluid_properties_t * cs_get_glob_fluid_properties(void)
Definition: cs_physical_constants.c:488
real(c_double), dimension(:), pointer, save xyzp0
coordinates of the reference point for the total pressure.
Definition: cstphy.f90:184
#define BEGIN_C_DECLS
Definition: cs_defs.h:429
int ieos
Definition: cs_physical_constants.h:66
double xmasmr
Definition: cs_physical_constants.h:84
const cs_physical_constants_t * cs_glob_physical_constants
Definition: cs_physical_constants.c:308
cs_physical_constants_t * cs_get_glob_physical_constants(void)
Definition: cs_physical_constants.c:475
double t0
Definition: cs_physical_constants.h:81
double r
Definition: cs_physical_constants.h:53
double pthermax
Definition: cs_physical_constants.h:94
int icv
Definition: cs_physical_constants.h:69
const cs_fluid_properties_t * cs_glob_fluid_properties
Definition: cs_physical_constants.c:310
int irovar
Definition: cs_physical_constants.h:71
int icorio
Definition: cs_physical_constants.h:55
double pther
Definition: cs_physical_constants.h:90
double psginf
Definition: cs_physical_constants.h:86
real(c_double), pointer, save gx
Gravity.
Definition: cstphy.f90:68
double viscl0
Definition: cs_physical_constants.h:76
int icp
Definition: cs_physical_constants.h:68
double cv0
Definition: cs_physical_constants.h:83
#define END_C_DECLS
Definition: cs_defs.h:430
double pthera
Definition: cs_physical_constants.h:92
double p0
Definition: cs_physical_constants.h:77
Physical constants descriptor.
Definition: cs_physical_constants.h:51
double gz
Definition: cs_physical_constants.h:54
double gammasg
Definition: cs_physical_constants.h:88
int ivsuth
Definition: cs_physical_constants.h:73
int ivivar
Definition: cs_physical_constants.h:72
double pred0
Definition: cs_physical_constants.h:78
double ro0
Definition: cs_physical_constants.h:75