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 | Copyright (C) 2013-2015 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::diameterModels::IATEsource
26 
27 Description
28  IATE (Interfacial Area Transport Equation) bubble diameter model
29  run-time selectable sources.
30 
31 SourceFiles
32  IATEsource.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef IATEsource_H
37 #define IATEsource_H
38 
39 #include "IATE.H"
40 #include "twoPhaseSystem.H"
41 #include "mathematicalConstants.H"
42 
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 
45 namespace Foam
46 {
47 namespace diameterModels
48 {
49 
50 /*---------------------------------------------------------------------------*\
51  Class IATEsource Declaration
52 \*---------------------------------------------------------------------------*/
53 
54 class IATEsource
55 {
56 
57 protected:
58 
59  // Protected data
60 
61  //- Reference to the IATE this source applies to
62  const IATE& iate_;
63 
64 
65 public:
66 
67  //- Runtime type information
68  TypeName("IATEsource");
69 
70 
71  // Declare run-time constructor selection table
72 
74  (
75  autoPtr,
76  IATEsource,
77  dictionary,
78  (
79  const IATE& iate,
80  const dictionary& dict
81  ),
82  (iate, dict)
83  );
84 
85 
86  //- Class used for the read-construction of
87  // PtrLists of IATE sources
88  class iNew
89  {
90  const IATE& iate_;
91 
92  public:
93 
94  iNew(const IATE& iate)
95  :
96  iate_(iate)
97  {}
98 
100  {
101  word type(is);
102  dictionary dict(is);
103  return IATEsource::New(type, iate_, dict);
104  }
105  };
106 
107 
108  // Constructors
110  IATEsource(const IATE& iate)
111  :
112  iate_(iate)
113  {}
115  autoPtr<IATEsource> clone() const
116  {
118  return autoPtr<IATEsource>(NULL);
119  }
120 
121 
122  // Selectors
123 
124  static autoPtr<IATEsource> New
125  (
126  const word& type,
127  const IATE& iate,
128  const dictionary& dict
129  );
130 
131 
132  //- Destructor
133  virtual ~IATEsource()
134  {}
135 
136 
137  // Member Functions
139  const phaseModel& phase() const
140  {
141  return iate_.phase();
142  }
144  const twoPhaseSystem& fluid() const
145  {
146  return refCast<const twoPhaseSystem>(iate_.phase().fluid());
147  }
149  const phaseModel& otherPhase() const
150  {
151  return fluid().otherPhase(phase());
152  }
154  scalar phi() const
155  {
156  return 1.0/(36*constant::mathematical::pi);
157  }
158 
159  //- Return the bubble relative velocity
160  tmp<volScalarField> Ur() const;
161 
162  //- Return the bubble turbulent velocity
163  tmp<volScalarField> Ut() const;
164 
165  //- Return the bubble Reynolds number
166  tmp<volScalarField> Re() const;
167 
168  //- Return the bubble drag coefficient
169  tmp<volScalarField> CD() const;
170 
171  //- Return the bubble Morton number
172  tmp<volScalarField> Mo() const;
173 
174  //- Return the bubble Eotvos number
175  tmp<volScalarField> Eo() const;
176 
177  //- Return the bubble Webber number
178  tmp<volScalarField> We() const;
179 
180  virtual tmp<volScalarField> R() const = 0;
181 };
182 
183 
184 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
185 
186 } // End namespace diameterModels
187 } // End namespace Foam
188 
189 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
190 
191 #endif
192 
193 // ************************************************************************* //
declareRunTimeSelectionTable(autoPtr, IATEsource, dictionary,(const IATE &iate, const dictionary &dict),(iate, dict))
static autoPtr< IATEsource > New(const word &type, const IATE &iate, const dictionary &dict)
dictionary dict
IATE (Interfacial Area Transport Equation) bubble diameter model.
Definition: IATE.H:65
tmp< volScalarField > Ur() const
Return the bubble relative velocity.
tmp< volScalarField > Mo() const
Return the bubble Morton number.
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
const phaseModel & phase() const
Definition: IATEsource.H:138
tmp< volScalarField > Re() const
Return the bubble Reynolds number.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
Definition: Istream.H:57
IATE (Interfacial Area Transport Equation) bubble diameter model run-time selectable sources...
Definition: IATEsource.H:53
IATEsource(const IATE &iate)
Definition: IATEsource.H:109
Class which solves the volume fraction equations for two phases.
tmp< volScalarField > CD() const
Return the bubble drag coefficient.
TypeName("IATEsource")
Runtime type information.
A class for handling words, derived from string.
Definition: word.H:59
autoPtr< IATEsource > clone() const
Definition: IATEsource.H:114
autoPtr< IATEsource > operator()(Istream &is) const
Definition: IATEsource.H:98
tmp< volScalarField > We() const
Return the bubble Webber number.
const phaseModel & otherPhase(const phaseModel &phase) const
Constant access the phase not given as an argument.
tmp< volScalarField > Ut() const
Return the bubble turbulent velocity.
Class used for the read-construction of.
Definition: IATEsource.H:87
const phaseModel & otherPhase() const
Definition: IATEsource.H:148
const IATE & iate_
Reference to the IATE this source applies to.
Definition: IATEsource.H:61
fileName::Type type(const fileName &)
Return the file type: DIRECTORY or FILE.
Definition: POSIX.C:461
tmp< volScalarField > Eo() const
Return the bubble Eotvos number.
const phaseModel & phase() const
Return the phase.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:53
A class for managing temporary objects.
Definition: PtrList.H:54
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
Definition: error.H:366
Single incompressible phase derived from the phase-fraction. Used as part of the multiPhaseMixture fo...
Definition: phaseModel.H:53
const phaseSystem & fluid() const
Return the system to which this phase belongs.
const twoPhaseSystem & fluid() const
Definition: IATEsource.H:143
virtual tmp< volScalarField > R() const =0
Namespace for OpenFOAM.
virtual ~IATEsource()
Destructor.
Definition: IATEsource.H:132