binaryBreakupModel.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::binaryBreakupModel
26 
27 Description
28  Base class for binary breakup models that provide a breakup rate between a
29  size class pair directly, i.e. without explicitly stating the daughter size
30  distribution function.
31 
32 See also
33  Foam::diameterModels::populationBalanceModel
34 
35 SourceFiles
36  binaryBreakupModel.C
37 
38 \*---------------------------------------------------------------------------*/
39 
40 #ifndef binaryBreakupModel_H
41 #define binaryBreakupModel_H
42 
43 #include "populationBalanceModel.H"
44 
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 
47 namespace Foam
48 {
49 namespace diameterModels
50 {
51 
52 /*---------------------------------------------------------------------------*\
53  Class binaryBreakupModel Declaration
54 \*---------------------------------------------------------------------------*/
55 
57 {
58 protected:
59 
60  // Protected Data
61 
62  //- Reference to the populationBalanceModel
64 
65 
66 public:
67 
68  //- Runtime type information
69  TypeName("binaryBreakupModel");
70 
71 
72  // Declare run-time constructor selection table
73 
75  (
76  autoPtr,
78  dictionary,
79  (
80  const populationBalanceModel& popBal,
81  const dictionary& dict
82  ),
83  (popBal, dict)
84  );
85 
86 
87  //- Class used for the read-construction of
88  // PtrLists of binary breakup models
89  class iNew
90  {
91  const populationBalanceModel& popBal_;
92 
93  public:
94 
95  iNew(const populationBalanceModel& popBal)
96  :
97  popBal_(popBal)
98  {}
99 
101  {
102  word type(is);
103  dictionary dict(is);
104  return binaryBreakupModel::New(type, popBal_, dict);
105  }
106  };
107 
108 
109  // Constructor
110 
112  (
113  const populationBalanceModel& popBal,
114  const dictionary& dict
115  );
116 
118  {
120  return autoPtr<binaryBreakupModel>(nullptr);
121  }
122 
123 
124  // Selector
125 
127  (
128  const word& type,
129  const populationBalanceModel& popBal,
130  const dictionary& dict
131  );
132 
133 
134  //- Destructor
135  virtual ~binaryBreakupModel()
136  {}
137 
138 
139  // Member Functions
140 
141  //- Precompute diameter independent expressions
142  virtual void precompute();
143 
144  //- Add to binary breakupRate
145  virtual void addToBinaryBreakupRate
146  (
147  volScalarField& binaryBreakupRate,
148  const label i,
149  const label j
150  ) = 0;
151 };
152 
153 
154 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
155 
156 } // End namespace diameterModels
157 } // End namespace Foam
158 
159 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
160 
161 #endif
162 
163 // ************************************************************************* //
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< binaryBreakupModel > operator()(Istream &is) const
Base class for binary breakup models that provide a breakup rate between a size class pair directly,...
virtual void addToBinaryBreakupRate(volScalarField &binaryBreakupRate, const label i, const label j)=0
Add to binary breakupRate.
virtual void precompute()
Precompute diameter independent expressions.
const populationBalanceModel & popBal_
Reference to the populationBalanceModel.
binaryBreakupModel(const populationBalanceModel &popBal, const dictionary &dict)
TypeName("binaryBreakupModel")
Runtime type information.
declareRunTimeSelectionTable(autoPtr, binaryBreakupModel, dictionary,(const populationBalanceModel &popBal, const dictionary &dict),(popBal, dict))
autoPtr< binaryBreakupModel > clone() const
static autoPtr< binaryBreakupModel > New(const word &type, 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