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 -------------------------------------------------------------------------------
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::IATEsource
29 
30 Description
31  IATE (Interfacial Area Transport Equation) bubble diameter model
32  run-time selectable sources.
33 
34 SourceFiles
35  IATEsource.C
36 
37 \*---------------------------------------------------------------------------*/
38 
39 #ifndef IATEsource_H
40 #define IATEsource_H
41 
42 #include "IATE.H"
43 #include "twoPhaseSystem.H"
44 #include "mathematicalConstants.H"
45 
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 
48 namespace Foam
49 {
50 namespace diameterModels
51 {
52 
53 /*---------------------------------------------------------------------------*\
54  Class IATEsource Declaration
55 \*---------------------------------------------------------------------------*/
56 
57 class IATEsource
58 {
59 
60 protected:
61 
62  // Protected data
63 
64  //- Reference to the IATE this source applies to
65  const IATE& iate_;
66 
67 
68 public:
69 
70  //- Runtime type information
71  TypeName("IATEsource");
72 
73 
74  // Declare run-time constructor selection table
75 
77  (
78  autoPtr,
79  IATEsource,
80  dictionary,
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:
96 
97  iNew(const IATE& iate)
98  :
99  iate_(iate)
100  {}
101 
103  {
104  word type(is);
105  dictionary dict(is);
106  return IATEsource::New(type, iate_, dict);
107  }
108  };
109 
110 
111  // Constructors
112 
113  IATEsource(const IATE& iate)
114  :
115  iate_(iate)
116  {}
117 
118  autoPtr<IATEsource> clone() const
119  {
121  return autoPtr<IATEsource>(nullptr);
122  }
123 
124 
125  // Selectors
126 
127  static autoPtr<IATEsource> New
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
140 
141  const phaseModel& phase() const
142  {
143  return iate_.phase();
144  }
145 
146  const twoPhaseSystem& fluid() const
147  {
148  return refCast<const twoPhaseSystem>(iate_.phase().fluid());
149  }
150 
151  const phaseModel& otherPhase() const
152  {
153  return fluid().otherPhase(phase());
154  }
155 
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;
181 
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 // ************************************************************************* //
Foam::diameterModels::IATEsource::otherPhase
const phaseModel & otherPhase() const
Definition: IATEsource.H:150
Foam::diameterModels::IATEsource::IATEsource
IATEsource(const IATE &iate)
Definition: IATEsource.H:112
Foam::phaseModel
Single incompressible phase derived from the phase-fraction. Used as part of the multiPhaseMixture fo...
Definition: phaseModel.H:54
mathematicalConstants.H
Foam::diameterModels::IATEsource::clone
autoPtr< IATEsource > clone() const
Definition: IATEsource.H:117
Foam::diameterModels::IATEsource::We
tmp< volScalarField > We() const
Return the bubble Webber number.
Definition: IATEsource.C:140
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
Foam::twoPhaseSystem
Class which solves the volume fraction equations for two phases.
Definition: twoPhaseSystem.H:53
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Foam::diameterModels::IATEsource::fluid
const twoPhaseSystem & fluid() const
Definition: IATEsource.H:145
Foam::diameterModels::IATEsource::Eo
tmp< volScalarField > Eo() const
Return the bubble Eotvos number.
Definition: IATEsource.C:129
Foam::diameterModels::IATE
IATE (Interfacial Area Transport Equation) bubble diameter model.
Definition: IATE.H:68
Foam::diameterModels::IATEsource::R
virtual tmp< volScalarField > R() const =0
NotImplemented
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
Definition: error.H:517
Foam::diameterModels::IATEsource::iNew::operator()
autoPtr< IATEsource > operator()(Istream &is) const
Definition: IATEsource.H:101
Foam::diameterModels::IATEsource::Re
tmp< volScalarField > Re() const
Return the bubble Reynolds number.
Definition: IATEsource.C:96
Foam::Istream
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Definition: Istream.H:61
Foam::twoPhaseSystem::otherPhase
const phaseModel & otherPhase(const phaseModel &phase) const
Return the phase not given as an argument.
Definition: twoPhaseSystemI.H:55
Foam::diameterModels::IATEsource::CD
tmp< volScalarField > CD() const
Return the bubble drag coefficient.
Definition: IATEsource.C:101
Foam::diameterModels::IATEsource::phi
scalar phi() const
Definition: IATEsource.H:155
Foam::diameterModels::IATEsource::declareRunTimeSelectionTable
declareRunTimeSelectionTable(autoPtr, IATEsource, dictionary,(const IATE &iate, const dictionary &dict),(iate, dict))
Foam::diameterModels::IATEsource::Ur
tmp< volScalarField > Ur() const
Return the bubble relative velocity.
Definition: IATEsource.C:75
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::diameterModels::IATEsource::Mo
tmp< volScalarField > Mo() const
Return the bubble Morton number.
Definition: IATEsource.C:118
Foam::diameterModels::IATEsource::phase
const phaseModel & phase() const
Definition: IATEsource.H:140
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
Foam::diameterModels::IATEsource::~IATEsource
virtual ~IATEsource()=default
Destructor.
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::diameterModels::IATEsource::TypeName
TypeName("IATEsource")
Runtime type information.
Foam::diameterModels::IATEsource
IATE (Interfacial Area Transport Equation) bubble diameter model run-time selectable sources.
Definition: IATEsource.H:56
Foam::diameterModels::IATEsource::Ut
tmp< volScalarField > Ut() const
Return the bubble turbulent velocity.
Definition: IATEsource.C:91
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
Foam::constant::mathematical::pi
constexpr scalar pi(M_PI)
Foam::diameterModels::IATEsource::iate_
const IATE & iate_
Reference to the IATE this source applies to.
Definition: IATEsource.H:64
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::IATEsource::iNew
Class used for the read-construction of.
Definition: IATEsource.H:90
Foam::phaseModel::fluid
const phaseSystem & fluid() const
Return the system to which this phase belongs.
Definition: phaseModel.C:100
Foam::diameterModels::IATEsource::New
static autoPtr< IATEsource > New(const word &type, const IATE &iate, const dictionary &dict)
Definition: IATEsource.C:50
Foam::GeometricField< scalar, fvPatchField, volMesh >
Foam::diameterModel::phase
const phaseModel & phase() const
Return the phase.
Definition: diameterModel.H:116
Foam::diameterModels::IATEsource::iNew::iNew
iNew(const IATE &iate)
Definition: IATEsource.H:96