ENH: autoLayerDriver: better layering information message
[OpenFOAM-2.0.x.git] / src / lagrangian / molecularDynamics / molecule / reducedUnits / reducedUnits.H
blob632e5d37adc12f0dd9ea10d0bf8e1fca3e520129
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
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
19     for more details.
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/>.
24 Class
25     Foam::reducedUnits
27 Description
29 SourceFiles
30     reducedUnitsI.H
31     reducedUnits.C
32     reducedUnitsIO.C
34 \*---------------------------------------------------------------------------*/
36 #ifndef reducedUnits_H
37 #define reducedUnits_H
39 #include "scalar.H"
40 #include "IOdictionary.H"
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 namespace Foam
47 /*---------------------------------------------------------------------------*\
48                          Class reducedUnits Declaration
49 \*---------------------------------------------------------------------------*/
51 class reducedUnits
53     // Private data
55         // Reduced units
57             // Fundamental values
59                 scalar refLength_;
61                 scalar refTime_;
63                 scalar refMass_;
65             // Derived values
67                 scalar refEnergy_;
69                 scalar refTemp_;
71                 scalar refForce_;
73                 scalar refVelocity_;
75                 scalar refVolume_;
77                 scalar refPressure_;
79                scalar refMassDensity_;
81                 scalar refNumberDensity_;
84     // Private Member Functions
86         void calcRefValues();
88         //- Disallow default bitwise copy construct
89         reducedUnits(const reducedUnits&);
91         //- Disallow default bitwise assignment
92         void operator=(const reducedUnits&);
95 public:
97     // Static data members
99         //- Static data someStaticData
100         static const scalar kb;
103     // Constructors
105         //- Construct with no argument, uses default values:
106         // length  = 1nm
107         // mass = 1.660538782e−27kg (unified atomic mass unit)
108         // temperature = 1K (therefore, energy = 1*kb)
109         reducedUnits();
111         //- Construct from components
112         reducedUnits
113         (
114             scalar refLength,
115             scalar refTime,
116             scalar refMass
117         );
119         //- Construct from dictionary
120         reducedUnits(const IOdictionary& reducedUnitsDict);
123     //- Destructor
124     ~reducedUnits();
127     // Member Functions
129         void setRefValues
130         (
131             scalar refLength,
132             scalar refTime,
133             scalar refMass
134         );
136         void setRefValues(const IOdictionary& reducedUnitsDict);
139         // Access
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 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
180 #endif
182 // ************************************************************************* //