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 -------------------------------------------------------------------------------
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 "mathematicalConstants.H"
44 
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 
47 namespace Foam
48 {
49 namespace diameterModels
50 {
51 
52 /*---------------------------------------------------------------------------*\
53  Class IATEsource Declaration
54 \*---------------------------------------------------------------------------*/
55 
56 class IATEsource
57 {
58 
59 protected:
60 
61  // Protected data
62 
63  //- Reference to the IATE this source applies to
64  const IATE& iate_;
65 
66 
67 public:
68 
69  //- Runtime type information
70  TypeName("IATEsource");
71 
72 
73  // Declare run-time constructor selection table
74 
76  (
77  autoPtr,
78  IATEsource,
79  dictionary,
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:
95 
96  iNew(const IATE& iate)
97  :
98  iate_(iate)
99  {}
100 
102  {
103  word type(is);
104  dictionary dict(is);
105  return IATEsource::New(type, iate_, dict);
106  }
107  };
108 
109 
110  // Constructors
111 
112  IATEsource(const IATE& iate)
113  :
114  iate_(iate)
115  {}
116 
117  autoPtr<IATEsource> clone() const
118  {
120  return nullptr;
121  }
122 
123 
124  // Selectors
125 
126  static autoPtr<IATEsource> New
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
139 
140  const phaseModel& phase() const
141  {
142  return iate_.phase();
143  }
144 
145  const twoPhaseSystem& fluid() const
146  {
147  return iate_.phase().fluid();
148  }
149 
150  const phaseModel& otherPhase() const
151  {
152  return phase().otherPhase();
153  }
154 
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;
180 
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 // ************************************************************************* //
Foam::diameterModels::IATEsource::otherPhase
const phaseModel & otherPhase() const
Definition: IATEsource.H:149
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:116
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:144
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:100
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::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:154
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:139
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::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::phaseModel::otherPhase
const phaseModel & otherPhase() const
Return the other phase in this two-phase system.
Definition: phaseModel.C:218
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::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::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:95