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  Minimal example by using \c system/controlDict.functions:
51  \verbatim
52  tracksFO
53  {
54  // Mandatory entries
55  type icoUncoupledKinematicCloud;
56  libs (lagrangianFunctionObjects);
57 
58  // Optional entries
59  U <word>;
60  kinematicCloud <word>;
61 
62  // Inherited entries
63  ...
64  }
65  \endverbatim
66 
67  where the entries mean:
68  \table
69  Property | Description | Type | Reqd | Deflt
70  type | Type name: icoUncoupledKinematicCloud | word | yes | -
71  libs | Library name: lagrangianFunctionObjects | word | yes | -
72  U | Name of the velocity field | word | no | U
73  kinematicCloud | Name of the cloud | word | no | kinematicCloud
74  \endtable
75 
76  The inherited entries are elaborated in:
77  - \link functionObject.H \endlink
78 
79 SourceFiles
80  icoUncoupledKinematicCloud.C
81 
82 \*---------------------------------------------------------------------------*/
83 
84 #ifndef Foam_functionObjects_icoUncoupledKinematicCloud_H
85 #define Foam_functionObjects_icoUncoupledKinematicCloud_H
86 
87 #include "fvMeshFunctionObject.H"
89 #include "volFields.H"
91 
92 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
93 
94 namespace Foam
95 {
96 
97 class singlePhaseTransportModel;
98 
99 namespace functionObjects
100 {
101 
102 /*---------------------------------------------------------------------------*\
103  Class icoUncoupledKinematicCloud Declaration
104 \*---------------------------------------------------------------------------*/
105 
106 class icoUncoupledKinematicCloud
107 :
108  public fvMeshFunctionObject
109 {
110  // Private Data
111 
112  //- Optional acceleration due to gravity
114 
115  //- Reference to the laminar transport model
116  const singlePhaseTransportModel& laminarTransport_;
117 
118  //- Uniform density value
119  dimensionedScalar rhoValue_;
120 
121  //- Density field needed to construct kinematicCloud
122  volScalarField rho_;
123 
124  //- Dynamic viscosity field needed to construct kinematicCloud
125  volScalarField mu_;
126 
127  //- Reference to the velocity field
128  const volVectorField& U_;
129 
130  //- Name of the cloud
131  word kinematicCloudName_;
132 
133  //- The kinematic cloud
134  basicKinematicCollidingCloud kinematicCloud_;
135 
136 
137  // Private Member Functions
138 
139  //- No copy construct
141 
142  //- No copy assignment
143  void operator=(const icoUncoupledKinematicCloud&) = delete;
144 
145 
146 public:
147 
148  //- Runtime type information
149  TypeName("icoUncoupledKinematicCloud");
150 
151 
152  // Constructors
153 
154  //- Construct from name, Time and dictionary
155  // Allow the possibility to load fields from files
157  (
158  const word& name,
159  const Time& runTime,
160  const dictionary& dict
161  );
162 
163 
164  //- Destructor
165  virtual ~icoUncoupledKinematicCloud();
166 
167 
168  // Member Functions
169 
170  //- Read the function-object dictionary
171  virtual bool read(const dictionary&);
172 
173  //- Execute the function-object operations
174  virtual bool execute();
175 
176  //- Write the function-object results
177  virtual bool write();
178 };
179 
180 
181 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
182 
183 } // End namespace functionObjects
184 } // End namespace Foam
185 
186 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
187 
188 #endif
189 
190 // ************************************************************************* //
Cloud class to introduce kinematic colliding parcels.
dictionary dict
UniformDimensionedField< vector > uniformDimensionedVectorField
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:130
Various UniformDimensionedField types.
engineTime & runTime
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:76
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:68
const word & name() const noexcept
Return the name of this functionObject.
virtual bool execute()
Execute the function-object operations.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:72
A class for handling words, derived from Foam::string.
Definition: word.H:63
TypeName("icoUncoupledKinematicCloud")
Runtime type information.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
virtual bool read(const dictionary &)
Read the function-object dictionary.
This functionObject tracks a uncoupled kinematic particle cloud in the specified velocity field of an...
virtual bool write()
Write the function-object results.
Namespace for OpenFOAM.