ThermalPhaseChangePhaseSystem.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::ThermalPhaseChangePhaseSystem
26 
27 Description
28  Class to provide interfacial heat and mass transfer between a number of
29  phases according the interfacial temperature approximated by the saturation
30  temperature.
31 
32  Based on the implemnetaion described in:
33 
34  \verbatim
35  Peltola, J., Pättikangas, T., Bainbridge, W., Lehnigk, R., Schlegel, F.
36  (2019).
37  On Development and validation of subcooled nucleate boiling models for
38  OpenFOAM Foundation Release.
39  NURETH-18 Conference Proceedings, Portland, Oregon, United States, 2019.
40  \endverbatim
41 
42  The present implementation includes simplified support for non-volatile
43  components in addition to a single volatile component in order to account
44  compressibility effects when non-volatile gas bubbles of non-volatile gas
45  filled pressure reservoirs are present.
46 
47  The phase change mass transfer calculation is still only dependent on the
48  interfacial temperature estimate and interfacial heat transfer models.
49  The mass diffusion effects in presence of non-volatile components at the
50  interface are neglected.
51 
52 
53 SourceFiles
54  ThermalPhaseChangePhaseSystem.C
55 
56 \*---------------------------------------------------------------------------*/
57 
58 #ifndef ThermalPhaseChangePhaseSystem_H
59 #define ThermalPhaseChangePhaseSystem_H
60 
61 #include "phaseSystem.H"
62 #include "saturationModel.H"
63 #include "Switch.H"
64 
65 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
66 
67 namespace Foam
68 {
69 
70 /*---------------------------------------------------------------------------*\
71  Class ThermalPhaseChangePhaseSystem Declaration
72 \*---------------------------------------------------------------------------*/
73 
74 template<class BasePhaseSystem>
76 :
77  public BasePhaseSystem
78 {
79  // Private typedefs
80 
81  typedef HashTable
82  <
87 
88 
89  // Private data
90 
91  //- Name of the volatile specie
92  word volatile_;
93 
94  //- Saturation models used to evaluate Tsat = Tf
95  saturationModelTable saturationModels_;
96 
97  //- Mass transfer rates
99 
100  //- Nucleate Mass transfer rates
101  phaseSystem::dmdtfTable nDmdtfs_;
102 
103  //- Nucleate thermal energy transfer rates
104  phaseSystem::dmdtfTable nDmdtLfs_;
105 
106  //- Previous continuity error update phase dmdts for the heat transfer
107  // function
108  PtrList<volScalarField> dmdt0s_;
109 
110 
111  // Private Member Functions
112 
113  //- Return the total mass transfer rate for a pair
114  tmp<volScalarField> totalDmdtf(const phasePairKey& key) const;
115 
116 
117 public:
118 
119  // Constructors
120 
121  //- Construct from fvMesh
123 
124 
125  //- Destructor
127 
128 
129  // Member Functions
130 
131  //- Return the saturationModel
132  const saturationModel& saturation(const phasePairKey& key) const;
133 
134  //- Return the mass transfer rate for an interface
135  virtual tmp<volScalarField> dmdtf(const phasePairKey& key) const;
136 
137  //- Return the mass transfer rates for each phase
138  virtual PtrList<volScalarField> dmdts() const;
139 
140  //- Return the momentum transfer matrices for the cell-based algorithm
142 
143  //- Return the momentum transfer matrices for the face-based algorithm
145 
146  //- Return the heat transfer matrices
148 
149  //- Return the specie transfer matrices
151  specieTransfer() const;
152 
153  //- Store phase dmdts at the during the continuity error update
154  virtual void correctContinuityError();
155 
156  //- Correct the interface thermodynamics
157  virtual void correctInterfaceThermo();
158 
159  //- Read base phaseProperties dictionary
160  virtual bool read();
161 };
162 
163 
164 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
165 
166 } // End namespace Foam
167 
168 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
169 
170 #ifdef NoRepository
172 #endif
173 
174 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
175 
176 #endif
177 
178 // ************************************************************************* //
virtual PtrList< volScalarField > dmdts() const
Return the mass transfer rates for each phase.
ThermalPhaseChangePhaseSystem(const fvMesh &)
Construct from fvMesh.
virtual autoPtr< phaseSystem::specieTransferTable > specieTransfer() const
Return the specie transfer matrices.
const saturationModel & saturation(const phasePairKey &key) const
Return the saturationModel.
Class to provide interfacial heat and mass transfer between a number of phases according the interfac...
virtual tmp< volScalarField > dmdtf(const phasePairKey &key) const
Return the mass transfer rate for an interface.
virtual void correctInterfaceThermo()
Correct the interface thermodynamics.
A class for handling words, derived from string.
Definition: word.H:59
virtual autoPtr< phaseSystem::heatTransferTable > heatTransfer() const
Return the heat transfer matrices.
virtual autoPtr< phaseSystem::momentumTransferTable > momentumTransferf()
Return the momentum transfer matrices for the face-based algorithm.
An STL-conforming hash table.
Definition: HashTable.H:61
virtual bool read()
Read base phaseProperties dictionary.
virtual ~ThermalPhaseChangePhaseSystem()
Destructor.
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
virtual void correctContinuityError()
Store phase dmdts at the during the continuity error update.
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 > momentumTransfer()
Return the momentum transfer matrices for the cell-based algorithm.
Namespace for OpenFOAM.