parcel.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) 2025 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::clouds::parcel
26 
27 Description
28  Basic cloud with spherical, variable density, particles, grouped into
29  parcels.
30 
31  This cloud's modelling is the same as for particle, except that an
32  additional number field is used to represent multiple physical particles
33  per Lagrangian parcel. This adds flexibility with regards to managing the
34  expense of simulating large numbers of physical particles, and also
35  provides the ability to specify the number, size (distribution) and volume
36  or mass flow rate of particles at an injection.
37 
38 See also
39  Foam::clouds::particle
40 
41 SourceFiles
42  parcel.C
43 
44 \*---------------------------------------------------------------------------*/
45 
46 #ifndef parcel_H
47 #define parcel_H
48 
49 #include "grouped.H"
50 #include "massive.H"
51 #include "coupledToFluid.H"
52 #include "sphericalCoupled.H"
53 
54 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
55 
56 namespace Foam
57 {
58 namespace clouds
59 {
60 
61 /*---------------------------------------------------------------------------*\
62  Class parcel Declaration
63 \*---------------------------------------------------------------------------*/
64 
65 class parcel
66 :
67  public cloud,
68  public grouped,
69  public spherical,
70  public massive,
71  public coupledToFluid,
72  public sphericalCoupled
73 {
74 protected:
75 
76  // Protected Member Functions
77 
78  //- Initialisation hook
79  virtual void initialise(const bool predict);
80 
81  //- Partition hook
82  virtual void partition();
83 
84  //- Return the acceleration with which to do second-order tracking
86  (
87  const LagrangianSubMesh&
88  ) const;
89 
90  //- Do we need to re-calculate particles that are modified?
91  virtual bool reCalculateModified();
92 
93  //- Update the cloud properties
94  virtual void calculate
95  (
96  const LagrangianSubScalarField& deltaT,
97  const bool final
98  );
99 
100 
101 public:
102 
103  // Public Static Data
104 
105  //- Run-time type information
106  TypeName("parcel");
107 
108 
109  // Constructors
110 
111  //- Construct from a mesh and a name
112  parcel
113  (
114  const polyMesh& mesh,
115  const word& name,
116  const contextType context,
119  );
120 
121 
122  //- Destructor
123  virtual ~parcel();
124 
125 
126  // Member Functions
127 
128  //- Solve the cloud's evolution over the current time-step
129  virtual void solve();
130 };
131 
132 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
133 
134 } // End namespace clouds
135 } // End namespace Foam
136 
137 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
138 
139 #endif
140 
141 // ************************************************************************* //
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
readOption
Enumeration defining the read options.
Definition: IOobject.H:117
const word & name() const
Return name.
Definition: IOobject.H:307
writeOption
Enumeration defining the write options.
Definition: IOobject.H:126
Mesh that relates to a sub-section of a Lagrangian mesh. This is used to construct fields that relate...
Base class for clouds. Provides a basic evolution algorithm, models, and a database for caching deriv...
Definition: cloud.H:63
contextType
Context in which this cloud is used.
Definition: cloud.H:222
enum Foam::cloud::contextType context
const LagrangianMesh & mesh() const
Access the mesh.
Definition: cloud.H:276
Base class for clouds which are coupled to a fluid.
Base class for clouds in which particles are grouped into parcels.
Definition: grouped.H:51
Base class for clouds with particles with mass.
Definition: massive.H:51
Basic cloud with spherical, variable density, particles, grouped into parcels.
Definition: parcel.H:72
virtual bool reCalculateModified()
Do we need to re-calculate particles that are modified?
Definition: parcel.C:83
virtual tmp< LagrangianSubVectorField > dUdt(const LagrangianSubMesh &) const
Return the acceleration with which to do second-order tracking.
Definition: parcel.C:69
TypeName("parcel")
Run-time type information.
virtual void initialise(const bool predict)
Initialisation hook.
Definition: parcel.C:54
parcel(const polyMesh &mesh, const word &name, const contextType context, const IOobject::readOption readOption=IOobject::READ_IF_PRESENT, const IOobject::writeOption writeOption=IOobject::AUTO_WRITE)
Construct from a mesh and a name.
Definition: parcel.C:204
virtual ~parcel()
Destructor.
Definition: parcel.C:225
virtual void partition()
Partition hook.
Definition: parcel.C:61
virtual void calculate(const LagrangianSubScalarField &deltaT, const bool final)
Update the cloud properties.
Definition: parcel.C:122
virtual void solve()
Solve the cloud's evolution over the current time-step.
Definition: parcel.C:231
Base class for clouds of spherical particles which are coupled to a fluid.
Base class for clouds with spherical particles.
Definition: spherical.H:53
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:80
A class for managing temporary objects.
Definition: tmp.H:55
A class for handling words, derived from string.
Definition: word.H:62
Namespace for OpenFOAM.