momentumParcelInjectionData.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-2020 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 Class
25  Foam::momentumParcelInjectionData
26 
27 Description
28  Container class to provide injection data for momentum parcels
29 
30 SourceFiles
31  momentumParcelInjectionData.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef momentumParcelInjectionData_H
36 #define momentumParcelInjectionData_H
37 
38 #include "dictionary.H"
39 #include "vector.H"
40 #include "point.H"
41 
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 
44 namespace Foam
45 {
46 
47 // Forward declaration of classes
48 class momentumParcelInjectionData;
49 
50 // Forward declaration of friend functions
51 
52 Ostream& operator<<
53 (
54  Ostream&,
55  const momentumParcelInjectionData&
56 );
57 
58 Istream& operator>>
59 (
60  Istream&,
61  momentumParcelInjectionData&
62 );
63 
64 /*---------------------------------------------------------------------------*\
65  Class momentumParcelInjectionData Declaration
66 \*---------------------------------------------------------------------------*/
67 
69 {
70 protected:
71 
72  // Parcel properties
73 
74  //- Position [m]
75  point x_;
76 
77  //- Velocity [m/s]
78  vector U_;
79 
80  //- Diameter [m]
81  scalar d_;
82 
83  //- Density [kg/m^3]
84  scalar rho_;
85 
86  //- Mass flow rate [kg/s]
87  scalar mDot_;
88 
89 
90 public:
91 
92  //- Runtime type information
93  TypeName("momentumParcelInjectionData");
94 
95  // Constructors
96 
97  //- Null constructor
99 
100  //- Construct from dictionary
102 
103  //- Construct from Istream
105 
106 
107  //-Destructor
109 
110 
111  // Access
112 
113  //- Return const access to the position
114  inline const point& x() const;
115 
116  //- Return const access to the velocity
117  inline const vector& U() const;
118 
119  //- Return const access to the diameter
120  inline scalar d() const;
121 
122  //- Return const access to the density
123  inline scalar rho() const;
124 
125  //- Return const access to the mass flow rate
126  inline scalar mDot() const;
127 
128 
129  // Edit
130 
131  //- Return access to the position
132  inline point& x();
133 
134  //- Return access to the velocity
135  inline vector& U();
136 
137  //- Return access to the diameter
138  inline scalar& d();
139 
140  //- Return access to the density
141  inline scalar& rho();
142 
143  //- Return access to the mass flow rate
144  inline scalar& mDot();
145 
146 
147  // Friend Operators
148 
149  friend bool operator==
150  (
153  )
154  {
156 
157  return false;
158  }
159 
160  friend bool operator!=
161  (
164  )
165  {
167 
168  return false;
169  }
170 
171 
172  // I-O
173 
174  //- Ostream operator
175  friend Ostream& operator<<
176  (
177  Ostream& os,
179  );
180 
181  //- Istream operator
182  friend Istream& operator>>
183  (
184  Istream& is,
186  );
187 };
188 
189 
190 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
191 
192 } // End namespace Foam
193 
194 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
195 
197 
198 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
199 
200 #endif
201 
202 // ************************************************************************* //
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Definition: Istream.H:60
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:57
Database for solution and other reduced data.
Definition: data.H:54
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:160
Container class to provide injection data for momentum parcels.
const point & x() const
Return const access to the position.
const vector & U() const
Return const access to the velocity.
scalar d() const
Return const access to the diameter.
scalar rho() const
Return const access to the density.
TypeName("momentumParcelInjectionData")
Runtime type information.
scalar mDot() const
Return const access to the mass flow rate.
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
Definition: error.H:353
volScalarField & b
Definition: createFields.H:27
Namespace for OpenFOAM.
dictionary dict