InterfaceCompositionPhaseChangePhaseSystem.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2015-2018 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::InterfaceCompositionPhaseChangePhaseSystem
26 
27 Description
28  Class to provide interfacial heat and mass transfer between a number of
29  phases according to a interface composition model.
30 
31  The interface temperature is calculated such that the net rate at which the
32  heat is transferred to the interface is equal to the latent heat consumed by
33  the mass transfer.
34 
35 SourceFiles
36  InterfaceCompositionPhaseChangePhaseSystem.C
37 
38 \*---------------------------------------------------------------------------*/
39 
40 #ifndef InterfaceCompositionPhaseChangePhaseSystem_H
41 #define InterfaceCompositionPhaseChangePhaseSystem_H
42 
43 #include "phaseSystem.H"
44 
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 
47 namespace Foam
48 {
49 
50 class interfaceCompositionModel;
51 class massTransferModel;
52 
53 /*---------------------------------------------------------------------------*\
54  Class InterfaceCompositionPhaseChangePhaseSystem Declaration
55 \*---------------------------------------------------------------------------*/
56 
57 template<class BasePhaseSystem>
59 :
60  public BasePhaseSystem
61 {
62 protected:
63 
64  // Protected typedefs
65 
66  typedef HashTable
67  <
72 
73  typedef HashTable
74  <
76  phasePairKey,
79 
80  typedef HashPtrTable
81  <
83  phasePairKey,
85  >
87 
89  iDmdtTable;
90 
91 
92  // Protected data
93 
94  // Sub Models
95 
96  //- The number of interface correctors
98 
99  //- Mass transfer models
100  massTransferModelTable massTransferModels_;
101 
102  //- Interface composition models
103  interfaceCompositionModelTable interfaceCompositionModels_;
104 
105  //- The explicit part of the interfacial mass transfer rates
107 
108  //- The implicit part of the interfacial mass transfer rates
110 
111 
112  // Protected member functions
113 
114  //- Return the interfacial mass transfer rate for a pair for a pair
115  virtual tmp<volScalarField> iDmdt(const phasePairKey& key) const;
116 
117 
118 public:
119 
120  // Constructors
121 
122  //- Construct from fvMesh
124 
125 
126  //- Destructor
128 
129 
130  // Member Functions
131 
132  //- Return the mass transfer rate for a pair
133  virtual tmp<volScalarField> dmdt(const phasePairKey& key) const;
134 
135  //- Return the mass transfer rates for each phase
136  virtual Xfer<PtrList<volScalarField>> dmdts() const;
137 
138  //- Return the mass transfer matrices
140 
141  //- Correct the interface temperatures
142  virtual void correctInterfaceThermo();
143 
144  //- Read base phaseProperties dictionary
145  virtual bool read();
146 };
147 
148 
149 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
150 
151 } // End namespace Foam
152 
153 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
154 
155 #ifdef NoRepository
157 #endif
158 
159 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
160 
161 #endif
162 
163 // ************************************************************************* //
A simple container for copying or transferring objects of type <T>.
Definition: Xfer.H:85
virtual ~InterfaceCompositionPhaseChangePhaseSystem()
Destructor.
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:59
InterfaceCompositionPhaseChangePhaseSystem(const fvMesh &)
Construct from fvMesh.
virtual tmp< volScalarField > iDmdt(const phasePairKey &key) const
Return the interfacial mass transfer rate for a pair for a pair.
virtual tmp< volScalarField > dmdt(const phasePairKey &key) const
Return the mass transfer rate for a pair.
HashPtrTable< volScalarField, phasePairKey, phasePairKey::hash > iDmdtTable
A HashTable specialization for hashing pointers.
Definition: HashPtrTable.H:50
virtual void correctInterfaceThermo()
Correct the interface temperatures.
An ordered pair of two objects of type <T> with first() and second() elements.
Definition: contiguous.H:49
const label nInterfaceCorrectors_
The number of interface correctors.
iDmdtSuSpTable iDmdtSu_
The explicit part of the interfacial mass transfer rates.
An STL-conforming hash table.
Definition: HashTable.H:62
HashTable< autoPtr< interfaceCompositionModel >, phasePairKey, phasePairKey::hash > interfaceCompositionModelTable
HashPtrTable< HashPtrTable< volScalarField >, phasePairKey, phasePairKey::hash > iDmdtSuSpTable
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
virtual Xfer< PtrList< volScalarField > > dmdts() const
Return the mass transfer rates for each phase.
iDmdtSuSpTable iDmdtSp_
The implicit part of the interfacial mass transfer rates.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:52
A class for managing temporary objects.
Definition: PtrList.H:53
virtual autoPtr< phaseSystem::massTransferTable > massTransfer() const
Return the mass transfer matrices.
interfaceCompositionModelTable interfaceCompositionModels_
Interface composition models.
virtual bool read()
Read base phaseProperties dictionary.
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...