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) 2017 OpenCFD Ltd.
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  Description for mass transfer between a pair of phases. The direction of
31  the mass transfer is from the phase 'from' to the phasse 'to'.
32 
33 SourceFiles
34  phasePair.C
35 
36 \*---------------------------------------------------------------------------*/
37 
38 #ifndef phasePair_H
39 #define phasePair_H
40 
41 #include "phaseModel.H"
42 #include "phasePairKey.H"
44 
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 
47 namespace Foam
48 {
49 
50 /*---------------------------------------------------------------------------*\
51  Class phasePair Declaration
52 \*---------------------------------------------------------------------------*/
53 
54 class phasePair
55 :
56  public phasePairKey
57 {
58  // Private data
59 
60  //- Phase 1
61  const phaseModel& phase1_;
62 
63  //- Phase 2
64  const phaseModel& phase2_;
65 
66 
67 public:
68 
69  // Constructors
70 
71  //- Construct from two phases
72  phasePair
73  (
74  const phaseModel& phase1,
75  const phaseModel& phase2,
76  const bool ordered = false
77  );
78 
79 
80  //- Destructor
81  virtual ~phasePair() = default;
82 
83 
84  // Member Functions
85 
86  //- From phase
87  virtual const phaseModel& from() const;
88 
89  //- To phase
90  virtual const phaseModel& to() const;
91 
92  //- Pair name
93  virtual word name() const;
94 
95 
96  // Access
97 
98  // Phase 1
99  inline const phaseModel& phase1() const;
100 
101  // Phase 2
102  inline const phaseModel& phase2() const;
103 };
104 
105 
106 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
107 
108 } // End namespace Foam
109 
110 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
111 
112 #include "phasePairI.H"
113 
114 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
115 
116 #endif
117 
118 // ************************************************************************* //
Foam::phaseModel
Single incompressible phase derived from the phase-fraction. Used as part of the multiPhaseMixture fo...
Definition: phaseModel.H:54
Foam::phasePair
Description for mass transfer between a pair of phases. The direction of the mass transfer is from th...
Definition: phasePair.H:53
phasePairKey.H
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
Foam::phasePair::to
virtual const phaseModel & to() const
To phase.
Definition: phasePair.C:59
phasePairI.H
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
Foam::phasePairKey
An ordered or unorder pair of phase names. Typically specified as follows.
Definition: phasePairKey.H:65
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
uniformDimensionedFields.H
Foam::phasePair::from
virtual const phaseModel & from() const
From phase.
Definition: phasePair.C:49
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::phase1
const phaseModel & phase1() const
Definition: phasePairI.H:30
Foam::phasePair::phasePair
phasePair(const phaseModel &phase1, const phaseModel &phase2, const bool ordered=false)
Construct from two phases.
Definition: phasePair.C:35