dimensionedConstants.H
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-2025 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 Global
25  dimensionedConstants
26 
27 Description
28  Dictionary reading and supplying the dimensioned constants used within
29  OpenFOAM, particularly for thermodynamics.
30 
31  The values are read from the OpenFOAM etc/controlDict and should be
32  changed to run with a different set of units from the default SI units.
33 
34 SourceFiles
35  dimensionedConstants.C
36 
37 \*---------------------------------------------------------------------------*/
38 
39 #ifndef dimensionedConstants_H
40 #define dimensionedConstants_H
41 
42 #include "dimensionedScalar.H"
43 
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 
46 namespace Foam
47 {
48 
49 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
50 
51 //- Construct and return a constant by looking up from the DimensionedConstants
52 // sub-dictionary of controlDict
54 (
55  const char* const group,
56  const char* name,
57  const dimensionSet& dimensions
58 );
59 
60 //- Construct a dimensioned constant with a given value and insert into the
61 // DimensionedConstants sub-dictionary of controlDict
63 (
64  const char* const group,
65  const char* name,
66  const dimensionedScalar& value
67 );
68 
69 //- Construct a dimensioned constant with a given value and insert into the
70 // DimensionedConstants sub-dictionary of controlDict with a different name
72 (
73  const char* const group,
74  const char* entryName,
75  const char* codeName,
76  const dimensionedScalar& value
77 );
78 
79 //- Construct a dimensioned constant with given units and value and insert into
80 // the DimensionedConstants sub-dictionary of controlDict
82 (
83  const char* const group,
84  const char* name,
85  const unitConversion& units,
86  const scalar value
87 );
88 
89 //- Construct a dimensioned constant with given units and value and insert into
90 // the DimensionedConstants sub-dictionary of controlDict with a different name
92 (
93  const char* const group,
94  const char* entryName,
95  const char* codeName,
96  const unitConversion& units,
97  const scalar value
98 );
99 
100 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
101 
102 } // End namespace Foam
103 
104 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
105 
106 #endif
107 
108 // ************************************************************************* //
const char *const group
Group name for atomic constants.
Namespace for OpenFOAM.
const HashTable< dimensionSet > & dimensions()
Get the table of dimension sets.
Definition: dimensionSets.C:96
const HashTable< unitConversion > & units()
Get the table of unit conversions.
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.
dimensionedScalar dimensionedConstant(const char *const group, const char *name, const dimensionSet &dimensions)
Construct and return a constant by looking up from the DimensionedConstants.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.