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-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::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"
43#include "twoPhaseSystem.H"
45
46// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47
48namespace Foam
49{
50namespace diameterModels
51{
52
53/*---------------------------------------------------------------------------*\
54 Class IATEsource Declaration
55\*---------------------------------------------------------------------------*/
57class IATEsource
58{
59
60protected:
61
62 // Protected data
63
64 //- Reference to the IATE this source applies to
65 const IATE& iate_;
66
67
68public:
69
70 //- Runtime type information
71 TypeName("IATEsource");
72
73
74 // Declare run-time constructor selection table
77 (
78 autoPtr,
81 (
82 const IATE& iate,
83 const dictionary& dict
84 ),
85 (iate, dict)
86 );
87
88
89 //- Class used for the read-construction of
90 // PtrLists of IATE sources
91 class iNew
92 {
93 const IATE& iate_;
94
95 public:
97 iNew(const IATE& iate)
98 :
99 iate_(iate)
100 {}
103 {
104 word type(is);
105 dictionary dict(is);
106 return IATEsource::New(type, iate_, dict);
107 }
108 };
109
110
111 // Constructors
113 IATEsource(const IATE& iate)
114 :
115 iate_(iate)
116 {}
119 {
121 return autoPtr<IATEsource>(nullptr);
122 }
123
124
125 // Selectors
126
128 (
129 const word& type,
130 const IATE& iate,
131 const dictionary& dict
132 );
133
134
135 //- Destructor
136 virtual ~IATEsource() = default;
137
138
139 // Member Functions
141 const phaseModel& phase() const
142 {
143 return iate_.phase();
144 }
146 const twoPhaseSystem& fluid() const
147 {
148 return refCast<const twoPhaseSystem>(iate_.phase().fluid());
149 }
151 const phaseModel& otherPhase() const
152 {
153 return fluid().otherPhase(phase());
154 }
156 scalar phi() const
157 {
158 return 1.0/(36*constant::mathematical::pi);
159 }
160
161 //- Return the bubble relative velocity
162 tmp<volScalarField> Ur() const;
163
164 //- Return the bubble turbulent velocity
165 tmp<volScalarField> Ut() const;
166
167 //- Return the bubble Reynolds number
168 tmp<volScalarField> Re() const;
169
170 //- Return the bubble drag coefficient
171 tmp<volScalarField> CD() const;
172
173 //- Return the bubble Morton number
174 tmp<volScalarField> Mo() const;
175
176 //- Return the bubble Eotvos number
177 tmp<volScalarField> Eo() const;
178
179 //- Return the bubble Webber number
180 tmp<volScalarField> We() const;
182 virtual tmp<fvScalarMatrix> R
183 (
184 const volScalarField& alphai,
185 volScalarField& kappai
186 ) const = 0;
187};
188
189
190// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
191
192} // End namespace diameterModels
193} // End namespace Foam
194
195// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
196
197#endif
198
199// ************************************************************************* //
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:101
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
TypeName("IATEsource")
Runtime type information.
tmp< volScalarField > Eo() const
Return the bubble Eotvos number.
Definition: IATEsource.C:129
tmp< volScalarField > Mo() const
Return the bubble Morton number.
Definition: IATEsource.C:118
const phaseModel & phase() const
Definition: IATEsource.H:140
virtual tmp< fvScalarMatrix > R(const volScalarField &alphai, volScalarField &kappai) const =0
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
const phaseModel & otherPhase() const
Definition: IATEsource.H:150
declareRunTimeSelectionTable(autoPtr, IATEsource, dictionary,(const IATE &iate, const dictionary &dict),(iate, dict))
autoPtr< IATEsource > clone() const
Definition: IATEsource.H:117
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:145
IATEsource(const IATE &iate)
Definition: IATEsource.H:112
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
A class for managing temporary objects.
Definition: tmp.H:65
Class which solves the volume fraction equations for two phases.
const phaseModel & otherPhase(const phaseModel &phase) const
Return the phase not given as an argument.
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