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-------------------------------------------------------------------------------
11License
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
27Class
28 Foam::diameterModels::breakupModel
29
30Description
31 Base class for breakup models which give a total breakup rate and a separate
32 daughter size distribution function.
33
34SourceFiles
35 breakupModel.C
36
37\*---------------------------------------------------------------------------*/
38
39#ifndef breakupModel_H
40#define breakupModel_H
41
44
45// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46
47namespace Foam
48{
49namespace diameterModels
50{
51
52/*---------------------------------------------------------------------------*\
53 Class breakupModel Declaration
54\*---------------------------------------------------------------------------*/
56class breakupModel
57{
58protected:
59
60 // Protected data
61
62 //- Reference to the populationBalanceModel
64
65 //- Dictionary
67
68 //- Daughter size distribution model
70
71
72public:
73
74 //- Runtime type information
75 TypeName("breakupModel");
76
77
78 // Declare run-time constructor selection table
81 (
82 autoPtr,
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:
102 :
103 popBal_(popBal)
104 {}
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 );
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// ************************************************************************* //
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Definition: Istream.H:64
static autoPtr< Time > New()
Construct (dummy) Time - no functionObjects or libraries.
Definition: Time.C:717
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: autoPtr.H:66
Class used for the read-construction of.
Definition: breakupModel.H:95
iNew(const populationBalanceModel &popBal)
Definition: breakupModel.H:100
autoPtr< breakupModel > operator()(Istream &is) const
Definition: breakupModel.H:105
Base class for breakup models which give a total breakup rate and a separate daughter size distributi...
Definition: breakupModel.H:56
const populationBalanceModel & popBal() const
Return reference to the populationBalanceModel.
Definition: breakupModel.H:146
autoPtr< daughterSizeDistributionModel > & dsdPtr()
Return reference to daughter size distribution pointer.
Definition: breakupModel.H:158
virtual void setBreakupRate(volScalarField &breakupRate, const label i)=0
Set total breakupRate.
autoPtr< daughterSizeDistributionModel > dsd_
Daughter size distribution model.
Definition: breakupModel.H:68
const autoPtr< daughterSizeDistributionModel > & dsdPtr() const
Return const-reference to daughter size distribution pointer.
Definition: breakupModel.H:152
virtual void correct()
Correct diameter independent expressions.
Definition: breakupModel.C:87
declareRunTimeSelectionTable(autoPtr, breakupModel, dictionary,(const populationBalanceModel &popBal, const dictionary &dict),(popBal, dict))
dictionary dict_
Dictionary.
Definition: breakupModel.H:65
const populationBalanceModel & popBal_
Reference to the populationBalanceModel.
Definition: breakupModel.H:62
autoPtr< breakupModel > clone() const
Definition: breakupModel.H:122
TypeName("breakupModel")
Runtime type information.
virtual ~breakupModel()=default
Destructor.
static autoPtr< breakupModel > New(const word &modelType, const populationBalanceModel &popBal, const dictionary &dict)
Definition: breakupModel.C:47
Class that solves the univariate population balance equation by means of a class method (also called ...
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
A class for handling words, derived from Foam::string.
Definition: word.H:68
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
Definition: error.H:517
Namespace for OpenFOAM.
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
Definition: MSwindows.C:598
#define declareRunTimeSelectionTable(ptrWrapper, baseType, argNames, argList, parList)
Declare a run-time selection (variables and adder classes)
dictionary dict
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73