parcelCloud.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) 2020-2022 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::parcelCloud
26 
27 Description
28  Virtual abstract base class for parcel clouds. As parcelCloudBase but with
29  additional virtualisation of the evolve method, plus some additional
30  methods that are defined below the parcel-cloud layer (i.e., in Cloud).
31  These methods are implemented by forwarding in the ParcelCloud class.
32 
33  This class contains the selection table and represents the high level
34  interface used by a solver.
35 
36 SourceFiles
37  parcelCloud.C
38 
39 \*---------------------------------------------------------------------------*/
40 
41 #ifndef parcelCloud_H
42 #define parcelCloud_H
43 
44 #include "parcelCloudBase.H"
45 
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 
48 namespace Foam
49 {
50 
51 class fluidThermo;
52 
53 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
54 
55 class parcelCloud
56 :
57  virtual public parcelCloudBase
58 {
59 public:
60 
61  //- Runtime type information
62  TypeName("parcelCloud");
63 
64 
65  // Declare viscosity-based runtime construction
67  (
68  autoPtr,
70  viscosity,
71  (
72  const word& name,
73  const volScalarField& rho,
74  const volVectorField& U,
75  const volScalarField& mu,
76  const dimensionedVector& g
77  ),
78  (name, rho, U, mu, g)
79  );
80 
81  // Declare thermo-based runtime construction
83  (
84  autoPtr,
86  thermo,
87  (
88  const word& name,
89  const volScalarField& rho,
90  const volVectorField& U,
91  const dimensionedVector& g,
92  const fluidThermo& carrierThermo
93  ),
94  (name, rho, U, g, carrierThermo)
95  );
96 
97 
98  // Constructors
99 
100  //- Null constructor
101  parcelCloud();
102 
103  //- Disallow default bitwise copy construction
104  parcelCloud(const parcelCloud&) = delete;
105 
106 
107  //- Selectors
108 
109  //- Select and construct with given carrier fields
111  (
112  const word& name,
113  const volScalarField& rho,
114  const volVectorField& U,
115  const volScalarField& mu,
116  const dimensionedVector& g
117  );
118 
119  //- Select and construct with given carrier fields and thermo
121  (
122  const word& name,
123  const volScalarField& rho,
124  const volVectorField& U,
125  const dimensionedVector& g,
126  const fluidThermo& carrierThermo
127  );
128 
129 
130  //- Destructor
131  virtual ~parcelCloud();
132 
133 
134  // Member Functions
135 
136  // Mesh changes
137 
138  //- Call this before a topology change. Stores the particles global
139  // positions in the database for use during mapping.
140  virtual void storeGlobalPositions() = 0;
141 
142  //- Update topology using the given map
143  virtual void topoChange(const polyTopoChangeMap&)
144  {
146  }
147 
148  //- Update from another mesh using the given map
149  virtual void mapMesh(const polyMeshMap&)
150  {
152  }
153 
154  //- Redistribute or update using the given distribution map
155  virtual void distribute(const polyDistributionMap& map)
156  {
158  }
159 
160 
161  // Evolution
162 
163  //- Evolve the cloud
164  virtual void evolve() = 0;
165 
166 
167  // Member Operators
168 
169  //- Disallow default bitwise assignment
170  void operator=(const parcelCloud&) = delete;
171 };
172 
173 
174 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
175 
176 } // End namespace Foam
177 
178 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
179 
180 #endif
181 
182 // ************************************************************************* //
Generic GeometricField class.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: autoPtr.H:51
Base-class for fluid thermodynamic properties.
Definition: fluidThermo.H:57
Virtual abstract base class for parcel clouds. Inserted by ParcelCloudBase into the base of the cloud...
Virtual abstract base class for parcel clouds. As parcelCloudBase but with additional virtualisation ...
Definition: parcelCloud.H:57
virtual void storeGlobalPositions()=0
Call this before a topology change. Stores the particles global.
declareRunTimeSelectionTable(autoPtr, parcelCloud, viscosity,(const word &name, const volScalarField &rho, const volVectorField &U, const volScalarField &mu, const dimensionedVector &g),(name, rho, U, mu, g))
virtual void mapMesh(const polyMeshMap &)
Update from another mesh using the given map.
Definition: parcelCloud.H:148
virtual void topoChange(const polyTopoChangeMap &)
Update topology using the given map.
Definition: parcelCloud.H:142
TypeName("parcelCloud")
Runtime type information.
parcelCloud()
Null constructor.
Definition: parcelCloud.C:40
virtual void evolve()=0
Evolve the cloud.
virtual void distribute(const polyDistributionMap &map)
Redistribute or update using the given distribution map.
Definition: parcelCloud.H:154
void operator=(const parcelCloud &)=delete
Disallow default bitwise assignment.
static autoPtr< parcelCloud > New(const word &name, const volScalarField &rho, const volVectorField &U, const volScalarField &mu, const dimensionedVector &g)
Selectors.
virtual ~parcelCloud()
Destructor.
Definition: parcelCloud.C:46
Class containing mesh-to-mesh mapping information after a mesh distribution where we send parts of me...
Class containing mesh-to-mesh mapping information.
Definition: polyMeshMap.H:51
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
Abstract base class for all fluid physical properties.
Definition: viscosity.H:50
A class for handling words, derived from string.
Definition: word.H:62
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
Definition: error.H:353
U
Definition: pEqn.H:72
const dimensionedScalar mu
Atomic mass unit.
Namespace for OpenFOAM.
word name(const complex &)
Return a string representation of a complex.
Definition: complex.C:47
fluidMulticomponentThermo & thermo
Definition: createFields.H:31