MAST
gas_property.h
Go to the documentation of this file.
1 /*
2  * MAST: Multidisciplinary-design Adaptation and Sensitivity Toolkit
3  * Copyright (C) 2013-2019 Manav Bhatia
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18  */
19 
20 #ifndef mast_gas_property_h
21 #define mast_gas_property_h
22 
23 
24 // MAST includes
25 #include "base/mast_data_types.h"
26 
27 
28 namespace MAST {
29 
30 
32  {
33  public:
35  rho(0.),
36  T(0.),
37  pressure(0.),
38  gamma(0.),
39  cp(0.),
40  cv(0.),
41  R(0.),
42  a(0.),
43  if_viscous(false),
44  Pr(0.),
45  k_thermal(0.),
46  mu(0.),
47  lambda(0.)
48  {}
49 
50 
51  void zero()
52  {
53  rho = 0.;
54  T = 0.;
55  pressure = 0.;
56  gamma = 0.;
57  cp = 0.;
58  cv = 0.;
59  R = 0.;
60  a = 0.;
61  Pr = 0.;
62  k_thermal = 0.;
63  mu = 0.;
64  lambda = 0.;
65  }
66 
67 
72 
74 
79 
83  void init();
84 
85  };
86 
87 
88 
89  inline void
91  {
92  // the following data should have been set
93  libmesh_assert(rho > 0.);
94  libmesh_assert(T > 0.);
95  libmesh_assert(cp > 0.);
96  libmesh_assert(cv > 0.);
97 
98  R = cp-cv;
99  gamma = cp/cv;
100  pressure = rho*R*T;
101  a = sqrt(gamma*R*T);
102  }
103 
104 }
105 
106 #endif
void init()
initializes the data
Definition: gas_property.h:90
libMesh::Real Real
Real Pr
Properties for viscous analysis.
Definition: gas_property.h:78
Real rho
Property values for ideal gas.
Definition: gas_property.h:71