phasePair.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) 2014 OpenFOAM Foundation
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 Class
27  Foam::phasePair
28 
29 Description
30 
31 SourceFiles
32  phasePair.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef phasePair_H
37 #define phasePair_H
38 
39 #include "phaseModel.H"
40 #include "phasePairKey.H"
41 
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 
44 namespace Foam
45 {
46 
47 /*---------------------------------------------------------------------------*\
48  Class phasePair Declaration
49 \*---------------------------------------------------------------------------*/
50 
51 class phasePair
52 :
53  public phasePairKey
54 {
55 public:
56 
57  // Hash table types
58 
59  //- Dictionary hash table
61  dictTable;
62 
63  //- Scalar hash table
66 
67 
68 private:
69 
70  // Private data
71 
72  //- Phase 1
73  const phaseModel& phase1_;
74 
75  //- Phase 2
76  const phaseModel& phase2_;
77 
78  //- Gravitational acceleration
79  const dimensionedVector& g_;
80 
81  //- Surface tension coefficient
82  const dimensionedScalar sigma_;
83 
84 
85  // Private member functions
86 
87  // Etvos number for given diameter
88  tmp<volScalarField> EoH(const volScalarField& d) const;
89 
90 public:
91 
92  // Constructors
93 
94  //- Construct from two phases, gravity and surface tension table
95  phasePair
96  (
97  const phaseModel& phase1,
98  const phaseModel& phase2,
99  const dimensionedVector& g,
100  const scalarTable& sigmaTable,
101  const bool ordered = false
102  );
103 
104 
105  //- Destructor
106  virtual ~phasePair();
107 
108 
109  // Member Functions
110 
111  //- Dispersed phase
112  virtual const phaseModel& dispersed() const;
113 
114  //- Continuous phase
115  virtual const phaseModel& continuous() const;
116 
117  //- Pair name
118  virtual word name() const;
119 
120  //- Average density
121  tmp<volScalarField> rho() const;
122 
123  //- Relative velocity magnitude
124  tmp<volScalarField> magUr() const;
125 
126  //- Relative velocity
127  tmp<volVectorField> Ur() const;
128 
129  //- Reynolds number
130  tmp<volScalarField> Re() const;
131 
132  //- Prandtl number
133  tmp<volScalarField> Pr() const;
134 
135  //- Eotvos number
136  tmp<volScalarField> Eo() const;
137 
138  //- Eotvos number based on hydraulic diameter type 1
139  tmp<volScalarField> EoH1() const;
140 
141  //- Eotvos number based on hydraulic diameter type 2
142  tmp<volScalarField> EoH2() const;
143 
144  //- Morton Number
145  tmp<volScalarField> Mo() const;
146 
147  //- Takahashi Number
148  tmp<volScalarField> Ta() const;
149 
150  //- Aspect ratio
151  virtual tmp<volScalarField> E() const;
152 
153  // Access
154 
155  // Phase 1
156  inline const phaseModel& phase1() const;
157 
158  // Phase 2
159  inline const phaseModel& phase2() const;
160 
161  // Gravitational acceleration
162  inline const dimensionedVector& g() const;
163 
164  // Surface tension coefficient
165  inline const dimensionedScalar& sigma() const;
166 };
167 
168 
169 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
170 
171 } // End namespace Foam
172 
173 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
174 
175 #include "phasePairI.H"
176 
177 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
178 
179 #endif
180 
181 // ************************************************************************* //
Foam::phasePair::Pr
tmp< volScalarField > Pr() const
Definition: phasePair.C:125
phasePairI.H
Foam::phaseModel
Single incompressible phase derived from the phase-fraction. Used as part of the multiPhaseMixture fo...
Definition: phaseModel.H:49
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:63
Foam::phasePair::Re
tmp< volScalarField > Re() const
Definition: phasePair.C:119
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:57
Foam::phasePair::dispersed
virtual const phaseModel & dispersed() const
Definition: phasePair.C:65
Foam::phasePair::Ur
tmp< volVectorField > Ur() const
Definition: phasePair.C:113
Foam::phasePair::sigma
tmp< volScalarField > sigma() const
Definition: phasePair.C:163
Foam::phasePair::Ta
tmp< volScalarField > Ta() const
Definition: phasePair.C:187
Foam::phasePair::g
const uniformDimensionedVectorField & g() const
Definition: phasePairI.H:86
Foam::phasePairKey::ordered
bool ordered() const noexcept
Definition: phasePairKey.H:94
Foam::phasePair::~phasePair
virtual ~phasePair()=default
Definition: phasePair.C:59
phasePairKey.H
Foam::phasePair::Eo
tmp< volScalarField > Eo() const
Definition: phasePair.C:135
Foam::dimensioned
Generic dimensioned Type class.
Definition: dimensionedScalarFwd.H:36
Foam
Definition: atmBoundaryLayer.C:26
Foam::phasePair::scalarTable
HashTable< scalar, phasePairKey, phasePairKey::hash > scalarTable
Definition: phasePair.H:60
Foam::phasePair::rho
tmp< volScalarField > rho() const
Definition: phasePair.C:101
Foam::HashTable< scalar, phasePairKey, phasePairKey::hash >
Foam::phasePair::dictTable
HashTable< dictionary, phasePairKey, phasePairKey::hash > dictTable
Definition: phasePair.H:56
Foam::phasePair::name
virtual word name() const
Definition: phasePair.C:62
Foam::phasePair::phase2
const phaseModel & phase2() const
Definition: phasePairI.H:29
Foam::phasePair::E
virtual tmp< volScalarField > E() const
Definition: phasePair.C:193
Foam::phasePair::magUr
tmp< volScalarField > magUr() const
Definition: phasePair.C:107
Foam::phasePair::Mo
tmp< volScalarField > Mo() const
Definition: phasePair.C:173
Foam::phasePair::phase1
const phaseModel & phase1() const
Definition: phasePairI.H:23
Foam::GeometricField
Generic GeometricField class.
Definition: areaFieldsFwd.H:49
Foam::phasePair::continuous
virtual const phaseModel & continuous() const
Definition: phasePair.C:75
Foam::phasePair::EoH2
tmp< volScalarField > EoH2() const
Definition: phasePair.C:152
Foam::phasePair::EoH1
tmp< volScalarField > EoH1() const
Definition: phasePair.C:141
Foam::phasePair::phasePair
phasePair(const phaseModel &phase1, const phaseModel &phase2, const bool ordered=false)
Definition: phasePair.C:28