coalescenceModel.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) 2017-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::coalescenceModel
26 
27 Description
28  Base class for coalescence models.
29 
30 SourceFiles
31  coalescenceModel.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef coalescenceModel_H
36 #define coalescenceModel_H
37 
38 #include "populationBalanceModel.H"
39 
40 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
41 
42 namespace Foam
43 {
44 namespace diameterModels
45 {
46 
47 /*---------------------------------------------------------------------------*\
48  Class coalescenceModel Declaration
49 \*---------------------------------------------------------------------------*/
50 
51 class coalescenceModel
52 {
53 protected:
54 
55  // Protected Data
56 
57  //- Reference to the populationBalanceModel
59 
60 
61 public:
62 
63  //- Runtime type information
64  TypeName("coalescenceModel");
65 
66 
67  // Declare run-time constructor selection table
68 
70  (
71  autoPtr,
73  dictionary,
74  (
75  const populationBalanceModel& popBal,
76  const dictionary& dict
77  ),
78  (popBal, dict)
79  );
80 
81 
82  //- Class used for the read-construction of
83  // PtrLists of coalescence models
84  class iNew
85  {
86  const populationBalanceModel& popBal_;
87 
88  public:
89 
90  iNew(const populationBalanceModel& popBal)
91  :
92  popBal_(popBal)
93  {}
94 
96  {
97  word type(is);
98  dictionary dict(is);
99  return coalescenceModel::New(type, popBal_, dict);
100  }
101  };
102 
103 
104  // Constructor
105 
107  (
108  const populationBalanceModel& popBal,
109  const dictionary& dict
110  );
113  {
115  return autoPtr<coalescenceModel>(nullptr);
116  }
117 
118 
119  // Selector
120 
122  (
123  const word& type,
124  const populationBalanceModel& popBal,
125  const dictionary& dict
126  );
127 
128 
129  //- Destructor
130  virtual ~coalescenceModel()
131  {}
132 
133 
134  // Member Functions
135 
136  //- Precompute diameter independent expressions
137  virtual void precompute();
138 
139  //- Add to coalescenceRate
140  virtual void addToCoalescenceRate
141  (
142  volScalarField& coalescenceRate,
143  const label i,
144  const label j
145  ) = 0;
146 };
147 
148 
149 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
150 
151 } // End namespace diameterModels
152 } // End namespace Foam
153 
154 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
155 
156 #endif
157 
158 // ************************************************************************* //
dictionary dict
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
coalescenceModel(const populationBalanceModel &popBal, const dictionary &dict)
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:156
Class that solves the univariate population balance equation by means of a class method (also called ...
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
Definition: Istream.H:57
iNew(const populationBalanceModel &popBal)
TypeName("coalescenceModel")
Runtime type information.
Base class for coalescence models.
autoPtr< coalescenceModel > clone() const
A class for handling words, derived from string.
Definition: word.H:59
autoPtr< coalescenceModel > operator()(Istream &is) const
virtual void addToCoalescenceRate(volScalarField &coalescenceRate, const label i, const label j)=0
Add to coalescenceRate.
const populationBalanceModel & popBal_
Reference to the populationBalanceModel.
static autoPtr< coalescenceModel > New(const word &type, const populationBalanceModel &popBal, const dictionary &dict)
declareRunTimeSelectionTable(autoPtr, coalescenceModel, dictionary,(const populationBalanceModel &popBal, const dictionary &dict),(popBal, dict))
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
Definition: POSIX.C:488
Class used for the read-construction of.
virtual void precompute()
Precompute diameter independent expressions.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:52
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
Definition: error.H:370
Namespace for OpenFOAM.