spherical.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::spherical
26 
27 Description
28  Base class for clouds with spherical particles
29 
30 SourceFiles
31  spherical.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef spherical_H
36 #define spherical_H
37 
38 #include "shaped.H"
39 
40 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
41 
42 namespace Foam
43 {
44 namespace clouds
45 {
46 
47 /*---------------------------------------------------------------------------*\
48  Class spherical Declaration
49 \*---------------------------------------------------------------------------*/
50 
51 class spherical
52 :
53  public shaped
54 {
55 private:
56 
57  // Private Member Functions
58 
59  //- Return the IO object for the diameter field
60  static IOobject dIo(const cloud&);
61 
62  //- Calculate the particles' volumes
63  virtual tmp<LagrangianSubScalarField> calcv
64  (
65  const LagrangianModelRef& model,
66  const LagrangianSubMesh& subMesh
67  ) const;
68 
69  //- Calculate the particles' surface areas
70  virtual tmp<LagrangianSubScalarField> calca
71  (
72  const LagrangianModelRef& model,
73  const LagrangianSubMesh& subMesh
74  ) const;
75 
76 
77 protected:
78 
79  // Protected Member Functions
80 
81  //- Correct the shape to match the given volume
83 
84 
85 public:
86 
87  // Public Static Data
88 
89  //- Run-time type information
90  TypeName("spherical");
91 
92 
93  // Public Data
94 
95  //- Diameter
97 
98 
99  // Constructors
100 
101  //- Construct from a reference to the cloud
102  spherical(const cloud&);
103 
104  //- Construct from a reference to the cloud and its base classes
105  spherical(const cloud&, const grouped&);
106 
107 
108  //- Destructor
109  virtual ~spherical();
110 };
111 
112 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
113 
114 } // End namespace clouds
115 } // End namespace Foam
116 
117 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
118 
119 #endif
120 
121 // ************************************************************************* //
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
Definition: IOobject.H:99
Simple wrapper to provide an optional reference to a Lagrangian model.
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
Base class for clouds in which particles are grouped into parcels.
Definition: grouped.H:51
Base class for clouds with particles with mass.
Definition: shaped.H:51
const CloudDerivedField< scalar > & v
Volume.
Definition: shaped.H:83
Base class for clouds with spherical particles.
Definition: spherical.H:53
TypeName("spherical")
Run-time type information.
CloudStateField< scalar > & d
Diameter.
Definition: spherical.H:95
spherical(const cloud &)
Construct from a reference to the cloud.
Definition: spherical.C:91
virtual ~spherical()
Destructor.
Definition: spherical.C:107
void correct(const LagrangianSubScalarSubField &v)
Correct the shape to match the given volume.
Definition: spherical.C:79
A class for managing temporary objects.
Definition: tmp.H:55
Namespace for OpenFOAM.