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
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
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 // ************************************************************************* //
InterfaceCompositionPhaseChangePhaseSystem(const fvMesh &)
Construct from fvMesh.
virtual autoPtr< phaseSystem::massTransferTable > massTransfer() const
Return the mass transfer matrices.
A HashTable of pointers to objects of type <T>, with deallocation management of the pointers...
Definition: HashPtrTable.H:51
virtual void correctInterfaceThermo()
Correct the interface temperatures.
Hashing functor for phasePairKey.
Definition: phasePairKey.H:138
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:81
An ordered pair of two objects of type <T> with first() and second() elements.
Definition: instant.H:46
const label nInterfaceCorrectors_
The number of interface correctors.
virtual PtrList< volScalarField > dmdts() const
Return the mass transfer rates for each phase.
iDmdtSuSpTable iDmdtSu_
The explicit part of the interfacial mass transfer rates.
virtual tmp< volScalarField > dmdt(const phasePairKey &key) const
Return the mass transfer rate for a pair.
A HashTable similar to std::unordered_map.
Definition: HashTable.H:108
An ordered or unorder pair of phase names. Typically specified as follows.
Definition: phasePairKey.H:61
HashTable< autoPtr< interfaceCompositionModel >, phasePairKey, phasePairKey::hash > interfaceCompositionModelTable
HashPtrTable< volScalarField, phasePairKey, phasePairKey::hash > iDmdtTable
HashPtrTable< HashPtrTable< volScalarField >, phasePairKey, phasePairKey::hash > iDmdtSuSpTable
virtual bool read()
Read base phaseProperties dictionary.
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
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers...
Definition: List.H:55
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
iDmdtSuSpTable iDmdtSp_
The implicit part of the interfacial mass transfer rates.
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
Definition: HashPtrTable.H:48
A class for managing temporary objects.
Definition: HashPtrTable.H:50
interfaceCompositionModelTable interfaceCompositionModels_
Interface composition models.
virtual tmp< volScalarField > iDmdt(const phasePairKey &key) const
Return the interfacial mass transfer rate for a pair for a pair.
HashTable< Pair< autoPtr< BlendedInterfacialModel< massTransferModel > > >, phasePairKey, phasePairKey::hash > massTransferModelTable
Namespace for OpenFOAM.
Class to provide interfacial heat and mass transfer between a number of phases according to a interfa...