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