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-2019 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 
31 #include "universalConstants.H"
33 #include "atomicConstants.H"
35 #include "standardConstants.H"
36 
37 #include "dimensionedConstants.H"
38 
39 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
40 
41 // Universal constants
42 
43 namespace Foam
44 {
45 namespace constant
46 {
47 
48 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49 
50 defineDimensionedConstant(universal, c, dimensionSet(0, 1, -1, 0, 0));
51 defineDimensionedConstant(universal, G, dimensionSet(-1, 3, -2, 0, 0));
52 defineDimensionedConstant(universal, h, dimensionSet(1, 2, -1, 0, 0));
53 
54 // Electromagnetic
56 (
57  electromagnetic,
58  e,
59  dimensionSet(0, 0, 1, 0, 0, 1, 0)
60 );
61 
62 // Atomic
63 defineDimensionedConstant(atomic, me, dimensionSet(1, 0, 0, 0, 0));
64 defineDimensionedConstant(atomic, mp, dimensionSet(1, 0, 0, 0, 0));
65 
66 // Physico-chemical
67 defineDimensionedConstant(physicoChemical, mu, dimensionSet(1, 0, 0, 0, 0));
68 
69 // Note: cannot use dimless etc since not guaranteed to be constructed
71 (
72  physicoChemical,
73  NA,
75  (
76  dimensionSet(0, 0, 0, 0, -1), // dimless/dimMoles,
77  6.0221417930e+23
78  )
79 );
80 
81 defineDimensionedConstant(physicoChemical, k, dimensionSet(1, 2, -2, -1, 0));
82 
83 // Standard
84 defineDimensionedConstant(standard, Pstd, dimensionSet(1, -1, -2, 0, 0));
85 defineDimensionedConstant(standard, Tstd, dimensionSet(0, 0, 0, 1, 0));
86 
87 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
88 
89 } // End namespace constant
90 } // End namespace Foam
91 
92 // ************************************************************************* //
const dimensionedScalar & me
Electron mass.
Dictionary reading and supplying the dimensioned constants used within OpenFOAM, particularly for the...
const dimensionedScalar & Tstd
Standard temperature.
const dimensionedScalar & mp
Proton mass.
label k
Boltzmann constant.
const dimensionedScalar & c
Speed of light in a vacuum.
Fundamental dimensioned constants.
defineDimensionedConstantWithDefault(atomic, alpha, dimensionedScalar(sqr(electromagnetic::e)/(dimensionedScalar("C", dimensionSet(0, 0, 0, 0, 0), 2.0) *electromagnetic::epsilon0 *universal::h *universal::c)))
const dimensionedScalar & NA
Avagadro number.
defineDimensionedConstant(universal, c, dimensionSet(0, 1, -1, 0, 0))
const dimensionedScalar & mu
Atomic mass unit.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
const dimensionedScalar & h
Planck constant.
const dimensionedScalar & Pstd
Standard pressure.
const doubleScalar e
Elementary charge.
Definition: doubleScalar.H:105
const dimensionedScalar & G
Newtonian constant of gravitation.
Namespace for OpenFOAM.