1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright held by original author
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 the
13 Free Software Foundation; either version 2 of the License, or (at your
14 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, write to the Free Software Foundation,
23 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
31 \*---------------------------------------------------------------------------*/
37 #include "contiguous.H"
39 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 /*---------------------------------------------------------------------------*\
47 Class parcel Declaration
48 \*---------------------------------------------------------------------------*/
52 public Particle<parcel>
54 // Private member data
56 // Reference to the names of the liquid components
57 List<word> liquidComponents_;
59 // Defining data (read and written to field files)
61 //- Diameter of droplets in parcel
64 //- Temperature of droplets in parcel
70 //- Spherical deviation of droplets in parcel
73 //- Rate of change of spherical deviation of droplets in parcel
76 //- Characteristic time of droplets in parcel
79 //- Stripped mass of droplets in parcel
82 //- Time spent in turbulent eddy
85 //- Part of liquid core (1-fully liquid, 0-droplet)
88 //- injected from injector
89 // Should really be a label, but is scalar due to
90 // post-processing reasons
93 //- Velocity of parcel
96 //- Turbulent velocity fluctuation
99 //- Normal n_ and axis describe the 2D plane
100 // in which the particle moves
103 //- Liquid components molar fractions
106 // Derived state information (not read or written)
108 //- Momentum relaxation time of droplets in parcel
112 // Private member functions
114 //- Set the relaxation times
115 void setRelaxationTimes
119 scalarField& tauEvaporation,
120 scalar& tauHeatTransfer,
121 scalarField& tauBoiling,
122 const spray& sprayDatabase,
125 const scalar temperature,
126 const scalar pressure,
127 const scalarField& Yf,
128 const scalarField& m0,
133 void updateParcelProperties
144 friend class Cloud<parcel>;
149 //- Construct from components
152 const Cloud<parcel>& cloud,
153 const vector& position,
164 const scalar liquidCore,
165 const scalar injector,
168 const scalarField& X,
169 const List<word>& liquidNames
172 //- Construct from Istream reading field values if required
175 const Cloud<parcel>& cloud,
177 bool readFields = true
185 //- Return the names of the liquid components
186 inline const List<word>& liquidNames() const;
188 //- Return the names of the liquid fuel components - identical with liquidNames
189 inline const List<word>& fuelNames() const;
191 //- Return diameter of droplets in parcel
192 inline scalar d() const;
194 //- Return diameter of droplets in parcel
197 //- Return temperature of droplets in parcel
198 inline scalar T() const;
200 //- Return temperature of droplets in parcel
203 //- Return total parcel mass
204 inline scalar m() const;
206 //- Return total parcel mass
209 //- Return spherical deviation of droplets in parcel
210 inline scalar dev() const;
212 //- Return spherical deviation of droplets in parcel
213 inline scalar& dev();
215 //- Return rate of change of spherical deviation of
216 // droplets in parcel
217 inline scalar ddev() const;
219 //- Return rate of change of spherical deviation of
220 // droplets in parcel
221 inline scalar& ddev();
223 //- Return characteristic time of droplets in parcel
224 inline scalar ct() const;
226 //- Return characteristic time of droplets in parcel
229 //- Return stripped mass of droplets in parcel
232 //- Return stripped mass of droplets in parcel
233 inline scalar ms() const;
235 //- Return time spent in turbulent eddy
236 inline scalar& tTurb();
238 //- Return time spent in turbulent eddy
239 inline scalar tTurb() const;
241 //- Return part of liquid liquidCore
242 inline scalar& liquidCore();
244 //- Return part of liquid liquidCore
245 inline scalar liquidCore() const;
247 //- Return the injector from which is injected
248 inline scalar& injector();
250 //- Return the injector from which is injected
251 inline scalar injector() const;
253 //- Return velocity of parcel
254 inline const vector& U() const;
256 //- Return velocity of parcel
259 //- Return turbulent velocity fluctuation
260 inline const vector& Uturb() const;
262 //- Return turbulent velocity fluctuation
263 inline vector& Uturb();
265 //- Return the normal used for 2D purposes
266 inline const vector& n() const;
268 //- Return the normal used for 2D purposes
271 //- Return the liquid components molar fractions
272 inline const scalarField& X() const;
274 //- Return the liquid components molar fractions
275 inline scalarField& X();
277 //- Return the momentum relaxation time of droplets in parcel
278 inline scalar& tMom();
280 //- Return the momentum relaxation time of droplets in parcel
281 inline scalar tMom() const;
284 // Derived information
286 //- Return statistical number of drops in parcel
287 scalar N(const scalar rho) const;
289 //- Return relative velocity between given vector and parcel
290 inline vector Urel(const vector&) const;
293 // Dimensionless Numbers
295 //- Reynolds number based on rho an dynamic viscosity
303 //- Reynolds number based on kinematic viscosity
318 //- Schmidt number based on dynamic viscosity and rho
323 const scalar massDiffusion
326 //- Schmidt number based on kinematic viscosity
330 const scalar massDiffusion
341 //- Volume of one droplet in the parcel
344 //- Volume of all droplets in parcel
345 scalar V(const scalar rho) const;
350 bool move(spray& sprayData);
352 //- Transform the position and physical properties of the particle
353 // according to the given transformation tensor
354 void transformProperties(const tensor& T);
356 //- Transform the position and physical properties of the particle
357 // according to the given separation vector
358 void transformProperties(const vector& separation);
360 //- Fix the 2D plane normal,
361 // when particle hits a face it is slightly perturbed
362 // towards the face centre and n_ will no longer be valid
363 inline void correctNormal(const vector& sym);
368 static void readFields(Cloud<parcel>& c);
370 static void writeFields(const Cloud<parcel>& c);
375 friend Ostream& operator<<(Ostream&, const parcel&);
380 inline bool contiguous<parcel>()
386 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
388 } // End namespace Foam
390 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
394 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
398 // ************************************************************************* //