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-2023 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 "dictionary.H"
45 #include "sizeGroup.H"
46 #include "driftModel.H"
47 #include "nucleationModel.H"
48 #include "runTimeSelectionTables.H"
49 
50 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
51 
52 namespace Foam
53 {
54 namespace diameterModels
55 {
56 
57 /*---------------------------------------------------------------------------*\
58  Class shapeModel Declaration
59 \*---------------------------------------------------------------------------*/
60 
61 class shapeModel
62 {
63 
64 protected:
65 
66  // Protected Data
67 
68  //- Reference to sizeGroup
69  const sizeGroup& sizeGroup_;
70 
71 
72 public:
73 
74  //- Runtime type information
75  TypeName("shapeModel");
76 
77 
78  // Declare runtime construction
79 
81  (
82  autoPtr,
83  shapeModel,
84  dictionary,
85  (
86  const dictionary& dict,
87  const sizeGroup& group
88  ),
89  (dict, group)
90  );
91 
92 
93  // Constructors
94 
95  //- Construct from dictionary and sizeGroup
97  (
98  const dictionary& dict,
99  const sizeGroup& group
100  );
101 
102  //- Disallow default bitwise copy construction
103  shapeModel(const shapeModel&) = delete;
104 
105 
106  // Selectors
107 
108  static autoPtr<shapeModel> New
109  (
110  const dictionary& dict,
111  const sizeGroup& group
112  );
113 
114 
115  //- Destructor
116  virtual ~shapeModel();
117 
118 
119  // Member Functions
120 
121  // Access
122 
123  //- Return reference to size group
124  const sizeGroup& SizeGroup() 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  // Edit
133 
134  //- Correct physical diameter
135  virtual void correct();
136 
137  //- Add coalescence contribution to secondary property source
138  virtual void addCoalescence
139  (
140  const volScalarField& Su,
141  const sizeGroup& fj,
142  const sizeGroup& fk
143  );
144 
145  //- Add breakup contribution to secondary property source
146  virtual void addBreakup
147  (
148  const volScalarField& Su,
149  const sizeGroup& fj
150  );
151 
152  //- Add drift contribution to secondary property source
153  virtual void addDrift
154  (
155  const volScalarField& Su,
156  const sizeGroup& fu,
157  const driftModel& model
158  );
159 
160  //- Add nucleation contribution to secondary property source
161  virtual void addNucleation
162  (
163  const volScalarField& Su,
164  const sizeGroup& fi,
165  const nucleationModel& model
166  );
167 
168  //- Reset secondary property source
169  virtual void reset();
170 
171 
172  // Member Operators
173 
174  //- Disallow default bitwise assignment
175  void operator=(const shapeModel&) = delete;
176 };
177 
178 
179 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
180 
181 } // End namespace diameterModels
182 } // End namespace Foam
183 
184 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
185 
186 #endif
187 
188 // ************************************************************************* //
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 drift models.
Definition: driftModel.H:54
Base class for nucleation models.
Base class for modelling the shape of the particles belonging to a size class through alternative dia...
Definition: shapeModel.H:61
TypeName("shapeModel")
Runtime type information.
virtual void correct()
Correct physical diameter.
Definition: shapeModel.C:95
void operator=(const shapeModel &)=delete
Disallow default bitwise assignment.
virtual void addCoalescence(const volScalarField &Su, const sizeGroup &fj, const sizeGroup &fk)
Add coalescence contribution to secondary property source.
Definition: shapeModel.C:100
const sizeGroup & sizeGroup_
Reference to sizeGroup.
Definition: shapeModel.H:68
shapeModel(const dictionary &dict, const sizeGroup &group)
Construct from dictionary and sizeGroup.
Definition: shapeModel.C:43
virtual const tmp< volScalarField > d() const =0
Return representative diameter of the sizeGroup.
const sizeGroup & SizeGroup() const
Return reference to size group.
Definition: shapeModel.C:89
virtual void addNucleation(const volScalarField &Su, const sizeGroup &fi, const nucleationModel &model)
Add nucleation contribution to secondary property source.
Definition: shapeModel.C:126
virtual void addBreakup(const volScalarField &Su, const sizeGroup &fj)
Add breakup contribution to secondary property source.
Definition: shapeModel.C:109
static autoPtr< shapeModel > New(const dictionary &dict, const sizeGroup &group)
Definition: shapeModel.C:56
virtual void addDrift(const volScalarField &Su, const sizeGroup &fu, const driftModel &model)
Add drift contribution to secondary property source.
Definition: shapeModel.C:117
virtual void reset()
Reset secondary property source.
Definition: shapeModel.C:134
declareRunTimeSelectionTable(autoPtr, shapeModel, dictionary,(const dictionary &dict, const sizeGroup &group),(dict, group))
virtual const tmp< volScalarField > a() const =0
Return representative surface area of the sizeGroup.
virtual ~shapeModel()
Destructor.
Definition: shapeModel.C:82
Single size class fraction field representing a fixed particle volume as defined by the user through ...
Definition: sizeGroup.H:102
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:160
A class for managing temporary objects.
Definition: tmp.H:55
const char *const group
Group name for atomic constants.
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