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-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::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 SourceFiles
33  ThermalPhaseChangePhaseSystem.C
34 
35 \*---------------------------------------------------------------------------*/
36 
37 #ifndef ThermalPhaseChangePhaseSystem_H
38 #define ThermalPhaseChangePhaseSystem_H
39 
40 #include "phaseSystem.H"
41 #include "saturationModel.H"
42 #include "Switch.H"
43 
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 
46 namespace Foam
47 {
48 
49 /*---------------------------------------------------------------------------*\
50  Class ThermalPhaseChangePhaseSystem Declaration
51 \*---------------------------------------------------------------------------*/
52 
53 template<class BasePhaseSystem>
55 :
56  public BasePhaseSystem
57 {
58 
59 protected:
60 
61  // Protected typedefs
62 
64  iDmdtTable;
65 
67  wDmdtTable;
68 
71 
72 
73  // Protected data
74 
75  //- Name of the volatile specie
77 
78  //- The saturation model used to evaluate Tsat = Tf
80 
81  // Phase change enabled
83 
84  //- Interfacial Mass transfer rate
85  iDmdtTable iDmdt_;
86 
87  //- Boundary Mass transfer rate
88  wDmdtTable wDmdt_;
89 
90  //- Boundary thermal energy transfer rate
91  wMDotLTable wMDotL_;
92 
93 
94  // Protected member functions
95 
96  //- Return the interfacial mass transfer rate for a pair
97  tmp<volScalarField> iDmdt(const phasePairKey& key) const;
98 
99  //- Return the boundary mass transfer rate for a pair
100  tmp<volScalarField> wDmdt(const phasePairKey& key) const;
101 
102 
103 public:
104 
105  // Constructors
106 
107  //- Construct from fvMesh
109 
110 
111  //- Destructor
113 
114 
115  // Member Functions
116 
117  //- Return the saturationModel
118  const saturationModel& saturation() const;
119 
120  //- Return the mass transfer rate for a pair
121  virtual tmp<volScalarField> dmdt(const phasePairKey& key) const;
122 
123  //- Return the mass transfer rates for each phase
124  virtual Xfer<PtrList<volScalarField>> dmdts() const;
125 
126  //- Return the heat transfer matrices
128 
129  //- Return the mass transfer matrices
131 
132  //- Correct the interface thermodynamics
133  virtual void correctInterfaceThermo();
134 
135  //- Read base phaseProperties dictionary
136  virtual bool read();
137 };
138 
139 
140 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
141 
142 } // End namespace Foam
143 
144 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
145 
146 #ifdef NoRepository
148 #endif
149 
150 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
151 
152 #endif
153 
154 // ************************************************************************* //
autoPtr< saturationModel > saturationModel_
The saturation model used to evaluate Tsat = Tf.
A simple container for copying or transferring objects of type <T>.
Definition: Xfer.H:85
ThermalPhaseChangePhaseSystem(const fvMesh &)
Construct from fvMesh.
wDmdtTable wDmdt_
Boundary Mass transfer rate.
A simple wrapper around bool so that it can be read as a word: true/false, on/off, yes/no, y/n, t/f, or none.
Definition: Switch.H:60
virtual tmp< volScalarField > dmdt(const phasePairKey &key) const
Return the mass transfer rate for a pair.
virtual autoPtr< phaseSystem::massTransferTable > massTransfer() const
Return the mass transfer matrices.
Class to provide interfacial heat and mass transfer between a number of phases according the interfac...
virtual void correctInterfaceThermo()
Correct the interface thermodynamics.
wMDotLTable wMDotL_
Boundary thermal energy transfer rate.
A class for handling words, derived from string.
Definition: word.H:59
virtual autoPtr< phaseSystem::heatTransferTable > heatTransfer() const
Return the heat transfer matrices.
HashPtrTable< volScalarField, phasePairKey, phasePairKey::hash > wDmdtTable
virtual bool read()
Read base phaseProperties dictionary.
tmp< volScalarField > iDmdt(const phasePairKey &key) const
Return the interfacial mass transfer rate for a pair.
tmp< volScalarField > wDmdt(const phasePairKey &key) const
Return the boundary mass transfer rate for a pair.
const saturationModel & saturation() const
Return the saturationModel.
virtual ~ThermalPhaseChangePhaseSystem()
Destructor.
virtual Xfer< PtrList< volScalarField > > dmdts() const
Return the mass transfer rates for each phase.
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
HashPtrTable< volScalarField, phasePairKey, phasePairKey::hash > wMDotLTable
iDmdtTable iDmdt_
Interfacial Mass transfer rate.
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
word volatile_
Name of the volatile specie.
Namespace for OpenFOAM.
HashPtrTable< volScalarField, phasePairKey, phasePairKey::hash > iDmdtTable