antioch-0.4.0
physical_constants.h
Go to the documentation of this file.
1 //-----------------------------------------------------------------------bl-
2 //--------------------------------------------------------------------------
3 //
4 // Antioch - A Gas Dynamics Thermochemistry Library
5 //
6 // Copyright (C) 2014-2016 Paul T. Bauman, Benjamin S. Kirk,
7 // Sylvain Plessis, Roy H. Stonger
8 //
9 // Copyright (C) 2013 The PECOS Development Team
10 //
11 // This library is free software; you can redistribute it and/or
12 // modify it under the terms of the Version 2.1 GNU Lesser General
13 // Public License as published by the Free Software Foundation.
14 //
15 // This library is distributed in the hope that it will be useful,
16 // but WITHOUT ANY WARRANTY; without even the implied warranty of
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 // Lesser General Public License for more details.
19 //
20 // You should have received a copy of the GNU Lesser General Public
21 // License along with this library; if not, write to the Free Software
22 // Foundation, Inc. 51 Franklin Street, Fifth Floor,
23 // Boston, MA 02110-1301 USA
24 //
25 //-----------------------------------------------------------------------el-
26 
27 #ifndef ANTIOCH_PHYSICAL_CONSTANTS_H
28 #define ANTIOCH_PHYSICAL_CONSTANTS_H
29 
30 //Antioch
31 #include "antioch/units.h"
32 
33 namespace Antioch
34 {
35  namespace Constants
36  {
40  template<typename CoeffType>
41  inline
42  CoeffType R_universal()
43  {
44  return 8.3144621L;
45  }
46 
50  template<typename CoeffType>
51  inline
52  CoeffType Avogadro()
53  {
54  return 6.02214129e23L;
55  }
56 
60  template<typename CoeffType>
61  inline
63  {
64  return Units<CoeffType>("J/mol/K");
65  }
66 
70  template<typename CoeffType>
71  inline
73  {
74  return Units<CoeffType>("mol-1");
75  }
76 
77  /*
78  * Planck's constant, m2.kg/s (J.s)
79  */
80  template<typename CoeffType>
81  inline
82  CoeffType Planck_constant()
83  {
84  return 6.62606957e-34;
85  }
86 
90  template<typename CoeffType>
91  inline
93  {
94  return Units<CoeffType>("m2.kg/s");
95  }
96 
100  template<typename CoeffType>
101  inline
102  CoeffType light_celerity()
103  {
104  return 2.99792458e8;
105  }
106 
110  template<typename CoeffType>
111  inline
113  {
114  return Units<CoeffType>("m/s");
115  }
116 
122  template<typename CoeffType>
123  inline
124  CoeffType Boltzmann_constant()
125  {
126  return 1.3806488e-23;
127  }
128 
132  template<typename CoeffType>
133  inline
135  {
136  return Units<CoeffType>("J/K");
137  }
138 
143  template<typename CoeffType>
144  inline
146  {
147  return 4.L * pi<CoeffType>() * 1e-7;
148  }
149 
153  template<typename CoeffType>
154  inline
156  {
157  return Units<CoeffType>("m.kg.s2.A2");
158  }
159 
164  template<typename CoeffType>
165  inline
167  {
168  return 1.L/ (vacuum_permeability<CoeffType>() * light_celerity<CoeffType>()
169  * light_celerity<CoeffType>());
170  }
171 
175  template<typename CoeffType>
176  inline
178  {
179  return Units<CoeffType>("A2.s4/kg/m3");
180  }
181 
182  } // end namespace Constants
183 } // end namespace Antioch
184 
185 #endif //ANTIOCH_PHYSICAL_CONSTANTS_H
Units< CoeffType > vacuum_permittivity_unit()
vacuum permeability unit
CoeffType R_universal()
Universal Gas Constant, R, expressed in J/(mol-K)
Units< CoeffType > Planck_constant_unit()
Planck's constant unit.
CoeffType vacuum_permittivity()
vacuum permittivity 1/(vacuum_permeability * light_celerity^2) A2.s4/kg/m3
Units< CoeffType > Avogadro_unit()
Avogadro's number unit.
CoeffType Avogadro()
Avogadro's number, particles per mole.
CoeffType Boltzmann_constant()
Boltzmann constant 1.380 6488 x 10-23 J/K (http://physics.nist.gov/cgi-bin/cuu/Value?k)
Units< CoeffType > vacuum_permeability_unit()
vacuum permeability
Units< CoeffType > Boltzmann_constant_unit()
Boltzmann constant unit.
CoeffType light_celerity()
light celerity, m/s
CoeffType Planck_constant()
Units< CoeffType > R_universal_unit()
Universal Gas Constant unit.
Advanced unit class.
CoeffType vacuum_permeability()
vacuum permeability 4 * pi * 10-7 m.kg.s2.A2
Units< CoeffType > light_celerity_unit()
light celerity unit
The parameters are reduced parameters.
An advanced unit class.
Definition: units.h:111

Generated on Thu Jul 7 2016 11:09:46 for antioch-0.4.0 by  doxygen 1.8.8