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-------------------------------------------------------------------------------
10License
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
26Class
27 Foam::phasePair
28
29Description
30
31SourceFiles
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
44namespace Foam
45{
46
47/*---------------------------------------------------------------------------*\
48 Class phasePair Declaration
49\*---------------------------------------------------------------------------*/
50
51class phasePair
52:
53 public phasePairKey
54{
55public:
56
57 // Hash table types
58
59 //- Dictionary hash table
62
63 //- Scalar hash table
66
67
68private:
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
90public:
91
92 // Constructors
93
94 //- Construct from two phases, gravity and surface tension table
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
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
140
141 //- Eotvos number based on hydraulic diameter type 2
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// ************************************************************************* //
A HashTable similar to std::unordered_map.
Definition: HashTable.H:123
Single incompressible phase derived from the phase-fraction. Used as part of the multiPhaseMixture fo...
Definition: phaseModel.H:61
bool ordered() const noexcept
Return the ordered flag.
Definition: phasePairKey.H:98
Description for mass transfer between a pair of phases. The direction of the mass transfer is from th...
Definition: phasePair.H:56
tmp< volScalarField > EoH1() const
Eotvos number based on hydraulic diameter type 1.
Definition: phasePair.C:148
const phaseModel & phase2() const
tmp< volScalarField > Eo() const
Eotvos number.
Definition: phasePair.C:142
tmp< volScalarField > EoH1() const
Eotvos number based on hydraulic diameter type 1.
tmp< volScalarField > Mo() const
Morton Number.
Definition: phasePair.C:181
tmp< volScalarField > Re() const
Reynolds number.
virtual word name() const
Pair name.
Definition: phasePair.C:69
virtual tmp< volScalarField > E() const
Aspect ratio.
tmp< volScalarField > magUr() const
Relative velocity magnitude.
Definition: phasePair.C:114
tmp< volScalarField > EoH2() const
Eotvos number based on hydraulic diameter type 2.
Definition: phasePair.C:159
virtual word name() const
Pair name.
virtual ~phasePair()=default
Destructor.
Definition: phasePair.C:66
virtual const phaseModel & dispersed() const
Dispersed phase.
tmp< volScalarField > Pr() const
Prandtl number.
Definition: phasePair.C:132
virtual const phaseModel & continuous() const
Continuous phase.
virtual const phaseModel & continuous() const
Continuous phase.
Definition: phasePair.C:82
tmp< volScalarField > EoH2() const
Eotvos number based on hydraulic diameter type 2.
tmp< volScalarField > Mo() const
Morton Number.
tmp< volScalarField > Pr() const
Prandtl number.
tmp< volScalarField > Eo() const
Eotvos number.
const dimensionedVector & g() const
tmp< volScalarField > rho() const
Average density.
const dimensionedScalar & sigma() const
const uniformDimensionedVectorField & g() const
Return gravitation acceleration.
Definition: phasePairI.H:93
tmp< volScalarField > Re() const
Reynolds number.
Definition: phasePair.C:126
const phaseModel & phase1() const
HashTable< scalar, phasePairKey, phasePairKey::hash > scalarTable
Scalar hash table.
Definition: phasePair.H:64
virtual ~phasePair()
Destructor.
tmp< volScalarField > sigma() const
Surface tension coefficient.
Definition: phasePair.C:170
tmp< volVectorField > Ur() const
Relative velocity.
Definition: phasePair.C:120
tmp< volScalarField > rho() const
Average density.
Definition: phasePair.C:108
virtual const phaseModel & dispersed() const
Dispersed phase.
Definition: phasePair.C:72
tmp< volVectorField > Ur() const
Relative velocity.
virtual tmp< volScalarField > E() const
Aspect ratio.
Definition: phasePair.C:201
const multiphaseInter::phaseModel & phase1() const
Definition: phasePairI.H:30
const multiphaseInter::phaseModel & phase2() const
Definition: phasePairI.H:36
tmp< volScalarField > Ta() const
Takahashi Number.
tmp< volScalarField > Ta() const
Takahashi Number.
Definition: phasePair.C:195
HashTable< dictionary, phasePairKey, phasePairKey::hash > dictTable
Dictionary hash table.
Definition: phasePair.H:60
tmp< volScalarField > magUr() const
Relative velocity magnitude.
A class for managing temporary objects.
Definition: tmp.H:65
A class for handling words, derived from Foam::string.
Definition: word.H:68
Namespace for OpenFOAM.