IATEsource.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) 2013-2016 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::IATEsource
29
30Description
31 IATE (Interfacial Area Transport Equation) bubble diameter model
32 run-time selectable sources.
33
34SourceFiles
35 IATEsource.C
36
37\*---------------------------------------------------------------------------*/
38
39#ifndef IATEsource_H
40#define IATEsource_H
41
42#include "IATE.H"
44
45// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46
47namespace Foam
48{
49namespace diameterModels
50{
51
52/*---------------------------------------------------------------------------*\
53 Class IATEsource Declaration
54\*---------------------------------------------------------------------------*/
55
56class IATEsource
57{
58
59protected:
60
61 // Protected data
62
63 //- Reference to the IATE this source applies to
64 const IATE& iate_;
65
66
67public:
68
69 //- Runtime type information
70 TypeName("IATEsource");
71
72
73 // Declare run-time constructor selection table
76 (
77 autoPtr,
80 (
81 const IATE& iate,
82 const dictionary& dict
83 ),
84 (iate, dict)
85 );
86
87
88 //- Class used for the read-construction of
89 // PtrLists of IATE sources
90 class iNew
91 {
92 const IATE& iate_;
93
94 public:
96 iNew(const IATE& iate)
97 :
98 iate_(iate)
99 {}
102 {
103 word type(is);
104 dictionary dict(is);
105 return IATEsource::New(type, iate_, dict);
106 }
107 };
108
109
110 // Constructors
112 IATEsource(const IATE& iate)
113 :
114 iate_(iate)
115 {}
118 {
120 return nullptr;
121 }
122
123
124 // Selectors
127 (
128 const word& type,
129 const IATE& iate,
130 const dictionary& dict
131 );
132
133
134 //- Destructor
135 virtual ~IATEsource() = default;
136
137
138 // Member Functions
140 const phaseModel& phase() const
141 {
142 return iate_.phase();
143 }
145 const twoPhaseSystem& fluid() const
146 {
147 return iate_.phase().fluid();
148 }
150 const phaseModel& otherPhase() const
151 {
152 return phase().otherPhase();
153 }
155 scalar phi() const
156 {
157 return 1.0/(36*constant::mathematical::pi);
158 }
159
160 //- Return the bubble relative velocity
161 tmp<volScalarField> Ur() const;
162
163 //- Return the bubble turbulent velocity
164 tmp<volScalarField> Ut() const;
165
166 //- Return the bubble Reynolds number
167 tmp<volScalarField> Re() const;
168
169 //- Return the bubble drag coefficient
170 tmp<volScalarField> CD() const;
171
172 //- Return the bubble Morton number
173 tmp<volScalarField> Mo() const;
174
175 //- Return the bubble Eotvos number
176 tmp<volScalarField> Eo() const;
177
178 //- Return the bubble Webber number
179 tmp<volScalarField> We() const;
181 virtual tmp<volScalarField> R() const = 0;
182};
183
184
185// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
186
187} // End namespace diameterModels
188} // End namespace Foam
189
190// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
191
192#endif
193
194// ************************************************************************* //
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
const phaseModel & phase() const
Return the phase.
IATE (Interfacial Area Transport Equation) bubble diameter model.
Definition: IATE.H:71
Class used for the read-construction of.
Definition: IATEsource.H:91
autoPtr< IATEsource > operator()(Istream &is) const
Definition: IATEsource.H:100
IATE (Interfacial Area Transport Equation) bubble diameter model run-time selectable sources.
Definition: IATEsource.H:57
tmp< volScalarField > CD() const
Return the bubble drag coefficient.
Definition: IATEsource.C:101
tmp< volScalarField > We() const
Return the bubble Webber number.
tmp< volScalarField > Ut() const
Return the bubble turbulent velocity.
TypeName("IATEsource")
Runtime type information.
tmp< volScalarField > Eo() const
Return the bubble Eotvos number.
Definition: IATEsource.C:129
tmp< volScalarField > CD() const
Return the bubble drag coefficient.
tmp< volScalarField > Mo() const
Return the bubble Morton number.
Definition: IATEsource.C:118
tmp< volScalarField > Re() const
Return the bubble Reynolds number.
const phaseModel & phase() const
Definition: IATEsource.H:139
const IATE & iate_
Reference to the IATE this source applies to.
Definition: IATEsource.H:64
virtual tmp< volScalarField > R() const =0
tmp< volScalarField > We() const
Return the bubble Webber number.
Definition: IATEsource.C:140
tmp< volScalarField > Ur() const
Return the bubble relative velocity.
static autoPtr< IATEsource > New(const word &type, const IATE &iate, const dictionary &dict)
const phaseModel & otherPhase() const
Definition: IATEsource.H:149
tmp< volScalarField > Mo() const
Return the bubble Morton number.
declareRunTimeSelectionTable(autoPtr, IATEsource, dictionary,(const IATE &iate, const dictionary &dict),(iate, dict))
tmp< volScalarField > Eo() const
Return the bubble Eotvos number.
autoPtr< IATEsource > clone() const
Definition: IATEsource.H:116
tmp< volScalarField > Ur() const
Return the bubble relative velocity.
Definition: IATEsource.C:75
tmp< volScalarField > Re() const
Return the bubble Reynolds number.
Definition: IATEsource.C:96
virtual ~IATEsource()=default
Destructor.
static autoPtr< IATEsource > New(const word &type, const IATE &iate, const dictionary &dict)
Definition: IATEsource.C:50
tmp< volScalarField > Ut() const
Return the bubble turbulent velocity.
Definition: IATEsource.C:91
const twoPhaseSystem & fluid() const
Definition: IATEsource.H:144
IATEsource(const IATE &iate)
Definition: IATEsource.H:111
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
Single incompressible phase derived from the phase-fraction. Used as part of the multiPhaseMixture fo...
Definition: phaseModel.H:61
const phaseSystem & fluid() const
Return the system to which this phase belongs.
Definition: phaseModel.C:148
const phaseModel & otherPhase() const
Return the other phase in this two-phase system.
Definition: phaseModel.C:218
A class for managing temporary objects.
Definition: tmp.H:65
Class which solves the volume fraction equations for two phases.
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
constexpr scalar pi(M_PI)
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