My Project
Loading...
Searching...
No Matches
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#if HAVE_QUAD
33#endif
34
35namespace Opm
36{
37
38template<class Scalar>
40{
41public:
45 static constexpr Scalar R = static_cast<Scalar>(8.314472);
46
50 static constexpr Scalar Na = static_cast<Scalar>(6.02214179e23);
51
55 static constexpr Scalar kb = R/Na;
56
60 static constexpr Scalar c = static_cast<Scalar>(299792458.0);
61
65 static constexpr Scalar G = static_cast<Scalar>(6.67428e-11);
66
70 static constexpr Scalar h = static_cast<Scalar>(6.62606896e-34);
71
75 static constexpr Scalar hRed = h / (2 * M_PI);
76};
77
78} // namespace Opm
79
80#endif
Definition Constants.hpp:40
static constexpr Scalar hRed
Reduced Planck constant [J s].
Definition Constants.hpp:75
static constexpr Scalar c
Speed of light in vacuum [m/s].
Definition Constants.hpp:60
static constexpr Scalar h
Planck constant [J s].
Definition Constants.hpp:70
static constexpr Scalar kb
The Boltzmann constant [J/K].
Definition Constants.hpp:55
static constexpr Scalar Na
The Avogadro constant [1/mol].
Definition Constants.hpp:50
static constexpr Scalar G
Newtonian constant of gravitation [m^3/(kg s^2)].
Definition Constants.hpp:65
static constexpr Scalar R
The ideal gas constant [J/(mol K)].
Definition Constants.hpp:45
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition Exceptions.hpp:30
This file provides the infrastructure to use quad-precision floating point values in the numerical mo...