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::populationBalance::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 SourceFiles
34  shapeModel.C
35 
36 \*---------------------------------------------------------------------------*/
37 
38 #ifndef shapeModel_H
39 #define shapeModel_H
40 
41 #include "runTimeSelectionTables.H"
42 #include "volFields.H"
43 
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 
46 namespace Foam
47 {
48 
49 // Forward declaration of classes
50 class populationBalanceModel;
51 
52 namespace populationBalance
53 {
54 
55 /*---------------------------------------------------------------------------*\
56  Class shapeModel Declaration
57 \*---------------------------------------------------------------------------*/
58 
59 class shapeModel
60 {
61 protected:
62 
63  // Protected Data
64 
65  //- Reference to the population balance model
67 
68 
69 public:
70 
71  //- Runtime type information
72  TypeName("shapeModel");
73 
74 
75  // Declare runtime construction
76 
78  (
79  autoPtr,
80  shapeModel,
81  dictionary,
82  (
83  const dictionary& dict,
85  ),
86  (dict, popBal)
87  );
88 
89 
90  // Constructors
91 
92  //- Construct from a population balance model
94 
95  //- Disallow default bitwise copy construction
96  shapeModel(const shapeModel&) = delete;
97 
98 
99  // Selectors
100 
101  static autoPtr<shapeModel> New
102  (
103  const dictionary& dict,
105  );
106 
107 
108  //- Destructor
109  virtual ~shapeModel();
110 
111 
112  // Member Functions
113 
114  // Access
115 
116  //- Return reference to the population balance model
117  const populationBalanceModel& popBal() const;
118 
119  //- Return representative surface area of the group
120  virtual tmp<volScalarField> a(const label i) const = 0;
121 
122  //- Return representative diameter of the group
123  virtual tmp<volScalarField> d(const label i) const = 0;
124 
125 
126  // Edit
127 
128  //- Solve equations
129  virtual void solve();
130 
131  //- Correct the shape
132  virtual void correct();
133 
134  //- Add coalescence contribution to secondary property source
135  virtual void addCoalescence
136  (
138  const label i,
139  const label j,
140  const label k
141  );
142 
143  //- Add breakup contribution to secondary property source
144  virtual void addBreakup
145  (
147  const label i,
148  const label j
149  );
150 
151  //- Reset secondary property source
152  virtual void reset();
153 
154 
155  // Member Operators
156 
157  //- Disallow default bitwise assignment
158  void operator=(const shapeModel&) = delete;
159 };
160 
161 
162 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
163 
164 } // End namespace populationBalance
165 } // End namespace Foam
166 
167 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
168 
169 #endif
170 
171 // ************************************************************************* //
label k
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
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Definition: dictionary.H:162
Model for tracking the evolution of a dispersed phase size distribution due to coalescence (synonymou...
Base class for modelling the shape of the particles belonging to a size class through alternative dia...
Definition: shapeModel.H:59
TypeName("shapeModel")
Runtime type information.
static autoPtr< shapeModel > New(const dictionary &dict, const populationBalanceModel &popBal)
Definition: shapeModel.C:56
virtual void correct()
Correct the shape.
Definition: shapeModel.C:117
virtual void addCoalescence(const volScalarField::Internal &Su, const label i, const label j, const label k)
Add coalescence contribution to secondary property source.
Definition: shapeModel.C:122
void operator=(const shapeModel &)=delete
Disallow default bitwise assignment.
const populationBalanceModel & popBal_
Reference to the population balance model.
Definition: shapeModel.H:65
declareRunTimeSelectionTable(autoPtr, shapeModel, dictionary,(const dictionary &dict, const populationBalanceModel &popBal),(dict, popBal))
shapeModel(const populationBalanceModel &popBal)
Construct from a population balance model.
Definition: shapeModel.C:44
virtual tmp< volScalarField > d(const label i) const =0
Return representative diameter of the group.
const populationBalanceModel & popBal() const
Return reference to the population balance model.
Definition: shapeModel.C:107
virtual void reset()
Reset secondary property source.
Definition: shapeModel.C:140
virtual void addBreakup(const volScalarField::Internal &Su, const label i, const label j)
Add breakup contribution to secondary property source.
Definition: shapeModel.C:132
virtual tmp< volScalarField > a(const label i) const =0
Return representative surface area of the group.
virtual ~shapeModel()
Destructor.
Definition: shapeModel.C:100
virtual void solve()
Solve equations.
Definition: shapeModel.C:113
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.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
Macros to ease declaration of run-time selection tables.
dictionary dict