1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
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.
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
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/>.
34 \*---------------------------------------------------------------------------*/
36 #ifndef reducedUnits_H
37 #define reducedUnits_H
40 #include "IOdictionary.H"
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 /*---------------------------------------------------------------------------*\
48 Class reducedUnits Declaration
49 \*---------------------------------------------------------------------------*/
79 scalar refMassDensity_;
81 scalar refNumberDensity_;
84 // Private Member Functions
88 //- Disallow default bitwise copy construct
89 reducedUnits(const reducedUnits&);
91 //- Disallow default bitwise assignment
92 void operator=(const reducedUnits&);
97 // Static data members
99 //- Static data someStaticData
100 static const scalar kb;
105 //- Construct with no argument, uses default values:
107 // mass = 1.660538782eâ27kg (unified atomic mass unit)
108 // temperature = 1K (therefore, energy = 1*kb)
111 //- Construct from components
119 //- Construct from dictionary
120 reducedUnits(const IOdictionary& reducedUnitsDict);
136 void setRefValues(const IOdictionary& reducedUnitsDict);
141 inline scalar refLength() const;
143 inline scalar refTime() const;
145 inline scalar refMass() const;
147 inline scalar refTemp() const;
149 inline scalar refEnergy() const;
151 inline scalar refForce() const;
153 inline scalar refVelocity() const;
155 inline scalar refVolume() const;
157 inline scalar refPressure() const;
159 inline scalar refMassDensity() const;
161 inline scalar refNumberDensity() const;
164 // IOstream Operators
166 friend Ostream& operator<<(Ostream&, const reducedUnits&);
170 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
172 } // End namespace Foam
174 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
176 #include "reducedUnitsI.H"
178 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
182 // ************************************************************************* //