shapeModel.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) 2019-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::diameterModels::shapeModel
26 
27 Description
28  Base class for modelling the shape of the particles belonging to a size
29  class through alternative diameters, e.g. a collisional diameter, which can
30  then be utilised in population balance submodels, e.g. for modelling
31  fractal aggregation.
32 
33 See also
34  Foam::diameterModels::sizeGroup
35 
36 SourceFiles
37  shapeModel.C
38 
39 \*---------------------------------------------------------------------------*/
40 
41 #ifndef shapeModel_H
42 #define shapeModel_H
43 
44 #include "volFields.H"
45 #include "runTimeSelectionTables.H"
46 
47 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48 
49 namespace Foam
50 {
51 namespace diameterModels
52 {
53 
54 // Forward declaration of classes
55 class sizeGroup;
56 
57 /*---------------------------------------------------------------------------*\
58  Class shapeModel Declaration
59 \*---------------------------------------------------------------------------*/
60 
61 class shapeModel
62 {
63 protected:
64 
65  // Protected Data
66 
67  //- Reference to sizeGroup
68  const sizeGroup& group_;
69 
70 
71 public:
72 
73  //- Runtime type information
74  TypeName("shapeModel");
75 
76 
77  // Declare runtime construction
78 
80  (
81  autoPtr,
82  shapeModel,
83  dictionary,
84  (
85  const dictionary& dict,
86  const sizeGroup& group,
87  const dictionary& groupDict
88  ),
89  (dict, group, groupDict)
90  );
91 
92 
93  // Constructors
94 
95  //- Construct from sizeGroup
96  shapeModel(const sizeGroup& group);
97 
98  //- Disallow default bitwise copy construction
99  shapeModel(const shapeModel&) = delete;
100 
101 
102  // Selectors
103 
104  static autoPtr<shapeModel> New
105  (
106  const dictionary& dict,
107  const sizeGroup& group,
108  const dictionary& groupDict
109  );
110 
111 
112  //- Destructor
113  virtual ~shapeModel();
114 
115 
116  // Member Functions
117 
118  // Access
119 
120  //- Return the shape model for a given size group
121  static const shapeModel& model(const sizeGroup&);
122 
123  //- Return reference to size group
124  const sizeGroup& group() const;
125 
126  //- Return representative surface area of the sizeGroup
127  virtual const tmp<volScalarField> a() const = 0;
128 
129  //- Return representative diameter of the sizeGroup
130  virtual const tmp<volScalarField> d() const = 0;
131 
132 
133  // Edit
134 
135  //- Correct physical diameter
136  virtual void correct();
137 
138  //- Add coalescence contribution to secondary property source
139  virtual void addCoalescence
140  (
142  const sizeGroup& fj,
143  const sizeGroup& fk
144  );
145 
146  //- Add breakup contribution to secondary property source
147  virtual void addBreakup
148  (
150  const sizeGroup& fj
151  );
152 
153  //- Reset secondary property source
154  virtual void reset();
155 
156 
157  // Member Operators
158 
159  //- Disallow default bitwise assignment
160  void operator=(const shapeModel&) = delete;
161 };
162 
163 
164 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
165 
166 } // End namespace diameterModels
167 } // End namespace Foam
168 
169 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
170 
171 #endif
172 
173 // ************************************************************************* //
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
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 modelling the shape of the particles belonging to a size class through alternative dia...
Definition: shapeModel.H:61
shapeModel(const sizeGroup &group)
Construct from sizeGroup.
Definition: shapeModel.C:43
static const shapeModel & model(const sizeGroup &)
Return the shape model for a given size group.
Definition: shapeModel.C:87
TypeName("shapeModel")
Runtime type information.
const sizeGroup & group_
Reference to sizeGroup.
Definition: shapeModel.H:67
virtual void correct()
Correct physical diameter.
Definition: shapeModel.C:100
void operator=(const shapeModel &)=delete
Disallow default bitwise assignment.
const sizeGroup & group() const
Return reference to size group.
Definition: shapeModel.C:94
virtual const tmp< volScalarField > d() const =0
Return representative diameter of the sizeGroup.
declareRunTimeSelectionTable(autoPtr, shapeModel, dictionary,(const dictionary &dict, const sizeGroup &group, const dictionary &groupDict),(dict, group, groupDict))
virtual void addCoalescence(const volScalarField::Internal &Su, const sizeGroup &fj, const sizeGroup &fk)
Add coalescence contribution to secondary property source.
Definition: shapeModel.C:105
static autoPtr< shapeModel > New(const dictionary &dict, const sizeGroup &group, const dictionary &groupDict)
Definition: shapeModel.C:53
virtual void reset()
Reset secondary property source.
Definition: shapeModel.C:121
virtual const tmp< volScalarField > a() const =0
Return representative surface area of the sizeGroup.
virtual ~shapeModel()
Destructor.
Definition: shapeModel.C:80
virtual void addBreakup(const volScalarField::Internal &Su, const sizeGroup &fj)
Add breakup contribution to secondary property source.
Definition: shapeModel.C:114
Single size class fraction field representing a fixed particle volume as defined by the user through ...
Definition: sizeGroup.H:96
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Definition: dictionary.H:162
A class for managing temporary objects.
Definition: tmp.H:55
tmp< VolField< Type > > Su(const VolField< Type > &su, const VolField< Type > &vf)
Definition: fvcSup.C:44
Namespace for OpenFOAM.
Macros to ease declaration of run-time selection tables.
dictionary dict