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) 2011-2016 OpenFOAM Foundation
9 Copyright (C) 2020 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::BreakupModel
29
30Group
31 grpLagrangianIntermediateBreakupSubModels
32
33Description
34 Templated break-up model class
35
36SourceFiles
37 BreakupModel.C
38 BreakupModelNew.C
39
40\*---------------------------------------------------------------------------*/
41
42#ifndef BreakupModel_H
43#define BreakupModel_H
44
45#include "IOdictionary.H"
46#include "autoPtr.H"
48
49// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
50
51namespace Foam
52{
53
54/*---------------------------------------------------------------------------*\
55 Class BreakupModel Declaration
56\*---------------------------------------------------------------------------*/
57
58template<class CloudType>
59class BreakupModel
60:
61 public CloudSubModelBase<CloudType>
62{
63
64protected:
65
66 // Protected data
70 scalar y0_;
71 scalar yDot0_;
73 scalar TABComega_;
74 scalar TABCmu_;
75 scalar TABtwoWeCrit_;
76
77
78public:
79
80 //- Runtime type information
81 TypeName("breakupModel");
82
83 //- Declare runtime constructor selection table
85 (
86 autoPtr,
89 (
90 const dictionary& dict,
92 ),
93 (dict, owner)
94 );
95
96
97 // Constructors
98
99 //- Construct null from owner
101
102 //- Construct from dictionary
104 (
105 const dictionary& dict,
107 const word& type,
108 bool solveOscillationEq = false
109 );
110
111 //- Construct copy
113
114 //- Construct and return a clone
115 virtual autoPtr<BreakupModel<CloudType>> clone() const = 0;
116
117
118 //- Destructor
119 virtual ~BreakupModel();
120
121
122 //- Selector
124 (
125 const dictionary& dict,
127 );
128
129
130 // Access
132 inline bool solveOscillationEq() const
133 {
134 return solveOscillationEq_;
135 }
137 inline const scalar& y0() const
138 {
139 return y0_;
140 }
142 inline const scalar& yDot0() const
143 {
144 return yDot0_;
145 }
147 inline const scalar& TABComega() const
148 {
149 return TABComega_;
150 }
152 inline const scalar& TABCmu() const
153 {
154 return TABCmu_;
155 }
157 inline const scalar& TABtwoWeCrit() const
158 {
159 return TABtwoWeCrit_;
160 }
161
162
163 // Member Functions
164
165 //- Update the parcel properties and return true if a child parcel
166 // should be added
167 virtual bool update
168 (
169 const scalar dt,
170 const vector& g,
171 scalar& d,
172 scalar& tc,
173 scalar& ms,
174 scalar& nParticle,
175 scalar& KHindex,
176 scalar& y,
177 scalar& yDot,
178 const scalar d0,
179 const scalar rho,
180 const scalar mu,
181 const scalar sigma,
182 const vector& U,
183 const scalar rhoc,
184 const scalar muc,
185 const vector& Urel,
186 const scalar Urmag,
187 const scalar tMom,
188 scalar& dChild,
189 scalar& massChild
190 ) = 0;
191};
192
193
194// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
195
196} // End namespace Foam
197
198// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
200#define makeBreakupModel(CloudType) \
201 \
202 typedef Foam::CloudType::sprayCloudType sprayCloudType; \
203 defineNamedTemplateTypeNameAndDebug \
204 ( \
205 Foam::BreakupModel<sprayCloudType>, \
206 0 \
207 ); \
208 \
209 namespace Foam \
210 { \
211 defineTemplateRunTimeSelectionTable \
212 ( \
213 BreakupModel<sprayCloudType>, \
214 dictionary \
215 ); \
216 }
217
219#define makeBreakupModelType(SS, CloudType) \
220 \
221 typedef Foam::CloudType::sprayCloudType sprayCloudType; \
222 defineNamedTemplateTypeNameAndDebug(Foam::SS<sprayCloudType>, 0); \
223 \
224 Foam::BreakupModel<sprayCloudType>:: \
225 adddictionaryConstructorToTable<Foam::SS<sprayCloudType>> \
226 add##SS##CloudType##sprayCloudType##ConstructorToTable_;
227
228
229// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
230
231#ifdef NoRepository
232 #include "BreakupModel.C"
233#endif
234
235// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
236
237#endif
238
239// ************************************************************************* //
scalar y
const uniformDimensionedVectorField & g
Templated break-up model class.
Definition: BreakupModel.H:61
static autoPtr< BreakupModel< CloudType > > New(const dictionary &dict, CloudType &owner)
Selector.
declareRunTimeSelectionTable(autoPtr, BreakupModel, dictionary,(const dictionary &dict, CloudType &owner),(dict, owner))
Declare runtime constructor selection table.
const scalar & TABCmu() const
Definition: BreakupModel.H:151
const scalar & y0() const
Definition: BreakupModel.H:136
const scalar & TABtwoWeCrit() const
Definition: BreakupModel.H:156
virtual ~BreakupModel()
Destructor.
Definition: BreakupModel.C:97
const scalar & yDot0() const
Definition: BreakupModel.H:141
const scalar & TABComega() const
Definition: BreakupModel.H:146
TypeName("breakupModel")
Runtime type information.
bool solveOscillationEq() const
Definition: BreakupModel.H:131
virtual autoPtr< BreakupModel< CloudType > > clone() const =0
Construct and return a clone.
Base class for cloud sub-models.
const CloudType & owner() const
Return const access to the owner cloud.
Templated base class for dsmc cloud.
Definition: DSMCCloud.H:75
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: autoPtr.H:66
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
const dictionary & dict() const
Return const access to the cloud dictionary.
Definition: subModelBase.C:113
A class for handling words, derived from Foam::string.
Definition: word.H:68
U
Definition: pEqn.H:72
const volScalarField & mu
mesh update()
Urel
Definition: pEqn.H:56
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
Macros to ease declaration of run-time selection tables.
#define declareRunTimeSelectionTable(ptrWrapper, baseType, argNames, argList, parList)
Declare a run-time selection (variables and adder classes)
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73