binaryBreakupModel.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2017-2018 OpenFOAM Foundation
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 Class
27  Foam::diameterModels::binaryBreakupModel
28 
29 Description
30  Base class for binary breakup models which give the breakup rate between a
31  sizeGroup pair directly, without an explicit expression for the daughter
32  size distribution.
33 
34 SourceFiles
35  binaryBreakupModel.C
36 
37 \*---------------------------------------------------------------------------*/
38 
39 #ifndef binaryBreakupModel_H
40 #define binaryBreakupModel_H
41 
42 #include "populationBalanceModel.H"
43 
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 
46 namespace Foam
47 {
48 namespace diameterModels
49 {
50 
51 /*---------------------------------------------------------------------------*\
52  Class binaryBreakupModel Declaration
53 \*---------------------------------------------------------------------------*/
54 
56 {
57 protected:
58 
59  // Protected data
60 
61  //- Reference to the populationBalanceModel
63 
64 
65 public:
66 
67  //- Runtime type information
68  TypeName("binaryBreakupModel");
69 
70 
71  // Declare run-time constructor selection table
72 
74  (
75  autoPtr,
77  dictionary,
78  (
79  const populationBalanceModel& popBal,
80  const dictionary& dict
81  ),
82  (popBal, dict)
83  );
84 
85 
86  //- Class used for the read-construction of
87  // PtrLists of binary breakup models
88  class iNew
89  {
90  const populationBalanceModel& popBal_;
91 
92  public:
93 
94  iNew(const populationBalanceModel& popBal)
95  :
96  popBal_(popBal)
97  {}
98 
100  {
101  word type(is);
102  dictionary dict(is);
103  return binaryBreakupModel::New(type, popBal_, dict);
104  }
105  };
106 
107 
108  // Constructor
109 
111  (
112  const populationBalanceModel& popBal,
113  const dictionary& dict
114  );
115 
117  {
119  return autoPtr<binaryBreakupModel>(nullptr);
120  }
121 
122 
123  // Selector
124 
126  (
127  const word& type,
128  const populationBalanceModel& popBal,
129  const dictionary& dict
130  );
131 
132 
133  //- Destructor
134  virtual ~binaryBreakupModel() = default;
135 
136 
137  // Member Functions
138 
139  //- Correct diameter independent expressions
140  virtual void correct();
141 
142  //- Add to binary breakupRate
143  virtual void addToBinaryBreakupRate
144  (
145  volScalarField& binaryBreakupRate,
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 // ************************************************************************* //
Foam::diameterModels::binaryBreakupModel::New
static autoPtr< binaryBreakupModel > New(const word &type, const populationBalanceModel &popBal, const dictionary &dict)
Definition: binaryBreakupModel.C:47
populationBalanceModel.H
Foam::diameterModels::binaryBreakupModel::iNew::iNew
iNew(const populationBalanceModel &popBal)
Definition: binaryBreakupModel.H:93
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
Foam::diameterModels::binaryBreakupModel::iNew
Class used for the read-construction of.
Definition: binaryBreakupModel.H:87
Foam::diameterModels::binaryBreakupModel::TypeName
TypeName("binaryBreakupModel")
Runtime type information.
Foam::diameterModels::binaryBreakupModel::iNew::operator()
autoPtr< binaryBreakupModel > operator()(Istream &is) const
Definition: binaryBreakupModel.H:98
Foam::diameterModels::binaryBreakupModel::correct
virtual void correct()
Correct diameter independent expressions.
Definition: binaryBreakupModel.C:84
Foam::diameterModels::binaryBreakupModel::binaryBreakupModel
binaryBreakupModel(const populationBalanceModel &popBal, const dictionary &dict)
Definition: binaryBreakupModel.C:73
Foam::diameterModels::binaryBreakupModel::addToBinaryBreakupRate
virtual void addToBinaryBreakupRate(volScalarField &binaryBreakupRate, const label i, const label j)=0
Add to binary breakupRate.
NotImplemented
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
Definition: error.H:517
Foam::diameterModels::binaryBreakupModel::declareRunTimeSelectionTable
declareRunTimeSelectionTable(autoPtr, binaryBreakupModel, dictionary,(const populationBalanceModel &popBal, const dictionary &dict),(popBal, dict))
Foam::Istream
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Definition: Istream.H:61
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
Foam::diameterModels::populationBalanceModel
Class that solves the univariate population balance equation by means of a class method (also called ...
Definition: populationBalanceModel.H:179
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
Foam::diameterModels::binaryBreakupModel::popBal_
const populationBalanceModel & popBal_
Reference to the populationBalanceModel.
Definition: binaryBreakupModel.H:61
Foam::diameterModels::binaryBreakupModel
Base class for binary breakup models which give the breakup rate between a sizeGroup pair directly,...
Definition: binaryBreakupModel.H:54
Foam::type
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
Definition: MSwindows.C:590
Foam::diameterModels::binaryBreakupModel::clone
autoPtr< binaryBreakupModel > clone() const
Definition: binaryBreakupModel.H:115
Foam::GeometricField< scalar, fvPatchField, volMesh >
Foam::diameterModels::binaryBreakupModel::~binaryBreakupModel
virtual ~binaryBreakupModel()=default
Destructor.