breakupModel.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  Copyright (C) 2019 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
12  This file is part of OpenFOAM.
13 
14  OpenFOAM is free software: you can redistribute it and/or modify it
15  under the terms of the GNU General Public License as published by
16  the Free Software Foundation, either version 3 of the License, or
17  (at your option) any later version.
18 
19  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22  for more details.
23 
24  You should have received a copy of the GNU General Public License
25  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26 
27 Class
28  Foam::diameterModels::breakupModel
29 
30 Description
31  Base class for breakup models which give a total breakup rate and a separate
32  daughter size distribution function.
33 
34 SourceFiles
35  breakupModel.C
36 
37 \*---------------------------------------------------------------------------*/
38 
39 #ifndef breakupModel_H
40 #define breakupModel_H
41 
42 #include "populationBalanceModel.H"
44 
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 
47 namespace Foam
48 {
49 namespace diameterModels
50 {
51 
52 /*---------------------------------------------------------------------------*\
53  Class breakupModel Declaration
54 \*---------------------------------------------------------------------------*/
55 
56 class breakupModel
57 {
58 protected:
59 
60  // Protected data
61 
62  //- Reference to the populationBalanceModel
64 
65  //- Dictionary
67 
68  //- Daughter size distribution model
70 
71 
72 public:
73 
74  //- Runtime type information
75  TypeName("breakupModel");
76 
77 
78  // Declare run-time constructor selection table
79 
81  (
82  autoPtr,
84  dictionary,
85  (
87  const dictionary& dict
88  ),
89  (popBal, dict)
90  );
91 
92 
93  //- Class used for the read-construction of
94  // PtrLists of breakup models
95  class iNew
96  {
97  const populationBalanceModel& popBal_;
98 
99  public:
100 
102  :
103  popBal_(popBal)
104  {}
105 
107  {
108  word type(is);
109  dictionary dict(is);
110  return breakupModel::New(type, popBal_, dict);
111  }
112  };
113 
114 
115  // Constructor
116 
118  (
120  const dictionary& dict
121  );
122 
124  {
126  return nullptr;
127  }
128 
129 
130  // Selector
131 
133  (
134  const word& modelType,
136  const dictionary& dict
137  );
138 
139 
140  //- Destructor
141  virtual ~breakupModel() = default;
142 
143 
144  // Member Functions
145 
146  //- Return reference to the populationBalanceModel
147  const populationBalanceModel& popBal() const
148  {
149  return popBal_;
150  }
151 
152  //- Return const-reference to daughter size distribution pointer
154  {
155  return dsd_;
156  }
157 
158  //- Return reference to daughter size distribution pointer
160  {
161  return dsd_;
162  }
163 
164  //- Correct diameter independent expressions
165  virtual void correct();
166 
167  //- Set total breakupRate
168  virtual void setBreakupRate
169  (
170  volScalarField& breakupRate,
171  const label i
172  ) = 0;
173 };
174 
175 
176 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
177 
178 } // End namespace diameterModels
179 } // End namespace Foam
180 
181 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
182 
183 #endif
184 
185 // ************************************************************************* //
populationBalanceModel.H
Foam::diameterModels::breakupModel::breakupModel
breakupModel(const populationBalanceModel &popBal, const dictionary &dict)
Definition: breakupModel.C:73
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
Foam::diameterModels::breakupModel::TypeName
TypeName("breakupModel")
Runtime type information.
Foam::diameterModels::breakupModel::dsd_
autoPtr< daughterSizeDistributionModel > dsd_
Daughter size distribution model.
Definition: breakupModel.H:68
Foam::diameterModels::breakupModel::iNew::iNew
iNew(const populationBalanceModel &popBal)
Definition: breakupModel.H:100
Foam::diameterModels::breakupModel::popBal_
const populationBalanceModel & popBal_
Reference to the populationBalanceModel.
Definition: breakupModel.H:62
Foam::diameterModels::breakupModel::~breakupModel
virtual ~breakupModel()=default
Destructor.
Foam::diameterModels::breakupModel::dsdPtr
const autoPtr< daughterSizeDistributionModel > & dsdPtr() const
Return const-reference to daughter size distribution pointer.
Definition: breakupModel.H:152
Foam::diameterModels::breakupModel::dsdPtr
autoPtr< daughterSizeDistributionModel > & dsdPtr()
Return reference to daughter size distribution pointer.
Definition: breakupModel.H:158
daughterSizeDistributionModel.H
Foam::diameterModels::breakupModel::New
static autoPtr< breakupModel > New(const word &modelType, const populationBalanceModel &popBal, const dictionary &dict)
Definition: breakupModel.C:47
NotImplemented
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
Definition: error.H:517
Foam::diameterModels::breakupModel::popBal
const populationBalanceModel & popBal() const
Return reference to the populationBalanceModel.
Definition: breakupModel.H:146
Foam::Istream
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Definition: Istream.H:61
Foam::diameterModels::breakupModel::iNew::operator()
autoPtr< breakupModel > operator()(Istream &is) const
Definition: breakupModel.H:105
Foam::diameterModels::breakupModel::correct
virtual void correct()
Correct diameter independent expressions.
Definition: breakupModel.C:87
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::diameterModels::breakupModel::declareRunTimeSelectionTable
declareRunTimeSelectionTable(autoPtr, breakupModel, dictionary,(const populationBalanceModel &popBal, const dictionary &dict),(popBal, dict))
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
Foam::diameterModels::breakupModel::dict_
dictionary dict_
Dictionary.
Definition: breakupModel.H:65
Foam::diameterModels::populationBalanceModel
Class that solves the univariate population balance equation by means of a class method (also called ...
Definition: populationBalanceModel.H:179
Foam::diameterModels::breakupModel::clone
autoPtr< breakupModel > clone() const
Definition: breakupModel.H:122
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::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::breakupModel::setBreakupRate
virtual void setBreakupRate(volScalarField &breakupRate, const label i)=0
Set total breakupRate.
Foam::diameterModels::breakupModel
Base class for breakup models which give a total breakup rate and a separate daughter size distributi...
Definition: breakupModel.H:55
Foam::GeometricField< scalar, fvPatchField, volMesh >
Foam::diameterModels::breakupModel::iNew
Class used for the read-construction of.
Definition: breakupModel.H:94