Constants.hpp
Go to the documentation of this file.
1// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2// vi: set et ts=4 sw=4 sts=4:
3/*
4 This file is part of the Open Porous Media project (OPM).
5
6 OPM is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 2 of the License, or
9 (at your option) any later version.
10
11 OPM is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with OPM. If not, see <http://www.gnu.org/licenses/>.
18
19 Consult the COPYING file in the top-level source directory of this
20 module for the precise wording of the license and the list of
21 copyright holders.
22*/
27#ifndef OPM_CONSTANTS_HPP
28#define OPM_CONSTANTS_HPP
29
30#include <cmath>
31
32namespace Opm
33{
34
39template<class Scalar>
41{ public:
45 static const Scalar R;
46
50 static const Scalar Na;
51
55 static const Scalar kb;
56
60 static const Scalar c;
61
65 static const Scalar G;
66
70 static const Scalar h;
71
75 static const Scalar hRed;
76};
77
78template<class Scalar>
79const Scalar Constants<Scalar>::R = 8.314472;
80template <class Scalar>
81const Scalar Constants<Scalar>::Na = 6.02214179e23;
82template <class Scalar>
83const Scalar Constants<Scalar>::kb = R/Na;
84template <class Scalar>
85const Scalar Constants<Scalar>::c = 299792458.0;
86template <class Scalar>
87const Scalar Constants<Scalar>::G = 6.67428e-11;
88template <class Scalar>
89const Scalar Constants<Scalar>::h = 6.62606896e-34;
90template <class Scalar>
91const Scalar Constants<Scalar>::hRed = h / (2 * M_PI);
92} // namespace Opm
93
94#endif
A central place for various physical constants occuring in some equations.
Definition: Constants.hpp:41
static const Scalar kb
The Boltzmann constant [J/K].
Definition: Constants.hpp:55
static const Scalar hRed
Reduced Planck constant [J s].
Definition: Constants.hpp:75
static const Scalar h
Planck constant [J s].
Definition: Constants.hpp:70
static const Scalar R
The ideal gas constant [J/(mol K)].
Definition: Constants.hpp:45
static const Scalar Na
The Avogadro constant [1/mol].
Definition: Constants.hpp:50
static const Scalar c
Speed of light in vacuum [m/s].
Definition: Constants.hpp:60
static const Scalar G
Newtonian constant of gravitation [m^3/(kg s^2)].
Definition: Constants.hpp:65
Definition: Air_Mesitylene.hpp:34