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  // Protected Data
74 
75  //- Reference to sizeGroup
76  const sizeGroup& sizeGroup_;
77 
78  //- Table with pointers to all secondary properties of ModelType
79  // available in the registry
81 
82 
83 public:
84 
85  // Constructors
86 
87  //- Construct from dictionary and sizeGroup
89  (
90  const dictionary& dict,
91  const sizeGroup& group
92  );
93 
94  //- Disallow default bitwise copy construction
96  (
98  ) = delete;
99 
100 
101  //- Destructor
102  virtual ~SecondaryPropertyModel();
103 
104 
105  // Member Functions
106 
107  // Access
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  // Edit
124 
125  //- Add coalescence contribution to secondary property source
126  virtual void addCoalescence
127  (
128  const volScalarField& Su,
129  const sizeGroup& fj,
130  const sizeGroup& fk
131  );
132 
133  //- Add breakup contribution to secondary property source
134  virtual void addBreakup
135  (
136  const volScalarField& Su,
137  const sizeGroup& fj
138  );
139 
140  //- Add drift contribution to secondary property source
141  virtual void addDrift
142  (
143  const volScalarField& Su,
144  const sizeGroup& fu,
145  const driftModel& model
146  );
147 
148  //- Add drift contribution to secondary property source
149  virtual void addNucleation
150  (
151  const volScalarField& Su,
152  const sizeGroup& fi,
153  const nucleationModel& model
154  );
155 
156  //- Reset secondary property source
157  virtual void reset();
158 
159  // Write
160 
161  //- Dummy write for regIOobject
162  bool writeData(Ostream&) const;
163 
164 
165  // Member Operators
166 
167  //- Disallow default bitwise assignment
168  void operator=(const SecondaryPropertyModel<ModelType>&) = delete;
169 };
170 
171 
172 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
173 
174 } // End namespace diameterModels
175 } // End namespace Foam
176 
177 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
178 
179 #ifdef NoRepository
180  #include "SecondaryPropertyModel.C"
181 #endif
182 
183 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
184 
185 #endif
186 
187 // ************************************************************************* //
Generic GeometricField class.
word group() const
Return group (extension part of name)
Definition: IOobject.C:324
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.
SecondaryPropertyModel(const dictionary &dict, const sizeGroup &group)
Construct from dictionary and sizeGroup.
const SpTable & SecondaryPropertyModelTable()
Return table with pointers to all secondary properties of.
virtual volScalarField & src()=0
Access to secondary property source.
virtual void addCoalescence(const volScalarField &Su, const sizeGroup &fj, const sizeGroup &fk)
Add coalescence contribution to secondary property source.
const sizeGroup & sizeGroup_
Reference to sizeGroup.
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.
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
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:160
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.
dictionary dict