Home
Downloads
Documentation
Installation
User Guide
man-pages
API Documentation
README
Release Notes
Changes
License
Support
SourceForge Project
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
src
lagrangian
molecularDynamics
molecule
reducedUnits
reducedUnits.H
Go to the documentation of this file.
1
/*---------------------------------------------------------------------------*\
2
========= |
3
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4
\\ / O peration |
5
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
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
Class
25
Foam::reducedUnits
26
27
Description
28
29
SourceFiles
30
reducedUnitsI.H
31
reducedUnits.C
32
reducedUnitsIO.C
33
34
\*---------------------------------------------------------------------------*/
35
36
#ifndef reducedUnits_H
37
#define reducedUnits_H
38
39
#include <
OpenFOAM/scalar.H
>
40
#include <
OpenFOAM/IOdictionary.H
>
41
42
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43
44
namespace
Foam
45
{
46
47
/*---------------------------------------------------------------------------*\
48
Class reducedUnits Declaration
49
\*---------------------------------------------------------------------------*/
50
51
class
reducedUnits
52
{
53
// Private data
54
55
// Reduced units
56
57
// Fundamental values
58
59
scalar refLength_;
60
61
scalar refTime_;
62
63
scalar refMass_;
64
65
// Derived values
66
67
scalar refEnergy_;
68
69
scalar refTemp_;
70
71
scalar refForce_;
72
73
scalar refVelocity_;
74
75
scalar refVolume_;
76
77
scalar refPressure_;
78
79
scalar refMassDensity_;
80
81
scalar refNumberDensity_;
82
83
84
// Private Member Functions
85
86
void
calcRefValues();
87
88
//- Disallow default bitwise copy construct
89
reducedUnits
(
const
reducedUnits
&);
90
91
//- Disallow default bitwise assignment
92
void
operator=(
const
reducedUnits
&);
93
94
95
public
:
96
97
// Static data members
98
99
//- Static data someStaticData
100
static
const
scalar
kb
;
101
102
103
// Constructors
104
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
();
110
111
//- Construct from components
112
reducedUnits
113
(
114
scalar
refLength
,
115
scalar
refTime
,
116
scalar
refMass
117
);
118
119
//- Construct from dictionary
120
reducedUnits
(
const
IOdictionary
& reducedUnitsDict);
121
122
123
// Destructor
124
125
~reducedUnits
();
126
127
128
// Member Functions
129
130
void
setRefValues
131
(
132
scalar
refLength
,
133
scalar
refTime
,
134
scalar
refMass
135
);
136
137
void
setRefValues
(
const
IOdictionary
& reducedUnitsDict);
138
139
140
// Access
141
142
inline
scalar
refLength
()
const
;
143
144
inline
scalar
refTime
()
const
;
145
146
inline
scalar
refMass
()
const
;
147
148
inline
scalar
refTemp
()
const
;
149
150
inline
scalar
refEnergy
()
const
;
151
152
inline
scalar
refForce
()
const
;
153
154
inline
scalar
refVelocity
()
const
;
155
156
inline
scalar
refVolume
()
const
;
157
158
inline
scalar
refPressure
()
const
;
159
160
inline
scalar
refMassDensity
()
const
;
161
162
inline
scalar
refNumberDensity
()
const
;
163
164
165
// IOstream Operators
166
167
friend
Ostream
&
operator<<
(
Ostream
&,
const
reducedUnits
&);
168
};
169
170
171
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
172
173
}
// End namespace Foam
174
175
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
176
177
#include <
molecule/reducedUnitsI.H
>
178
179
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
180
181
#endif
182
183
// ************************ vim: set sw=4 sts=4 et: ************************ //