eulerianParticle.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 | www.openfoam.com
6 \\/ M anipulation |
7-------------------------------------------------------------------------------
8 Copyright (C) 2015-2016 OpenCFD Ltd.
9-------------------------------------------------------------------------------
10License
11 This file is part of OpenFOAM.
12
13 OpenFOAM is free software: you can redistribute it and/or modify it
14 under the terms of the GNU General Public License as published by
15 the Free Software Foundation, either version 3 of the License, or
16 (at your option) any later version.
17
18 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25
26Class
27 Foam::eulerianParticle
28
29Description
30 Lightweight class to store particle data derived from VOF calculations,
31 with special handling for input, output and parallel reduction.
32
33SourceFiles
34 eulerianParticle.H
35 eulerianParticle.C
36 eulerianParticleTemplates.C
37
38\*---------------------------------------------------------------------------*/
39
40#ifndef functionObjects_eulerianParticle_H
41#define functionObjects_eulerianParticle_H
42
43#include "label.H"
44#include "scalar.H"
45#include "vector.H"
46#include "dictionary.H"
47
48// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49
50namespace Foam
51{
52// Forward declaration of classes
53class Istream;
54class Ostream;
55
56namespace functionObjects
57{
58 class eulerianParticle;
59}
60
61// Forward declaration of friend functions and operators
62Istream& operator>>(Istream&, functionObjects::eulerianParticle&);
63Ostream& operator<<(Ostream&, const functionObjects::eulerianParticle&);
64
65namespace functionObjects
66{
67
68/*---------------------------------------------------------------------------*\
69 Class eulerianParticle Declaration
70\*---------------------------------------------------------------------------*/
73{
74
75public:
76
77 // Public data
78
79 //- Index of face in faceZone that this particle hits. Also used to
80 // identify the index of the coarse face of the surface agglomeration
81 // Note: value of -1 used to indicate that the particle has not
82 // been initialised
83 label faceIHit;
84
85 //- Volume multiplied by face centres [m4]
86 vector VC;
87
88 //- Volume multiplied by velocity [m4/s]
89 vector VU;
90
91 //- Volume [m3]
92 scalar V;
93
94 //- Injection time - set at collection [s]
95 scalar time;
96
97
98 //- Constructor
100
101
102 // Public Member Functions
103
104 //- Write to stream
105 void write(Ostream& os) const;
106
107 //- Write to dictionary
109
110
111 // Operators
113 friend bool operator==
114 (
115 const eulerianParticle& a,
116 const eulerianParticle& b
117 )
118 {
119 return
120 a.faceIHit == b.faceIHit
121 && a.VC == b.VC
122 && a.VU == b.VU
123 && a.V == b.V
124 && a.time == b.time;
125 }
127 friend bool operator!=
128 (
129 const eulerianParticle& a,
130 const eulerianParticle& b
131 )
132 {
133 return !(a == b);
134 }
135};
136
137
138// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
139
140} // End namespace functionObjects
141} // End namespace Foam
142
143// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
144
145#ifdef NoRepository
147#endif
148
149// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
150
151#endif
152
153// ************************************************************************* //
const Time & time() const
Return Time associated with the objectRegistry.
Definition: IOobject.C:506
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:62
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
Lightweight class to store particle data derived from VOF calculations, with special handling for inp...
scalar time
Injection time - set at collection [s].
vector VC
Volume multiplied by face centres [m4].
Foam::dictionary writeDict() const
Write to dictionary.
label faceIHit
Index of face in faceZone that this particle hits. Also used to.
vector VU
Volume multiplied by velocity [m4/s].
OBJstream os(runTime.globalPath()/outputName)
Namespace for OpenFOAM.
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces)
Definition: boundaryPatch.C:83
Istream & operator>>(Istream &, directionInfo &)
runTime write()
volScalarField & b
Definition: createFields.H:27