SecondaryPropertyModel.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::SecondaryPropertyModel
26 
27 Description
28  Base class for modeling evolution of secondary representative properties of
29  a size class. By default, transport between size classes due to
30  coalescence, breakup and drift conserve the property. This behaviour can be
31  overridden in a derived class.
32 
33 See also
34  Foam::diameterModels::sizeGroup
35  Foam::diameterModels::populationBalanceModel
36 
37 SourceFiles
38  SecondaryPropertyModel.C
39 
40 \*---------------------------------------------------------------------------*/
41 
42 #ifndef SecondaryPropertyModel_H
43 #define SecondaryPropertyModel_H
44 
45 #include "sizeGroup.H"
46 #include "driftModel.H"
47 #include "nucleationModel.H"
48 
49 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
50 
51 namespace Foam
52 {
53 namespace diameterModels
54 {
55 
56 /*---------------------------------------------------------------------------*\
57  Class SecondaryPropertyModel Declaration
58 \*---------------------------------------------------------------------------*/
59 
60 template<class ModelType>
62 :
63  public ModelType,
64  public regIOobject
65 {
66 
67 protected:
68 
69  // Protected typedefs
70 
72 
73 
74  // Protected Data
75 
76  //- Reference to sizeGroup
77  const sizeGroup& group_;
78 
79  //- Table with pointers to all secondary properties of ModelType
80  // available in the registry
82 
83 
84 public:
85 
86  // Constructors
87 
88  //- Construct from sizeGroup
90 
91  //- Disallow default bitwise copy construction
93  (
95  ) = delete;
96 
97 
98  //- Destructor
99  virtual ~SecondaryPropertyModel();
100 
101 
102  // Member Functions
103 
104  // Access
105 
106  //- Access the sizeGroup
107  const sizeGroup& group() const;
108 
109  //- Return table with pointers to all secondary properties of
110  // ModelType available in the registry
112 
113  //- Return name of the secondary property of another class for
114  // for lookup in registry
115  const word SecondaryPropertyName(const sizeGroup& fi) const;
116 
117  //- Return reference to secondary property field
118  virtual const volScalarField& fld() const = 0;
119 
120  //- Access to secondary property source
121  virtual volScalarField& src() = 0;
122 
123 
124  // Edit
125 
126  //- Add coalescence contribution to secondary property source
127  virtual void addCoalescence
128  (
129  const volScalarField& Su,
130  const sizeGroup& fj,
131  const sizeGroup& fk
132  );
133 
134  //- Add breakup contribution to secondary property source
135  virtual void addBreakup
136  (
137  const volScalarField& Su,
138  const sizeGroup& fj
139  );
140 
141  //- Add drift contribution to secondary property source
142  virtual void addDrift
143  (
144  const volScalarField& Su,
145  const sizeGroup& fu,
146  const driftModel& model
147  );
148 
149  //- Add drift contribution to secondary property source
150  virtual void addNucleation
151  (
152  const volScalarField& Su,
153  const sizeGroup& fi,
154  const nucleationModel& model
155  );
156 
157  //- Reset secondary property source
158  virtual void reset();
159 
160 
161  // Write
162 
163  //- Dummy write for regIOobject
164  bool writeData(Ostream&) const;
165 
166 
167  // Member Operators
168 
169  //- Disallow default bitwise assignment
170  void operator=(const SecondaryPropertyModel<ModelType>&) = delete;
171 };
172 
173 
174 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
175 
176 } // End namespace diameterModels
177 } // End namespace Foam
178 
179 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
180 
181 #ifdef NoRepository
182  #include "SecondaryPropertyModel.C"
183 #endif
184 
185 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
186 
187 #endif
188 
189 // ************************************************************************* //
Generic GeometricField class.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:57
Base class for modeling evolution of secondary representative properties of a size class....
void operator=(const SecondaryPropertyModel< ModelType > &)=delete
Disallow default bitwise assignment.
bool writeData(Ostream &) const
Dummy write for regIOobject.
const sizeGroup & group_
Reference to sizeGroup.
const SpTable & SecondaryPropertyModelTable()
Return table with pointers to all secondary properties of.
virtual volScalarField & src()=0
Access to secondary property source.
const sizeGroup & group() const
Access the sizeGroup.
virtual void addCoalescence(const volScalarField &Su, const sizeGroup &fj, const sizeGroup &fk)
Add coalescence contribution to secondary property source.
const word SecondaryPropertyName(const sizeGroup &fi) const
Return name of the secondary property of another class for.
virtual void addNucleation(const volScalarField &Su, const sizeGroup &fi, const nucleationModel &model)
Add drift contribution to secondary property source.
virtual void addBreakup(const volScalarField &Su, const sizeGroup &fj)
Add breakup contribution to secondary property source.
virtual void addDrift(const volScalarField &Su, const sizeGroup &fu, const driftModel &model)
Add drift contribution to secondary property source.
SecondaryPropertyModel(const sizeGroup &group)
Construct from sizeGroup.
virtual void reset()
Reset secondary property source.
virtual const volScalarField & fld() const =0
Return reference to secondary property field.
SpTable SecondaryPropertyModelTable_
Table with pointers to all secondary properties of ModelType.
Base class for drift models.
Definition: driftModel.H:54
Base class for nucleation models.
Single size class fraction field representing a fixed particle volume as defined by the user through ...
Definition: sizeGroup.H:102
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
Definition: regIOobject.H:55
A class for handling words, derived from string.
Definition: word.H:62
tmp< VolField< Type > > Su(const VolField< Type > &su, const VolField< Type > &vf)
Definition: fvcSup.C:44
Namespace for OpenFOAM.