particles.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) 2016-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::functionObjects::particles
26 
27 Description
28  This functionObject tracks a uncoupled kinematic particle cloud in the
29  specified velocity field of an incompressible flow (laminar, RANS or LES).
30 
31  It may be used in conjunction with any transient single-phase incompressible
32  flow solver such as pisoFoam or pimpleFoam and tracks the particles or
33  parcels without affecting the flow-field.
34 
35  The kinematicCloud requires the density of the fluid which is looked-up
36  from constant/transportProperties dictionary and the acceleration due to
37  gravity which is read from the constant/g file if present or defaults to
38  zero.
39 
40  The kinematicCloud properties are read from the
41  constant/kinematicCloudProperties dictionary in the usual manner.
42 
43  Example of function object specification:
44  \verbatim
45  particles
46  {
47  libs ("liblagrangianFunctionObjects.so");
48  type particles;
49  }
50  \endverbatim
51 
52 Usage
53  \table
54  Property | Description | Required | Default value
55  type | Type name: particles | yes |
56  U | Name of the velocity field | no | U
57  kinematicCloud | Name of the kinematicCloud | no | kinematicCloud
58  \endtable
59 
60 See also
61  Foam::functionObjects::fvMeshFunctionObject
62 
63 SourceFiles
64  particles.C
65 
66 \*---------------------------------------------------------------------------*/
67 
68 #ifndef functionObjects_particles_H
69 #define functionObjects_particles_H
70 
71 #include "fvMeshFunctionObject.H"
73 #include "volFieldsFwd.H"
75 
76 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
77 
78 namespace Foam
79 {
80 
81 class singlePhaseTransportModel;
82 
83 namespace functionObjects
84 {
85 
86 /*---------------------------------------------------------------------------*\
87  Class particles Declaration
88 \*---------------------------------------------------------------------------*/
89 
90 class particles
91 :
92  public fvMeshFunctionObject
93 {
94  // Private member data
95 
96  //- Optional acceleration due to gravity
98 
99  //- Reference to the laminar transport model
100  const singlePhaseTransportModel& laminarTransport_;
101 
102  //- Uniform density value
103  dimensionedScalar rhoValue_;
104 
105  //- Density field needed to construct kinematicCloud
106  volScalarField rho_;
107 
108  //- Dynamic viscosity field needed to construct kinematicCloud
110 
111  //- Reference to the velocity field
112  const volVectorField& U_;
113 
114  //- Name of the cloud
115  word kinematicCloudName_;
116 
117  //- The kinematic cloud
118  basicKinematicCollidingCloud kinematicCloud_;
119 
120 
121 public:
122 
123  //- Runtime type information
124  TypeName("particles");
125 
126 
127  // Constructors
128 
129  //- Construct for given objectRegistry and dictionary.
130  // Allow the possibility to load fields from files
131  particles
132  (
133  const word& name,
134  const Time& runTime,
135  const dictionary& dict
136  );
137 
138  //- Disallow default bitwise copy construction
139  particles(const particles&) = delete;
140 
141 
142  //- Destructor
143  virtual ~particles();
144 
145 
146  // Member Functions
147 
148  //- Read the controls
149  virtual bool read(const dictionary&);
150 
151  //- Track the cloud
152  virtual bool execute();
153 
154  //- Write the cloud
155  virtual bool write();
156 
157 
158  // Member Operators
159 
160  //- Disallow default bitwise assignment
161  void operator==(const particles&) = delete;
162 };
163 
164 
165 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
166 
167 } // End namespace functionObjects
168 } // End namespace Foam
169 
170 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
171 
172 #endif
173 
174 // ************************************************************************* //
virtual bool write()
Write the cloud.
Definition: particles.C:138
TypeName("particles")
Runtime type information.
Cloud class to introduce kinematic colliding parcels.
dictionary dict
const word & name() const
Return the name of this functionObject.
UniformDimensionedField< vector > uniformDimensionedVectorField
virtual bool read(const dictionary &)
Read the controls.
Definition: particles.C:119
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:158
engineTime & runTime
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:68
virtual ~particles()
Destructor.
Definition: particles.C:112
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:57
void operator==(const particles &)=delete
Disallow default bitwise assignment.
This functionObject tracks a uncoupled kinematic particle cloud in the specified velocity field of an...
Definition: particles.H:109
A class for handling words, derived from string.
Definition: word.H:59
virtual bool execute()
Track the cloud.
Definition: particles.C:129
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
particles(const word &name, const Time &runTime, const dictionary &dict)
Construct for given objectRegistry and dictionary.
Definition: particles.C:50
Namespace for OpenFOAM.