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-2020 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 the transport of an additional secondary property in
29  between size groups by means of coalescence, breakup, drift and nucleation.
30  The default behavior is conserved transport of the property, which can be
31  overwritten in a derived class.
32 
33 SourceFiles
34  SecondaryPropertyModel.C
35 
36 \*---------------------------------------------------------------------------*/
37 
38 #ifndef SecondaryPropertyModel_H
39 #define SecondaryPropertyModel_H
40 
41 #include "sizeGroup.H"
42 #include "driftModel.H"
43 #include "nucleationModel.H"
44 
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 
47 namespace Foam
48 {
49 namespace diameterModels
50 {
51 
52 /*---------------------------------------------------------------------------*\
53  Class SecondaryPropertyModel Declaration
54 \*---------------------------------------------------------------------------*/
55 
56 template<class ModelType>
58 :
59  public ModelType,
60  public regIOobject
61 {
62 
63 protected:
64 
65  // Protected typedefs
66 
68 
69  // Protected Data
70 
71  //- Reference to sizeGroup
72  const sizeGroup& sizeGroup_;
73 
74  //- Table with pointers to all secondary properties of ModelType
75  // available in the registry
77 
78 
79 public:
80 
81  // Constructors
82 
83  //- Construct from dictionary and sizeGroup
85  (
86  const dictionary& dict,
87  const sizeGroup& group
88  );
89 
90  //- Disallow default bitwise copy construction
92  (
94  ) = delete;
95 
96 
97  //- Destructor
98  virtual ~SecondaryPropertyModel();
99 
100 
101  // Member Functions
102 
103  // Access
104 
105  //- Return table with pointers to all secondary properties of
106  // ModelType available in the registry
108 
109  //- Return name of the secondary property of another class for
110  // for lookup in registry
111  const word SecondaryPropertyName(const sizeGroup& fi) const;
112 
113  //- Return reference to secondary property field
114  virtual const volScalarField& fld() const = 0;
115 
116  //- Access to secondary property source
117  virtual volScalarField& src() = 0;
118 
119  // Edit
120 
121  //- Add coalescence contribution to secondary property source
122  virtual void addCoalescence
123  (
124  const volScalarField& Su,
125  const sizeGroup& fj,
126  const sizeGroup& fk
127  );
128 
129  //- Add breakup contribution to secondary property source
130  virtual void addBreakup
131  (
132  const volScalarField& Su,
133  const sizeGroup& fj
134  );
135 
136  //- Add drift contribution to secondary property source
137  virtual void addDrift
138  (
139  const volScalarField& Su,
140  const sizeGroup& fu,
141  const driftModel& model
142  );
143 
144  //- Add drift contribution to secondary property source
145  virtual void addNucleation
146  (
147  const volScalarField& Su,
148  const sizeGroup& fi,
149  const nucleationModel& model
150  );
151 
152  //- Reset secondary property source
153  virtual void reset();
154 
155  // Write
156 
157  //- Dummy write for regIOobject
158  bool writeData(Ostream&) const;
159 
160 
161  // Member Operators
162 
163  //- Disallow default bitwise assignment
164  void operator=(const SecondaryPropertyModel<ModelType>&) = delete;
165 };
166 
167 
168 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
169 
170 } // End namespace diameterModels
171 } // End namespace Foam
172 
173 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
174 
175 #ifdef NoRepository
176  #include "SecondaryPropertyModel.C"
177 #endif
178 
179 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
180 
181 #endif
182 
183 // ************************************************************************* //
dictionary dict
void operator=(const SecondaryPropertyModel< ModelType > &)=delete
Disallow default bitwise assignment.
Base class for drift models.
Definition: driftModel.H:50
virtual void reset()
Reset secondary property source.
zeroField Su
Definition: alphaSuSp.H:1
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:158
const sizeGroup & sizeGroup_
Reference to sizeGroup.
SecondaryPropertyModel(const dictionary &dict, const sizeGroup &group)
Construct from dictionary and sizeGroup.
word group() const
Return group (extension part of name)
Definition: IOobject.C:340
const SpTable & SecondaryPropertyModelTable()
Return table with pointers to all secondary properties of.
virtual void addDrift(const volScalarField &Su, const sizeGroup &fu, const driftModel &model)
Add drift contribution to secondary property source.
virtual void addCoalescence(const volScalarField &Su, const sizeGroup &fj, const sizeGroup &fk)
Add coalescence contribution to secondary property source.
Base class for nucleation models.
This class represents a single sizeGroup belonging to a velocityGroup. The main property of a sizeGro...
Definition: sizeGroup.H:100
A class for handling words, derived from string.
Definition: word.H:59
virtual volScalarField & src()=0
Access to secondary property source.
const word SecondaryPropertyName(const sizeGroup &fi) const
Return name of the secondary property of another class for.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:54
virtual void addNucleation(const volScalarField &Su, const sizeGroup &fi, const nucleationModel &model)
Add drift contribution to secondary property source.
Base class for modeling the transport of an additional secondary property in between size groups by m...
virtual const volScalarField & fld() const =0
Return reference to secondary property field.
SpTable SecondaryPropertyModelTable_
Table with pointers to all secondary properties of ModelType.
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
Definition: regIOobject.H:55
bool writeData(Ostream &) const
Dummy write for regIOobject.
Namespace for OpenFOAM.
virtual void addBreakup(const volScalarField &Su, const sizeGroup &fj)
Add breakup contribution to secondary property source.