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