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-2022 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 sidedInterfaceCompositionModel;
51 class sidedBlendedDiffusiveMassTransferModel;
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  phaseInterfaceKey,
77 
78  using latentHeatScheme = typename BasePhaseSystem::latentHeatScheme;
79 
80  using latentHeatTransfer = typename BasePhaseSystem::latentHeatTransfer;
81 
82 
83  // Private data
84 
85  // Sub Models
86 
87  //- The number of interface correctors
88  const label nInterfaceCorrectors_;
89 
90  //- Mass transfer models
91  diffusiveMassTransferModelTable diffusiveMassTransferModels_;
92 
93  //- Interface composition models
94  interfaceCompositionModelTable interfaceCompositionModels_;
95 
96  //- Interface mass transfer rates
98 
99  //- The explicit part of the interface specie transfer rates
100  phaseSystem::dmidtfTable dmidtfSus_;
101 
102  //- The implicit part of the interface specie transfer rates
103  phaseSystem::dmidtfTable dmidtfSps_;
104 
105  //- Interface temperatures
107 
108 
109  // Private Member Functions
110 
111  //- Correct mass transfers across each interface
112  void correctDmdtfs();
113 
114  //- Return species mass transfers across each interface
115  autoPtr<phaseSystem::dmidtfTable> totalDmidtfs() 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 an interface
133  virtual tmp<volScalarField> dmdtf(const phaseInterfaceKey& key) const;
134 
135  //- Return the mass transfer rates for each phase
136  virtual PtrList<volScalarField> dmdts() const;
137 
138  //- Return the momentum transfer matrices for the cell-based algorithm
140 
141  //- Return the momentum transfer matrices for the face-based algorithm
143 
144  //- Return the heat transfer matrices
146 
147  //- Return the specie transfer matrices
149  specieTransfer() const;
150 
151  //- Correct the fluid properties other than those listed below
152  virtual void correct();
153 
154  //- Correct the mass transfer rates for the new species mass fractions
155  virtual void correctSpecies();
156 
157  //- Correct the interface temperatures
158  virtual void correctInterfaceThermo();
159 
160  //- Read base phaseProperties dictionary
161  virtual bool read();
162 };
163 
164 
165 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
166 
167 } // End namespace Foam
168 
169 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
170 
171 #ifdef NoRepository
173 #endif
174 
175 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
176 
177 #endif
178 
179 // ************************************************************************* //
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.
InterfaceCompositionPhaseChangePhaseSystem(const fvMesh &)
Construct from fvMesh.
Word-pair based class used for keying interface models in hash tables.
virtual void correctInterfaceThermo()
Correct the interface temperatures.
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.
virtual void correctSpecies()
Correct the mass transfer rates for the new species mass fractions.
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:95
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 tmp< volScalarField > dmdtf(const phaseInterfaceKey &key) const
Return the mass transfer rate for an interface.
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...