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& group_;
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  const dictionary& groupDict
89  ),
90  (dict, group, groupDict)
91  );
92 
93 
94  // Constructors
95 
96  //- Construct from sizeGroup
97  shapeModel(const sizeGroup& group);
98 
99  //- Disallow default bitwise copy construction
100  shapeModel(const shapeModel&) = delete;
101 
102 
103  // Selectors
104 
105  static autoPtr<shapeModel> New
106  (
107  const dictionary& dict,
108  const sizeGroup& group,
109  const dictionary& groupDict
110  );
111 
112 
113  //- Destructor
114  virtual ~shapeModel();
115 
116 
117  // Member Functions
118 
119  // Access
120 
121  //- Return reference to size group
122  const sizeGroup& group() const;
123 
124  //- Return representative surface area of the sizeGroup
125  virtual const tmp<volScalarField> a() const = 0;
126 
127  //- Return representative diameter of the sizeGroup
128  virtual const tmp<volScalarField> d() const = 0;
129 
130  // Edit
131 
132  //- Correct physical diameter
133  virtual void correct();
134 
135  //- Add coalescence contribution to secondary property source
136  virtual void addCoalescence
137  (
138  const volScalarField& Su,
139  const sizeGroup& fj,
140  const sizeGroup& fk
141  );
142 
143  //- Add breakup contribution to secondary property source
144  virtual void addBreakup
145  (
146  const volScalarField& Su,
147  const sizeGroup& fj
148  );
149 
150  //- Add drift contribution to secondary property source
151  virtual void addDrift
152  (
153  const volScalarField& Su,
154  const sizeGroup& fu,
155  const driftModel& model
156  );
157 
158  //- Add nucleation contribution to secondary property source
159  virtual void addNucleation
160  (
161  const volScalarField& Su,
162  const sizeGroup& fi,
163  const nucleationModel& model
164  );
165 
166  //- Reset secondary property source
167  virtual void reset();
168 
169 
170  // Member Operators
171 
172  //- Disallow default bitwise assignment
173  void operator=(const shapeModel&) = delete;
174 };
175 
176 
177 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
178 
179 } // End namespace diameterModels
180 } // End namespace Foam
181 
182 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
183 
184 #endif
185 
186 // ************************************************************************* //
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
shapeModel(const sizeGroup &group)
Construct from sizeGroup.
Definition: shapeModel.C:42
TypeName("shapeModel")
Runtime type information.
const sizeGroup & group_
Reference to sizeGroup.
Definition: shapeModel.H:68
virtual void correct()
Correct physical diameter.
Definition: shapeModel.C:92
void operator=(const shapeModel &)=delete
Disallow default bitwise assignment.
const sizeGroup & group() const
Return reference to size group.
Definition: shapeModel.C:86
virtual void addCoalescence(const volScalarField &Su, const sizeGroup &fj, const sizeGroup &fk)
Add coalescence contribution to secondary property source.
Definition: shapeModel.C:97
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 addNucleation(const volScalarField &Su, const sizeGroup &fi, const nucleationModel &model)
Add nucleation contribution to secondary property source.
Definition: shapeModel.C:123
virtual void addBreakup(const volScalarField &Su, const sizeGroup &fj)
Add breakup contribution to secondary property source.
Definition: shapeModel.C:106
static autoPtr< shapeModel > New(const dictionary &dict, const sizeGroup &group, const dictionary &groupDict)
Definition: shapeModel.C:52
virtual void addDrift(const volScalarField &Su, const sizeGroup &fu, const driftModel &model)
Add drift contribution to secondary property source.
Definition: shapeModel.C:114
virtual void reset()
Reset secondary property source.
Definition: shapeModel.C:131
virtual const tmp< volScalarField > a() const =0
Return representative surface area of the sizeGroup.
virtual ~shapeModel()
Destructor.
Definition: shapeModel.C:79
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: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