Loading...
Searching...
No Matches
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 Foam_functionObjects_eulerianParticle_H
41#define Foam_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{
52namespace functionObjects
53{
54 // Forward Declarations
55 class eulerianParticle;
56}
57
58// Forward Declarations
59Istream& operator>>(Istream&, functionObjects::eulerianParticle&);
60Ostream& operator<<(Ostream&, const functionObjects::eulerianParticle&);
61
62namespace functionObjects
63{
65/*---------------------------------------------------------------------------*\
66 Class eulerianParticle Declaration
67\*---------------------------------------------------------------------------*/
68
70{
71public:
72
73 // Public Data
74
75 //- Index of face in faceZone that this particle hits. Also used to
76 // identify the index of the coarse face of the surface agglomeration
77 // Note: value of -1 used to indicate that the particle has not
78 // been initialised
79 label faceIHit;
80
81 //- Volume multiplied by face centres [m4]
83
84 //- Volume multiplied by velocity [m4/s]
85 vector VU;
86
87 //- Volume [m3]
88 scalar V;
89
90 //- Injection time - set at collection [s]
91 scalar time;
93
94 //- Default construct
96
98 // Public Member Functions
99
100 //- Write to stream
101 void write(Ostream& os) const;
102
103 //- Write to dictionary
105
106
107 // Operators
108
109 friend bool operator==
110 (
111 const eulerianParticle& a,
112 const eulerianParticle& b
113 )
114 {
115 return
116 a.faceIHit == b.faceIHit
117 && a.VC == b.VC
118 && a.VU == b.VU
119 && a.V == b.V
120 && a.time == b.time;
122
123 friend bool operator!=
124 (
125 const eulerianParticle& a,
126 const eulerianParticle& b
127 )
128 {
129 return !(a == b);
130 }
131};
132
133
134// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
136} // End namespace functionObjects
137} // End namespace Foam
138
139// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
140
141#ifdef NoRepository
143#endif
144
145// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
146
147#endif
148
149// ************************************************************************* //
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition Ostream.H:59
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
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).
Istream & operator>>(Istream &, directionInfo &)
Vector< scalar > vector
Definition vector.H:57
runTime write()
volScalarField & b