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 class interfaceCompositionModel;
53 class massTransferModel;
54 
55 /*---------------------------------------------------------------------------*\
56  Class InterfaceCompositionPhaseChangePhaseSystem Declaration
57 \*---------------------------------------------------------------------------*/
58 
59 template<class BasePhaseSystem>
61 :
62  public BasePhaseSystem
63 {
64 protected:
65 
66  // Protected typedefs
67 
68  typedef HashTable
69  <
74 
75  typedef HashTable
76  <
81 
82  typedef HashPtrTable
83  <
87  >
89 
91  iDmdtTable;
92 
93 
94  // Protected data
95 
96  // Sub Models
97 
98  //- The number of interface correctors
100 
101  //- Mass transfer models
103 
104  //- Interface composition models
106 
107  //- The explicit part of the interfacial mass transfer rates
108  mutable iDmdtSuSpTable iDmdtSu_;
109 
110  //- The implicit part of the interfacial mass transfer rates
111  mutable iDmdtSuSpTable iDmdtSp_;
112 
113 
114  // Protected member functions
115 
116  //- Return the interfacial mass transfer rate for a pair for a pair
117  virtual tmp<volScalarField> iDmdt(const phasePairKey& key) const;
118 
119 
120 public:
121 
122  // Constructors
123 
124  //- Construct from fvMesh
126 
127 
128  //- Destructor
130 
131 
132  // Member Functions
133 
134  //- Return the mass transfer rate for a pair
135  virtual tmp<volScalarField> dmdt(const phasePairKey& key) const;
136 
137  //- Return the mass transfer rates for each phase
138  virtual PtrList<volScalarField> dmdts() const;
139 
140  //- Return the mass transfer matrices
142 
143  //- Correct the interface temperatures
144  virtual void correctInterfaceThermo();
145 
146  //- Read base phaseProperties dictionary
147  virtual bool read();
148 };
149 
150 
151 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
152 
153 } // End namespace Foam
154 
155 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
156 
157 #ifdef NoRepository
159 #endif
160 
161 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
162 
163 #endif
164 
165 // ************************************************************************* //
Foam::InterfaceCompositionPhaseChangePhaseSystem::interfaceCompositionModels_
interfaceCompositionModelTable interfaceCompositionModels_
Interface composition models.
Definition: InterfaceCompositionPhaseChangePhaseSystem.H:104
Foam::InterfaceCompositionPhaseChangePhaseSystem::read
virtual bool read()
Read base phaseProperties dictionary.
Definition: InterfaceCompositionPhaseChangePhaseSystem.C:507
Foam::tmp< volScalarField >
Foam::phasePairKey::hash
Ordered or unordered hashing of word pair.
Definition: phasePairKey.H:65
Foam::InterfaceCompositionPhaseChangePhaseSystem::iDmdtSuSpTable
HashPtrTable< HashPtrTable< volScalarField >, phasePairKey, phasePairKey::hash > iDmdtSuSpTable
Definition: InterfaceCompositionPhaseChangePhaseSystem.H:87
Foam::InterfaceCompositionPhaseChangePhaseSystem::correctInterfaceThermo
virtual void correctInterfaceThermo()
Correct the interface temperatures.
Definition: InterfaceCompositionPhaseChangePhaseSystem.C:392
Foam::InterfaceCompositionPhaseChangePhaseSystem::nInterfaceCorrectors_
const label nInterfaceCorrectors_
The number of interface correctors.
Definition: InterfaceCompositionPhaseChangePhaseSystem.H:98
Foam::InterfaceCompositionPhaseChangePhaseSystem::interfaceCompositionModelTable
HashTable< autoPtr< interfaceCompositionModel >, phasePairKey, phasePairKey::hash > interfaceCompositionModelTable
Definition: InterfaceCompositionPhaseChangePhaseSystem.H:72
Foam::label
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:62
Foam::InterfaceCompositionPhaseChangePhaseSystem
Class to provide interfacial heat and mass transfer between a number of phases according to a interfa...
Definition: InterfaceCompositionPhaseChangePhaseSystem.H:59
Foam::InterfaceCompositionPhaseChangePhaseSystem::iDmdtSp_
iDmdtSuSpTable iDmdtSp_
The implicit part of the interfacial mass transfer rates.
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:65
Foam::phasePairKey
Definition: phasePairKey.H:59
Foam::InterfaceCompositionPhaseChangePhaseSystem::dmdt
virtual tmp< volScalarField > dmdt(const phasePairKey &key) const
Return the mass transfer rate for a pair.
Definition: InterfaceCompositionPhaseChangePhaseSystem.C:257
Foam::InterfaceCompositionPhaseChangePhaseSystem::iDmdtSu_
iDmdtSuSpTable iDmdtSu_
The explicit part of the interfacial mass transfer rates.
Definition: InterfaceCompositionPhaseChangePhaseSystem.H:107
Foam::fvMesh
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:84
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::InterfaceCompositionPhaseChangePhaseSystem::massTransferModelTable
HashTable< Pair< autoPtr< BlendedInterfacialModel< massTransferModel > > >, phasePairKey, phasePairKey::hash > massTransferModelTable
Definition: InterfaceCompositionPhaseChangePhaseSystem.H:79
Foam::InterfaceCompositionPhaseChangePhaseSystem::InterfaceCompositionPhaseChangePhaseSystem
InterfaceCompositionPhaseChangePhaseSystem(const fvMesh &)
Construct from fvMesh.
Definition: InterfaceCompositionPhaseChangePhaseSystem.C:95
Foam::HashTable
A HashTable similar to std::unordered_map.
Definition: HashTable.H:105
Foam::autoPtr< interfaceCompositionModel >
Foam::InterfaceCompositionPhaseChangePhaseSystem::dmdts
virtual PtrList< volScalarField > dmdts() const
Return the mass transfer rates for each phase.
Definition: InterfaceCompositionPhaseChangePhaseSystem.C:267
Foam::Pair
An ordered pair of two objects of type <T> with first() and second() elements.
Definition: Pair.H:54
Foam::InterfaceCompositionPhaseChangePhaseSystem::massTransferModels_
massTransferModelTable massTransferModels_
Mass transfer models.
Definition: InterfaceCompositionPhaseChangePhaseSystem.H:101
Foam::HashPtrTable
A HashTable of pointers to objects of type <T>.
Definition: HashPtrTable.H:54
Foam::InterfaceCompositionPhaseChangePhaseSystem::~InterfaceCompositionPhaseChangePhaseSystem
virtual ~InterfaceCompositionPhaseChangePhaseSystem()
Destructor.
Definition: InterfaceCompositionPhaseChangePhaseSystem.C:248
Foam::InterfaceCompositionPhaseChangePhaseSystem::massTransfer
virtual autoPtr< phaseSystem::massTransferTable > massTransfer() const
Return the mass transfer matrices.
Definition: InterfaceCompositionPhaseChangePhaseSystem.C:314
Foam::InterfaceCompositionPhaseChangePhaseSystem::iDmdt
virtual tmp< volScalarField > iDmdt(const phasePairKey &key) const
Return the interfacial mass transfer rate for a pair for a pair.
Definition: InterfaceCompositionPhaseChangePhaseSystem.C:38
InterfaceCompositionPhaseChangePhaseSystem.C
Foam::InterfaceCompositionPhaseChangePhaseSystem::iDmdtTable
HashPtrTable< volScalarField, phasePairKey, phasePairKey::hash > iDmdtTable
Definition: InterfaceCompositionPhaseChangePhaseSystem.H:90