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_
Interface composition models.
Definition: InterfaceCompositionPhaseChangePhaseSystem.H:108
Foam::InterfaceCompositionPhaseChangePhaseSystem::read
virtual bool read()
Read base phaseProperties dictionary.
Definition: InterfaceCompositionPhaseChangePhaseSystem.C:489
Foam::phasePairKey::hasher
Hashing functor for phasePairKey.
Definition: phasePairKey.H:122
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Foam::InterfaceCompositionPhaseChangePhaseSystem::iDmdtSuSpTable
HashPtrTable< HashPtrTable< volScalarField >, phasePairKey, phasePairKey::hash > iDmdtSuSpTable
Definition: InterfaceCompositionPhaseChangePhaseSystem.H:87
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:108
Foam::InterfaceCompositionPhaseChangePhaseSystem::correctInterfaceThermo
virtual void correctInterfaceThermo()
Correct the interface temperatures.
Definition: InterfaceCompositionPhaseChangePhaseSystem.C:374
Foam::InterfaceCompositionPhaseChangePhaseSystem::nInterfaceCorrectors_
const label nInterfaceCorrectors_
The number of interface correctors.
Definition: InterfaceCompositionPhaseChangePhaseSystem.H:102
Foam::InterfaceCompositionPhaseChangePhaseSystem::interfaceCompositionModelTable
HashTable< autoPtr< interfaceCompositionModel >, phasePairKey, phasePairKey::hash > interfaceCompositionModelTable
Definition: InterfaceCompositionPhaseChangePhaseSystem.H:73
Foam::InterfaceCompositionPhaseChangePhaseSystem::iDmdtTable
HashPtrTable< volScalarField, phasePairKey, phasePairKey::hash > iDmdtTable
Definition: InterfaceCompositionPhaseChangePhaseSystem.H:94
Foam::InterfaceCompositionPhaseChangePhaseSystem
Class to provide interfacial heat and mass transfer between a number of phases according to a interfa...
Definition: InterfaceCompositionPhaseChangePhaseSystem.H:60
Foam::InterfaceCompositionPhaseChangePhaseSystem::iDmdtSp_
iDmdtSuSpTable iDmdtSp_
The implicit part of the interfacial mass transfer rates.
Definition: InterfaceCompositionPhaseChangePhaseSystem.H:114
Foam::PtrList
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
Definition: List.H:59
Foam::volScalarField
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:57
Foam::phasePairKey
An ordered or unorder pair of phase names. Typically specified as follows.
Definition: phasePairKey.H:65
Foam::InterfaceCompositionPhaseChangePhaseSystem::dmdt
virtual tmp< volScalarField > dmdt(const phasePairKey &key) const
Return the mass transfer rate for a pair.
Definition: InterfaceCompositionPhaseChangePhaseSystem.C:245
Foam::InterfaceCompositionPhaseChangePhaseSystem::iDmdtSu_
iDmdtSuSpTable iDmdtSu_
The explicit part of the interfacial mass transfer rates.
Definition: InterfaceCompositionPhaseChangePhaseSystem.H:111
Foam::fvMesh
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:85
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::InterfaceCompositionPhaseChangePhaseSystem::massTransferModelTable
HashTable< Pair< autoPtr< BlendedInterfacialModel< massTransferModel > > >, phasePairKey, phasePairKey::hash > massTransferModelTable
Definition: InterfaceCompositionPhaseChangePhaseSystem.H:80
Foam::InterfaceCompositionPhaseChangePhaseSystem::InterfaceCompositionPhaseChangePhaseSystem
InterfaceCompositionPhaseChangePhaseSystem(const fvMesh &)
Construct from fvMesh.
Definition: InterfaceCompositionPhaseChangePhaseSystem.C:85
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:255
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:105
Foam::HashPtrTable
A HashTable of pointers to objects of type <T>, with deallocation management of the pointers.
Definition: HashPtrTable.H:54
Foam::InterfaceCompositionPhaseChangePhaseSystem::~InterfaceCompositionPhaseChangePhaseSystem
virtual ~InterfaceCompositionPhaseChangePhaseSystem()
Destructor.
Definition: InterfaceCompositionPhaseChangePhaseSystem.C:236
Foam::InterfaceCompositionPhaseChangePhaseSystem::massTransfer
virtual autoPtr< phaseSystem::massTransferTable > massTransfer() const
Return the mass transfer matrices.
Definition: InterfaceCompositionPhaseChangePhaseSystem.C:294
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