fundamentalConstants.C
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Description
25  Fundamental dimensioned constants
26 
27 \*---------------------------------------------------------------------------*/
28 
29 #include "fundamentalConstants.H"
30 #include "universalConstants.H"
32 #include "atomicConstants.H"
34 #include "standardConstants.H"
35 #include "dimensionedConstants.H"
36 
37 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
38 
39 // Universal constants
40 
41 namespace Foam
42 {
43 namespace constant
44 {
45 
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 
48 // Note: cannot use dimless etc. as they may not have been constructed yet
49 
50 
52 (
53  dimensionedConstant(universal::group, "c", dimensionSet(0, 1, -1, 0, 0))
54 );
55 
57 (
58  dimensionedConstant(universal::group, "G", dimensionSet(-1, 3, -2, 0, 0))
59 );
60 
62 (
63  dimensionedConstant(universal::group, "h", dimensionSet(1, 2, -1, 0, 0))
64 );
65 
66 
67 // Electromagnetic
68 
70 (
72  (
74  "e",
75  dimensionSet(0, 0, 1, 0, 0, 1, 0)
76  )
77 );
78 
79 
80 // Atomic
81 
83 (
84  dimensionedConstant(atomic::group, "me", dimensionSet(1, 0, 0, 0, 0))
85 );
86 
88 (
89  dimensionedConstant(atomic::group, "mp", dimensionSet(1, 0, 0, 0, 0))
90 );
91 
92 
93 // Physico-chemical
94 
96 (
98  (
100  "mu",
101  dimensionSet(1, 0, 0, 0, 0)
102  )
103 );
104 
106 (
108  (
110  "NA",
112  (
113  dimensionSet(0, 0, 0, 0, -1), // dimless/dimMoles,
114  6.0221417930e+23
115  )
116  )
117 );
118 
120 (
122  (
124  "k",
125  dimensionSet(1, 2, -2, -1, 0)
126  )
127 );
128 
129 
130 // Standard
131 
133 (
134  dimensionedConstant(standard::group, "Pstd", dimensionSet(1, -1, -2, 0, 0))
135 );
136 
138 (
139  dimensionedConstant(standard::group, "Tstd", dimensionSet(0, 0, 0, 1, 0))
140 );
141 
142 
143 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
144 
145 } // End namespace constant
146 } // End namespace Foam
147 
148 // ************************************************************************* //
Dictionary reading and supplying the dimensioned constants used within OpenFOAM, particularly for the...
Fundamental dimensioned constants.
const dimensionedScalar mp
Proton mass.
const dimensionedScalar me
Electron mass.
const char *const group
Group name for atomic constants.
const dimensionedScalar e
Elementary charge.
const char *const group
Group name for electromagnetic constants.
const dimensionedScalar k
Boltzmann constant.
const dimensionedScalar mu
Atomic mass unit.
const char *const group
Group name for physico-chemical constants.
const dimensionedScalar NA
Avagadro number.
const dimensionedScalar Pstd
Standard pressure.
const dimensionedScalar Tstd
Standard temperature.
const char *const group
Group name for standard constants.
const dimensionedScalar G
Newtonian constant of gravitation.
const dimensionedScalar c
Speed of light in a vacuum.
const char *const group
Group name for universal constants.
const dimensionedScalar h
Planck constant.
Namespace for OpenFOAM.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
dimensionedScalar dimensionedConstant(const char *const group, const char *name, const dimensionSet &dimensions)