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-2016 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 "mathematicalConstants.H"
41 
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 
44 namespace Foam
45 {
46 namespace diameterModels
47 {
48 
49 /*---------------------------------------------------------------------------*\
50  Class IATEsource Declaration
51 \*---------------------------------------------------------------------------*/
52 
53 class IATEsource
54 {
55 
56 protected:
57 
58  // Protected data
59 
60  //- Reference to the IATE this source applies to
61  const IATE& iate_;
62 
63 
64 public:
65 
66  //- Runtime type information
67  TypeName("IATEsource");
68 
69 
70  // Declare run-time constructor selection table
71 
73  (
74  autoPtr,
75  IATEsource,
76  dictionary,
77  (
78  const IATE& iate,
79  const dictionary& dict
80  ),
81  (iate, dict)
82  );
83 
84 
85  //- Class used for the read-construction of
86  // PtrLists of IATE sources
87  class iNew
88  {
89  const IATE& iate_;
90 
91  public:
92 
93  iNew(const IATE& iate)
94  :
95  iate_(iate)
96  {}
97 
99  {
100  word type(is);
101  dictionary dict(is);
102  return IATEsource::New(type, iate_, dict);
103  }
104  };
105 
106 
107  // Constructors
109  IATEsource(const IATE& iate)
110  :
111  iate_(iate)
112  {}
114  autoPtr<IATEsource> clone() const
115  {
117  return autoPtr<IATEsource>(nullptr);
118  }
119 
120 
121  // Selectors
122 
123  static autoPtr<IATEsource> New
124  (
125  const word& type,
126  const IATE& iate,
127  const dictionary& dict
128  );
129 
130 
131  //- Destructor
132  virtual ~IATEsource()
133  {}
134 
135 
136  // Member Functions
138  const phaseModel& phase() const
139  {
140  return iate_.phase();
141  }
143  const twoPhaseSystem& fluid() const
144  {
145  return iate_.phase().fluid();
146  }
148  const phaseModel& otherPhase() const
149  {
150  return phase().otherPhase();
151  }
153  scalar phi() const
154  {
155  return 1.0/(36*constant::mathematical::pi);
156  }
157 
158  //- Return the bubble relative velocity
159  tmp<volScalarField> Ur() const;
160 
161  //- Return the bubble turbulent velocity
162  tmp<volScalarField> Ut() const;
163 
164  //- Return the bubble Reynolds number
165  tmp<volScalarField> Re() const;
166 
167  //- Return the bubble drag coefficient
168  tmp<volScalarField> CD() const;
169 
170  //- Return the bubble Morton number
171  tmp<volScalarField> Mo() const;
172 
173  //- Return the bubble Eotvos number
174  tmp<volScalarField> Eo() const;
175 
176  //- Return the bubble Webber number
177  tmp<volScalarField> We() const;
178 
179  virtual tmp<volScalarField> R() const = 0;
180 };
181 
182 
183 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
184 
185 } // End namespace diameterModels
186 } // End namespace Foam
187 
188 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
189 
190 #endif
191 
192 // ************************************************************************* //
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 > Ut() const
Return the bubble turbulent velocity.
const twoPhaseSystem & fluid() const
Definition: IATEsource.H:143
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
Definition: Istream.H:57
const phaseModel & otherPhase() const
Definition: IATEsource.H:148
tmp< volScalarField > We() const
Return the bubble Webber number.
tmp< volScalarField > Eo() const
Return the bubble Eotvos number.
IATEsource(const IATE &iate)
Definition: IATEsource.H:109
Class which solves the volume fraction equations for two phases.
TypeName("IATEsource")
Runtime type information.
A class for handling words, derived from string.
Definition: word.H:59
tmp< volScalarField > CD() const
Return the bubble drag coefficient.
const phaseModel & otherPhase() const
Return the other phase in this two-phase system.
const phaseModel & phase() const
Definition: IATEsource.H:138
tmp< volScalarField > Ur() const
Return the bubble relative velocity.
tmp< volScalarField > Re() const
Return the bubble Reynolds number.
fileName::Type type(const fileName &, const bool followLink=true)
Return the file type: DIRECTORY or FILE.
Definition: POSIX.C:485
const IATE & iate_
Reference to the IATE this source applies to.
Definition: IATEsource.H:61
tmp< volScalarField > Mo() const
Return the bubble Morton number.
autoPtr< IATEsource > operator()(Istream &is) const
Definition: IATEsource.H:98
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:52
A class for managing temporary objects.
Definition: PtrList.H:53
#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
virtual tmp< volScalarField > R() const =0
autoPtr< IATEsource > clone() const
Definition: IATEsource.H:114
Namespace for OpenFOAM.
virtual ~IATEsource()
Destructor.
Definition: IATEsource.H:132