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 | Copyright (C) 2014-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::phasePair
26 
27 Description
28 
29 SourceFiles
30  phasePair.C
31 
32 \*---------------------------------------------------------------------------*/
33 
34 #ifndef phasePair_H
35 #define phasePair_H
36 
37 #include "phaseModel.H"
38 #include "phasePairKey.H"
40 
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 
43 namespace Foam
44 {
45 
46 /*---------------------------------------------------------------------------*\
47  Class phasePair Declaration
48 \*---------------------------------------------------------------------------*/
49 
50 class phasePair
51 :
52  public phasePairKey
53 {
54 public:
55 
56  // Hash table types
57 
58  //- Dictionary hash table
60  dictTable;
61 
62  //- Scalar hash table
65 
66 
67 private:
68 
69  // Private data
70 
71  //- Phase 1
72  const phaseModel& phase1_;
73 
74  //- Phase 2
75  const phaseModel& phase2_;
76 
77  //- Gravitational acceleration
79 
80 
81  // Private member functions
82 
83  // Etvos number for given diameter
84  tmp<volScalarField> EoH(const volScalarField& d) const;
85 
86 
87 public:
88 
89  // Constructors
90 
91  //- Construct from two phases and gravity
92  phasePair
93  (
94  const phaseModel& phase1,
95  const phaseModel& phase2,
96  const bool ordered = false
97  );
98 
99 
100  //- Destructor
101  virtual ~phasePair();
102 
103 
104  // Member Functions
105 
106  //- Dispersed phase
107  virtual const phaseModel& dispersed() const;
108 
109  //- Continuous phase
110  virtual const phaseModel& continuous() const;
111 
112  //- Pair name
113  virtual word name() const;
114 
115  //- Average density
116  tmp<volScalarField> rho() const;
117 
118  //- Relative velocity magnitude
119  tmp<volScalarField> magUr() const;
120 
121  //- Relative velocity
122  tmp<volVectorField> Ur() const;
123 
124  //- Reynolds number
125  tmp<volScalarField> Re() const;
126 
127  //- Prandtl number
128  tmp<volScalarField> Pr() const;
129 
130  //- Eotvos number
131  tmp<volScalarField> Eo() const;
132 
133  //- Eotvos number based on hydraulic diameter type 1
134  tmp<volScalarField> EoH1() const;
135 
136  //- Eotvos number based on hydraulic diameter type 2
137  tmp<volScalarField> EoH2() const;
138 
139  //- Surface tension coefficient
140  tmp<volScalarField> sigma() const;
141 
142  //- Morton Number
143  tmp<volScalarField> Mo() const;
144 
145  //- Takahashi Number
146  tmp<volScalarField> Ta() const;
147 
148  //- Aspect ratio
149  virtual tmp<volScalarField> E() const;
150 
151  // Access
152 
153  // Phase 1
154  inline const phaseModel& phase1() const;
155 
156  // Phase 2
157  inline const phaseModel& phase2() const;
158 
159  // Gravitation acceleration
160  inline const uniformDimensionedVectorField& g() const;
161 };
162 
163 
164 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
165 
166 } // End namespace Foam
167 
168 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
169 
170 #include "phasePairI.H"
171 
172 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
173 
174 #endif
175 
176 // ************************************************************************* //
HashTable< dictionary, phasePairKey, phasePairKey::hash > dictTable
Dictionary hash table.
Definition: phasePair.H:59
bool ordered() const
Return the ordered flag.
tmp< volScalarField > sigma() const
Surface tension coefficient.
Definition: phasePairI.H:46
const phaseModel & phase2() const
Definition: phasePairI.H:34
phasePair(const phaseModel &phase1, const phaseModel &phase2, const bool ordered=false)
Construct from two phases and gravity.
const phaseModel & phase1() const
Definition: phasePairI.H:28
tmp< volVectorField > Ur() const
Relative velocity.
virtual word name() const
Pair name.
tmp< volScalarField > magUr() const
Relative velocity magnitude.
tmp< volScalarField > Pr() const
Prandtl number.
tmp< volScalarField > Eo() const
Eotvos number.
tmp< volScalarField > EoH1() const
Eotvos number based on hydraulic diameter type 1.
virtual const phaseModel & continuous() const
Continuous phase.
A class for handling words, derived from string.
Definition: word.H:59
const uniformDimensionedVectorField & g() const
Definition: phasePairI.H:40
tmp< volScalarField > Re() const
Reynolds number.
An STL-conforming hash table.
Definition: HashTable.H:62
virtual const phaseModel & dispersed() const
Dispersed phase.
tmp< volScalarField > Mo() const
Morton Number.
virtual tmp< volScalarField > E() const
Aspect ratio.
virtual ~phasePair()
Destructor.
tmp< volScalarField > Ta() const
Takahashi Number.
HashTable< scalar, phasePairKey, phasePairKey::hash > scalarTable
Scalar hash table.
Definition: phasePair.H:63
A class for managing temporary objects.
Definition: PtrList.H:53
tmp< volScalarField > EoH2() const
Eotvos number based on hydraulic diameter type 2.
Single incompressible phase derived from the phase-fraction. Used as part of the multiPhaseMixture fo...
Definition: phaseModel.H:53
Namespace for OpenFOAM.
tmp< volScalarField > rho() const
Average density.