InterfaceCompositionPhaseChangePhaseSystem.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) 2015-2018 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::InterfaceCompositionPhaseChangePhaseSystem
28 
29 Description
30  Class to provide interfacial heat and mass transfer between a number of
31  phases according to a interface composition model.
32 
33  The interface temperature is calculated such that the net rate at which the
34  heat is transferred to the interface is equal to the latent heat consumed by
35  the mass transfer.
36 
37 SourceFiles
38  InterfaceCompositionPhaseChangePhaseSystem.C
39 
40 \*---------------------------------------------------------------------------*/
41 
42 #ifndef InterfaceCompositionPhaseChangePhaseSystem_H
43 #define InterfaceCompositionPhaseChangePhaseSystem_H
44 
45 #include "phaseSystem.H"
46 
47 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48 
49 namespace Foam
50 {
51 
52 // Forward Declarations
53 class interfaceCompositionModel;
54 class massTransferModel;
55 
56 /*---------------------------------------------------------------------------*\
57  Class InterfaceCompositionPhaseChangePhaseSystem Declaration
58 \*---------------------------------------------------------------------------*/
59 
60 template<class BasePhaseSystem>
62 :
63  public BasePhaseSystem
64 {
65 protected:
66 
67  // Protected Typedefs
68 
69  typedef HashTable
70  <
75 
76  typedef HashTable
77  <
82 
83  typedef HashPtrTable
84  <
89 
90  typedef HashPtrTable
91  <
95  > iDmdtTable;
96 
97 
98  // Protected Data
99 
100  // Sub Models
101 
102  //- The number of interface correctors
103  const label nInterfaceCorrectors_;
104 
105  //- Mass transfer models
107 
108  //- Interface composition models
110 
111  //- The explicit part of the interfacial mass transfer rates
112  mutable iDmdtSuSpTable iDmdtSu_;
113 
114  //- The implicit part of the interfacial mass transfer rates
115  mutable iDmdtSuSpTable iDmdtSp_;
116 
117 
118  // Protected Member Functions
119 
120  //- Return the interfacial mass transfer rate for a pair for a pair
121  virtual tmp<volScalarField> iDmdt(const phasePairKey& key) const;
122 
123 
124 public:
125 
126  // Constructors
127 
128  //- Construct from fvMesh
130 
131 
132  //- Destructor
134 
135 
136  // Member Functions
137 
138  //- Return the mass transfer rate for a pair
139  virtual tmp<volScalarField> dmdt(const phasePairKey& key) const;
140 
141  //- Return the mass transfer rates for each phase
142  virtual PtrList<volScalarField> dmdts() const;
143 
144  //- Return the mass transfer matrices
146 
147  //- Correct the interface temperatures
148  virtual void correctInterfaceThermo();
149 
150  //- Read base phaseProperties dictionary
151  virtual bool read();
152 };
153 
154 
155 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
156 
157 } // End namespace Foam
158 
159 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
160 
161 #ifdef NoRepository
163 #endif
164 
165 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
166 
167 #endif
168 
169 // ************************************************************************* //
Foam::InterfaceCompositionPhaseChangePhaseSystem::interfaceCompositionModels_
interfaceCompositionModelTable interfaceCompositionModels_
Definition: InterfaceCompositionPhaseChangePhaseSystem.H:104
Foam::InterfaceCompositionPhaseChangePhaseSystem::read
virtual bool read()
Definition: InterfaceCompositionPhaseChangePhaseSystem.C:482
Foam::phasePairKey::hasher
Definition: phasePairKey.H:118
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:57
Foam::InterfaceCompositionPhaseChangePhaseSystem::iDmdtSuSpTable
HashPtrTable< HashPtrTable< volScalarField >, phasePairKey, phasePairKey::hash > iDmdtSuSpTable
Definition: InterfaceCompositionPhaseChangePhaseSystem.H:83
Foam::glTF::key
auto key(const Type &t) -> typename std::enable_if< std::is_enum< Type >::value, typename std::underlying_type< Type >::type >::type
Definition: foamGltfBase.H:103
Foam::InterfaceCompositionPhaseChangePhaseSystem::correctInterfaceThermo
virtual void correctInterfaceThermo()
Definition: InterfaceCompositionPhaseChangePhaseSystem.C:367
Foam::InterfaceCompositionPhaseChangePhaseSystem::nInterfaceCorrectors_
const label nInterfaceCorrectors_
Definition: InterfaceCompositionPhaseChangePhaseSystem.H:98
Foam::InterfaceCompositionPhaseChangePhaseSystem::interfaceCompositionModelTable
HashTable< autoPtr< interfaceCompositionModel >, phasePairKey, phasePairKey::hash > interfaceCompositionModelTable
Definition: InterfaceCompositionPhaseChangePhaseSystem.H:69
Foam::InterfaceCompositionPhaseChangePhaseSystem::iDmdtTable
HashPtrTable< volScalarField, phasePairKey, phasePairKey::hash > iDmdtTable
Definition: InterfaceCompositionPhaseChangePhaseSystem.H:90
Foam::InterfaceCompositionPhaseChangePhaseSystem
Class to provide interfacial heat and mass transfer between a number of phases according to a interfa...
Definition: InterfaceCompositionPhaseChangePhaseSystem.H:56
Foam::InterfaceCompositionPhaseChangePhaseSystem::iDmdtSp_
iDmdtSuSpTable iDmdtSp_
Definition: InterfaceCompositionPhaseChangePhaseSystem.H:110
Foam::PtrList
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
Definition: List.H:55
Foam::volScalarField
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:53
Foam::phasePairKey
An ordered or unorder pair of phase names. Typically specified as follows.
Definition: phasePairKey.H:61
Foam::InterfaceCompositionPhaseChangePhaseSystem::dmdt
virtual tmp< volScalarField > dmdt(const phasePairKey &key) const
Definition: InterfaceCompositionPhaseChangePhaseSystem.C:238
Foam::InterfaceCompositionPhaseChangePhaseSystem::iDmdtSu_
iDmdtSuSpTable iDmdtSu_
Definition: InterfaceCompositionPhaseChangePhaseSystem.H:107
Foam::fvMesh
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:81
Foam
Definition: atmBoundaryLayer.C:26
Foam::InterfaceCompositionPhaseChangePhaseSystem::massTransferModelTable
HashTable< Pair< autoPtr< BlendedInterfacialModel< massTransferModel > > >, phasePairKey, phasePairKey::hash > massTransferModelTable
Definition: InterfaceCompositionPhaseChangePhaseSystem.H:76
Foam::InterfaceCompositionPhaseChangePhaseSystem::InterfaceCompositionPhaseChangePhaseSystem
InterfaceCompositionPhaseChangePhaseSystem(const fvMesh &)
Definition: InterfaceCompositionPhaseChangePhaseSystem.C:78
Foam::HashTable
A HashTable similar to std::unordered_map.
Definition: HashTable.H:101
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:49
Foam::InterfaceCompositionPhaseChangePhaseSystem::dmdts
virtual PtrList< volScalarField > dmdts() const
Definition: InterfaceCompositionPhaseChangePhaseSystem.C:248
Foam::Pair
An ordered pair of two objects of type <T> with first() and second() elements.
Definition: Pair.H:50
Foam::InterfaceCompositionPhaseChangePhaseSystem::massTransferModels_
massTransferModelTable massTransferModels_
Definition: InterfaceCompositionPhaseChangePhaseSystem.H:101
Foam::HashPtrTable
A HashTable of pointers to objects of type <T>, with deallocation management of the pointers.
Definition: HashPtrTable.H:50
Foam::InterfaceCompositionPhaseChangePhaseSystem::~InterfaceCompositionPhaseChangePhaseSystem
virtual ~InterfaceCompositionPhaseChangePhaseSystem()
Definition: InterfaceCompositionPhaseChangePhaseSystem.C:229
Foam::InterfaceCompositionPhaseChangePhaseSystem::massTransfer
virtual autoPtr< phaseSystem::massTransferTable > massTransfer() const
Definition: InterfaceCompositionPhaseChangePhaseSystem.C:287
Foam::InterfaceCompositionPhaseChangePhaseSystem::iDmdt
virtual tmp< volScalarField > iDmdt(const phasePairKey &key) const
Definition: InterfaceCompositionPhaseChangePhaseSystem.C:31
InterfaceCompositionPhaseChangePhaseSystem.C