All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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-2021 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::shapeModel
26 
27 Description
28  Base class for modeling shape, i.e. a physical diameter of a sizeGroup.
29  This diameter may then be utilised for calculation of breakup, coalescence
30  or drift rates, depending on the model implementation.
31 
32 SourceFiles
33  shapeModel.C
34 
35 \*---------------------------------------------------------------------------*/
36 
37 #ifndef shapeModel_H
38 #define shapeModel_H
39 
40 #include "dictionary.H"
41 #include "sizeGroup.H"
42 #include "driftModel.H"
43 #include "nucleationModel.H"
44 #include "runTimeSelectionTables.H"
45 
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 
48 namespace Foam
49 {
50 namespace diameterModels
51 {
52 
53 /*---------------------------------------------------------------------------*\
54  Class shapeModel Declaration
55 \*---------------------------------------------------------------------------*/
56 
57 class shapeModel
58 {
59 
60 protected:
61 
62  // Protected Data
63 
64  //- Reference to sizeGroup
65  const sizeGroup& sizeGroup_;
66 
67 
68 public:
69 
70  //- Runtime type information
71  TypeName("shapeModel");
72 
73 
74  // Declare runtime construction
75 
77  (
78  autoPtr,
79  shapeModel,
80  dictionary,
81  (
82  const dictionary& dict,
83  const sizeGroup& group
84  ),
85  (dict, group)
86  );
87 
88 
89  // Constructors
90 
91  //- Construct from dictionary and sizeGroup
93  (
94  const dictionary& dict,
95  const sizeGroup& group
96  );
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  );
109 
110 
111  //- Destructor
112  virtual ~shapeModel();
113 
114 
115  // Member Functions
116 
117  // Access
118 
119  //- Return reference to size group
120  const sizeGroup& SizeGroup() const;
121 
122  //- Return representative surface area of the sizeGroup
123  virtual const tmp<volScalarField> a() const = 0;
124 
125  //- Return representative diameter of the sizeGroup
126  virtual const tmp<volScalarField> d() const = 0;
127 
128  // Edit
129 
130  //- Correct physical diameter
131  virtual void correct();
132 
133  //- Add coalescence contribution to secondary property source
134  virtual void addCoalescence
135  (
136  const volScalarField& Su,
137  const sizeGroup& fj,
138  const sizeGroup& fk
139  );
140 
141  //- Add breakup contribution to secondary property source
142  virtual void addBreakup
143  (
144  const volScalarField& Su,
145  const sizeGroup& fj
146  );
147 
148  //- Add drift contribution to secondary property source
149  virtual void addDrift
150  (
151  const volScalarField& Su,
152  const sizeGroup& fu,
153  const driftModel& model
154  );
155 
156  //- Add nucleation contribution to secondary property source
157  virtual void addNucleation
158  (
159  const volScalarField& Su,
160  const sizeGroup& fi,
161  const nucleationModel& model
162  );
163 
164  //- Reset secondary property source
165  virtual void reset();
166 
167 
168  // Member Operators
169 
170  //- Disallow default bitwise assignment
171  void operator=(const shapeModel&) = delete;
172 };
173 
174 
175 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
176 
177 } // End namespace diameterModels
178 } // End namespace Foam
179 
180 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
181 
182 #endif
183 
184 // ************************************************************************* //
const char *const group
Group name for atomic constants.
dictionary dict
Base class for drift models.
Definition: driftModel.H:50
TypeName("shapeModel")
Runtime type information.
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:156
virtual const tmp< volScalarField > a() const =0
Return representative surface area of the sizeGroup.
virtual ~shapeModel()
Destructor.
virtual void addCoalescence(const volScalarField &Su, const sizeGroup &fj, const sizeGroup &fk)
Add coalescence contribution to secondary property source.
virtual void correct()
Correct physical diameter.
Base class for nucleation models.
void operator=(const shapeModel &)=delete
Disallow default bitwise assignment.
This class represents a single sizeGroup belonging to a velocityGroup. The main property of a sizeGro...
Definition: sizeGroup.H:100
virtual void reset()
Reset secondary property source.
const sizeGroup & SizeGroup() const
Return reference to size group.
const sizeGroup & sizeGroup_
Reference to sizeGroup.
Definition: shapeModel.H:64
static autoPtr< shapeModel > New(const dictionary &dict, const sizeGroup &group)
virtual void addNucleation(const volScalarField &Su, const sizeGroup &fi, const nucleationModel &model)
Add nucleation contribution to secondary property source.
virtual const tmp< volScalarField > d() const =0
Return representative diameter of the sizeGroup.
virtual void addDrift(const volScalarField &Su, const sizeGroup &fu, const driftModel &model)
Add drift contribution to secondary property source.
shapeModel(const dictionary &dict, const sizeGroup &group)
Construct from dictionary and sizeGroup.
virtual void addBreakup(const volScalarField &Su, const sizeGroup &fj)
Add breakup contribution to secondary property source.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:52
const tmp< volScalarField::Internal > & Su
Definition: alphaSuSp.H:6
Macros to ease declaration of run-time selection tables.
A class for managing temporary objects.
Definition: PtrList.H:53
declareRunTimeSelectionTable(autoPtr, shapeModel, dictionary,(const dictionary &dict, const sizeGroup &group),(dict, group))
Namespace for OpenFOAM.