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-2020 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 diffusiveMassTransferModel;
52 
53 /*---------------------------------------------------------------------------*\
54  Class InterfaceCompositionPhaseChangePhaseSystem Declaration
55 \*---------------------------------------------------------------------------*/
56 
57 template<class BasePhaseSystem>
59 :
60  public BasePhaseSystem
61 {
62  // Private typedefs
63 
64  typedef HashTable
65  <
70 
71  typedef HashTable
72  <
74  phasePairKey,
77 
78 
79  // Private data
80 
81  // Sub Models
82 
83  //- The number of interface correctors
84  const label nInterfaceCorrectors_;
85 
86  //- Mass transfer models
87  diffusiveMassTransferModelTable diffusiveMassTransferModels_;
88 
89  //- Interface composition models
90  interfaceCompositionModelTable interfaceCompositionModels_;
91 
92  //- The explicit part of the interfacial mass transfer rates
93  phaseSystem::dmidtfTable dmidtfSus_;
94 
95  //- The implicit part of the interfacial mass transfer rates
96  phaseSystem::dmidtfTable dmidtfSps_;
97 
98 
99  // Private Member Functions
100 
101  //- Return mass transfers across each interface
102  autoPtr<phaseSystem::dmdtfTable> dmdtfs() const;
103 
104  //- Return species mass transfers across each interface
105  autoPtr<phaseSystem::dmidtfTable> dmidtfs() const;
106 
107 
108 public:
109 
110  // Constructors
111 
112  //- Construct from fvMesh
114 
115 
116  //- Destructor
118 
119 
120  // Member Functions
121 
122  //- Return the mass transfer rate for an interface
123  virtual tmp<volScalarField> dmdtf(const phasePairKey& key) const;
124 
125  //- Return the mass transfer rates for each phase
126  virtual PtrList<volScalarField> dmdts() const;
127 
128  //- Return the momentum transfer matrices for the cell-based algorithm
130 
131  //- Return the momentum transfer matrices for the face-based algorithm
133 
134  //- Return the heat transfer matrices
136 
137  //- Return the specie transfer matrices
139  specieTransfer() const;
140 
141  //- Correct the fluid properties other than those listed below
142  virtual void correct();
143 
144  //- Correct the interface temperatures
145  virtual void correctInterfaceThermo();
146 
147  //- Read base phaseProperties dictionary
148  virtual bool read();
149 };
150 
151 
152 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
153 
154 } // End namespace Foam
155 
156 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
157 
158 #ifdef NoRepository
160 #endif
161 
162 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
163 
164 #endif
165 
166 // ************************************************************************* //
virtual autoPtr< phaseSystem::specieTransferTable > specieTransfer() const
Return the specie transfer matrices.
virtual ~InterfaceCompositionPhaseChangePhaseSystem()
Destructor.
virtual PtrList< volScalarField > dmdts() const
Return the mass transfer rates for each phase.
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 void correctInterfaceThermo()
Correct the interface temperatures.
virtual tmp< volScalarField > dmdtf(const phasePairKey &key) const
Return the mass transfer rate for an interface.
An ordered pair of two objects of type <T> with first() and second() elements.
Definition: contiguous.H:49
An STL-conforming hash table.
Definition: HashTable.H:61
virtual void correct()
Correct the fluid properties other than those listed below.
virtual autoPtr< phaseSystem::momentumTransferTable > momentumTransfer()
Return the momentum transfer matrices for the cell-based algorithm.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
Definition: List.H:70
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
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::momentumTransferTable > momentumTransferf()
Return the momentum transfer matrices for the face-based algorithm.
virtual autoPtr< phaseSystem::heatTransferTable > heatTransfer() const
Return the heat transfer matrices.
virtual bool read()
Read base phaseProperties dictionary.
Namespace for OpenFOAM.
Class to provide interfacial heat and mass transfer between a number of phases according to a interfa...