icoUncoupledKinematicCloud.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) 2016 OpenFOAM Foundation
9  Copyright (C) 2020 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
12  This file is part of OpenFOAM.
13 
14  OpenFOAM is free software: you can redistribute it and/or modify it
15  under the terms of the GNU General Public License as published by
16  the Free Software Foundation, either version 3 of the License, or
17  (at your option) any later version.
18 
19  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22  for more details.
23 
24  You should have received a copy of the GNU General Public License
25  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26 
27 Class
28  Foam::functionObjects::icoUncoupledKinematicCloud
29 
30 Group
31  grpLagrangianFunctionObjects
32 
33 Description
34  This functionObject tracks a uncoupled kinematic particle cloud in the
35  specified velocity field of an incompressible flow (laminar, RANS or LES).
36 
37  It may be used in conjunction with any transient single-phase incompressible
38  flow solver such as pisoFoam or pimpleFoam and tracks the particles or
39  parcels without affecting the flow-field.
40 
41  The kinematicCloud requires the density of the fluid which is looked-up
42  from constant/transportProperties dictionary and the acceleration due to
43  gravity which is read from the constant/g file if present or defaults to
44  zero.
45 
46  The kinematicCloud properties are read from the
47  constant/kinematicCloudProperties dictionary in the usual manner.
48 
49 Usage
50  Example of function object specification:
51  \verbatim
52  tracks
53  {
54  type icoUncoupledKinematicCloud;
55  libs (lagrangianFunctionObjects);
56  }
57  \endverbatim
58 
59  Where the entries comprise:
60  \table
61  Property | Description | Required | Default value
62  type | Type name: icoUncoupledKinematicCloud | yes |
63  U | Name of the velocity field | no | U
64  kinematicCloud | Name of the kinematicCloud | no | kinematicCloud
65  \endtable
66 
67 See also
68  Foam::functionObjects::fvMeshFunctionObject
69 
70 SourceFiles
71  icoUncoupledKinematicCloud.C
72 
73 \*---------------------------------------------------------------------------*/
74 
75 #ifndef functionObjects_icoUncoupledKinematicCloud_H
76 #define functionObjects_icoUncoupledKinematicCloud_H
77 
78 #include "fvMeshFunctionObject.H"
80 #include "volFields.H"
82 
83 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
84 
85 namespace Foam
86 {
87 
88 class singlePhaseTransportModel;
89 
90 namespace functionObjects
91 {
92 
93 /*---------------------------------------------------------------------------*\
94  Class icoUncoupledKinematicCloud Declaration
95 \*---------------------------------------------------------------------------*/
96 
97 class icoUncoupledKinematicCloud
98 :
99  public fvMeshFunctionObject
100 {
101  // Private member data
102 
103  //- Optional acceleration due to gravity
105 
106  //- Reference to the laminar transport model
107  const singlePhaseTransportModel& laminarTransport_;
108 
109  //- Uniform density value
110  dimensionedScalar rhoValue_;
111 
112  //- Density field needed to construct kinematicCloud
113  volScalarField rho_;
114 
115  //- Dynamic viscosity field needed to construct kinematicCloud
117 
118  //- Reference to the velocity field
119  const volVectorField& U_;
120 
121  //- Name of the cloud
122  word kinematicCloudName_;
123 
124  //- The kinematic cloud
125  basicKinematicCollidingCloud kinematicCloud_;
126 
127 
128  // Private member functions
129 
130  //- No copy construct
132 
133  //- No copy assignment
134  void operator==(const icoUncoupledKinematicCloud&) = delete;
135 
136 
137 public:
138 
139  //- Runtime type information
140  TypeName("icoUncoupledKinematicCloud");
141 
142 
143  // Constructors
144 
145  //- Construct for given objectRegistry and dictionary.
146  // Allow the possibility to load fields from files
148  (
149  const word& name,
150  const Time& runTime,
151  const dictionary& dict
152  );
153 
154 
155  //- Destructor
156  virtual ~icoUncoupledKinematicCloud();
157 
158 
159  // Member Functions
160 
161  //- Read the controls
162  virtual bool read(const dictionary&);
163 
164  //- Track the cloud
165  virtual bool execute();
166 
167  //- Write the cloud
168  virtual bool write();
169 };
170 
171 
172 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
173 
174 } // End namespace functionObjects
175 } // End namespace Foam
176 
177 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
178 
179 #endif
180 
181 // ************************************************************************* //
volFields.H
runTime
engineTime & runTime
Definition: createEngineTime.H:13
Foam::CollidingCloud< KinematicCloud< Cloud< basicKinematicCollidingParcel > > >
Foam::functionObjects::icoUncoupledKinematicCloud::write
virtual bool write()
Write the cloud.
Definition: icoUncoupledKinematicCloud.C:129
Foam::Time
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:73
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
fvMeshFunctionObject.H
Foam::functionObjects::icoUncoupledKinematicCloud
This functionObject tracks a uncoupled kinematic particle cloud in the specified velocity field of an...
Definition: icoUncoupledKinematicCloud.H:116
basicKinematicCollidingCloud.H
Foam::singlePhaseTransportModel
A simple single-phase transport model based on viscosityModel.
Definition: singlePhaseTransportModel.H:57
Foam::functionObjects::fvMeshFunctionObject
Specialization of Foam::functionObject for an Foam::fvMesh, providing a reference to the Foam::fvMesh...
Definition: fvMeshFunctionObject.H:64
Foam::functionObjects::icoUncoupledKinematicCloud::execute
virtual bool execute()
Track the cloud.
Definition: icoUncoupledKinematicCloud.C:120
Foam::UniformDimensionedField< vector >
Foam::uniformDimensionedVectorField
UniformDimensionedField< vector > uniformDimensionedVectorField
Definition: uniformDimensionedFields.H:50
Foam::functionObjects::icoUncoupledKinematicCloud::~icoUncoupledKinematicCloud
virtual ~icoUncoupledKinematicCloud()
Destructor.
Definition: icoUncoupledKinematicCloud.C:105
Foam::dimensionedScalar
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
Definition: dimensionedScalarFwd.H:42
Foam::volScalarField
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:57
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
Foam::dimensioned< scalar >
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
uniformDimensionedFields.H
Foam::functionObject::name
const word & name() const noexcept
Return the name of this functionObject.
Definition: functionObject.C:143
Foam::functionObjects::icoUncoupledKinematicCloud::TypeName
TypeName("icoUncoupledKinematicCloud")
Runtime type information.
Foam::functionObjects::icoUncoupledKinematicCloud::read
virtual bool read(const dictionary &)
Read the controls.
Definition: icoUncoupledKinematicCloud.C:112
Foam::GeometricField< scalar, fvPatchField, volMesh >