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
Prandtl number.
Definition: phasePair.C:132
phasePairI.H
Foam::phaseModel
Single incompressible phase derived from the phase-fraction. Used as part of the multiPhaseMixture fo...
Definition: phaseModel.H:54
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
Foam::phasePair::Re
tmp< volScalarField > Re() const
Reynolds number.
Definition: phasePair.C:126
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Foam::phasePair::dispersed
virtual const phaseModel & dispersed() const
Dispersed phase.
Definition: phasePair.C:72
Foam::phasePair::Ur
tmp< volVectorField > Ur() const
Relative velocity.
Definition: phasePair.C:120
Foam::phasePair::sigma
tmp< volScalarField > sigma() const
Surface tension coefficient.
Definition: phasePair.C:170
Foam::phasePair::Ta
tmp< volScalarField > Ta() const
Takahashi Number.
Definition: phasePair.C:194
Foam::phasePair::g
const uniformDimensionedVectorField & g() const
Return gravitation acceleration.
Definition: phasePairI.H:93
Foam::phasePairKey::ordered
bool ordered() const noexcept
Return the ordered flag.
Definition: phasePairKey.H:98
Foam::phasePair::~phasePair
virtual ~phasePair()=default
Destructor.
Definition: phasePair.C:66
phasePairKey.H
Foam::phasePair::Eo
tmp< volScalarField > Eo() const
Eotvos number.
Definition: phasePair.C:142
Foam::dimensioned
Generic dimensioned Type class.
Definition: dimensionedScalarFwd.H:42
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::phasePair::scalarTable
HashTable< scalar, phasePairKey, phasePairKey::hash > scalarTable
Scalar hash table.
Definition: phasePair.H:64
Foam::phasePair::rho
tmp< volScalarField > rho() const
Average density.
Definition: phasePair.C:108
Foam::HashTable< scalar, phasePairKey, phasePairKey::hash >
Foam::phasePair::dictTable
HashTable< dictionary, phasePairKey, phasePairKey::hash > dictTable
Dictionary hash table.
Definition: phasePair.H:60
Foam::phasePair::name
virtual word name() const
Pair name.
Definition: phasePair.C:69
Foam::phasePair::phase2
const phaseModel & phase2() const
Definition: phasePairI.H:36
Foam::phasePair::E
virtual tmp< volScalarField > E() const
Aspect ratio.
Definition: phasePair.C:200
Foam::phasePair::magUr
tmp< volScalarField > magUr() const
Relative velocity magnitude.
Definition: phasePair.C:114
Foam::phasePair::Mo
tmp< volScalarField > Mo() const
Morton Number.
Definition: phasePair.C:180
Foam::phasePair::phase1
const phaseModel & phase1() const
Definition: phasePairI.H:30
Foam::GeometricField< scalar, fvPatchField, volMesh >
Foam::phasePair::continuous
virtual const phaseModel & continuous() const
Continuous phase.
Definition: phasePair.C:82
Foam::phasePair::EoH2
tmp< volScalarField > EoH2() const
Eotvos number based on hydraulic diameter type 2.
Definition: phasePair.C:159
Foam::phasePair::EoH1
tmp< volScalarField > EoH1() const
Eotvos number based on hydraulic diameter type 1.
Definition: phasePair.C:148
Foam::phasePair::phasePair
phasePair(const phaseModel &phase1, const phaseModel &phase2, const bool ordered=false)
Construct from two phases.
Definition: phasePair.C:35