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-2022 OpenCFD Ltd.
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 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
33SourceFiles
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
47namespace Foam
48{
49
50/*---------------------------------------------------------------------------*\
51 Class phasePair Declaration
52\*---------------------------------------------------------------------------*/
54class phasePair
55:
56 public phasePairKey
57{
58 // Private data
59
60 //- Phase 1
61 const multiphaseInter::phaseModel& phase1_;
62
63 //- Phase 2
64 const multiphaseInter::phaseModel& phase2_;
65
66
67public:
68
69 // Constructors
70
71 //- Construct from two phases
73 (
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 multiphaseInter::phaseModel& from() const;
88
89 //- To phase
90 virtual const multiphaseInter::phaseModel& to() const;
91
92 //- Pair name
93 virtual word name() const;
94
95
96 // Access
97
98 // Phase 1
99 inline const multiphaseInter::phaseModel& phase1() const;
100
101 // Phase 2
102 inline const multiphaseInter::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// ************************************************************************* //
An ordered or unorder pair of phase names. Typically specified as follows.
Definition: phasePairKey.H:68
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
virtual const multiphaseInter::phaseModel & from() const
From phase.
Definition: phasePair.C:49
virtual const multiphaseInter::phaseModel & to() const
To phase.
Definition: phasePair.C:59
virtual word name() const
Pair name.
Definition: phasePair.C:69
virtual ~phasePair()=default
Destructor.
Definition: phasePair.C:66
const multiphaseInter::phaseModel & phase1() const
Definition: phasePairI.H:30
const multiphaseInter::phaseModel & phase2() const
Definition: phasePairI.H:36
A class for handling words, derived from Foam::string.
Definition: word.H:68
Namespace for OpenFOAM.