ThermalPhaseChangePhaseSystem.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2015-2018 OpenFOAM Foundation
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 Class
27  Foam::ThermalPhaseChangePhaseSystem
28 
29 Description
30  Class to provide interfacial heat and mass transfer between a number of
31  phases according the interfacial temperature approximated by the saturation
32  temperature.
33 
34 SourceFiles
35  ThermalPhaseChangePhaseSystem.C
36 
37 \*---------------------------------------------------------------------------*/
38 
39 #ifndef ThermalPhaseChangePhaseSystem_H
40 #define ThermalPhaseChangePhaseSystem_H
41 
42 #include "phaseSystem.H"
43 #include "saturationModel.H"
44 #include "Switch.H"
45 
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 
48 namespace Foam
49 {
50 
51 /*---------------------------------------------------------------------------*\
52  Class ThermalPhaseChangePhaseSystem Declaration
53 \*---------------------------------------------------------------------------*/
54 
55 template<class BasePhaseSystem>
57 :
58  public BasePhaseSystem
59 {
60 
61 protected:
62 
63  // Protected typedefs
64 
66  iDmdtTable;
67 
69  wDmdtTable;
70 
73 
74 
75  // Protected data
76 
77  //- Name of the volatile specie
79 
80  //- The saturation model used to evaluate Tsat = Tf
82 
83  // Phase change enabled
85 
86  //- Interfacial Mass transfer rate
88 
89  //- Boundary Mass transfer rate
91 
92  //- Boundary thermal energy transfer rate
94 
95 
96  // Protected member functions
97 
98  //- Return the interfacial mass transfer rate for a pair
100 
101  //- Return the boundary mass transfer rate for a pair
103 
104 
105 public:
106 
107  // Constructors
108 
109  //- Construct from fvMesh
111 
112 
113  //- Destructor
115 
116 
117  // Member Functions
118 
119  //- Return the saturationModel
120  const saturationModel& saturation() const;
121 
122  //- Return the mass transfer rate for a pair
123  virtual tmp<volScalarField> dmdt(const phasePairKey& key) const;
124 
125  //- Return the mass transfer rates for each phase
126  virtual PtrList<volScalarField> dmdts() const;
127 
128  //- Return the heat transfer matrices
130 
131  //- Return the mass transfer matrices
133 
134  //- Correct the interface thermodynamics
135  virtual void correctInterfaceThermo();
136 
137  //- Read base phaseProperties dictionary
138  virtual bool read();
139 };
140 
141 
142 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
143 
144 } // End namespace Foam
145 
146 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
147 
148 #ifdef NoRepository
150 #endif
151 
152 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
153 
154 #endif
155 
156 // ************************************************************************* //
autoPtr< saturationModel > saturationModel_
The saturation model used to evaluate Tsat = Tf.
virtual autoPtr< phaseSystem::heatTransferTable > heatTransfer() const
Return the heat transfer matrices.
virtual bool read()
Read base phaseProperties dictionary.
ThermalPhaseChangePhaseSystem(const fvMesh &)
Construct from fvMesh.
wDmdtTable wDmdt_
Boundary Mass transfer rate.
virtual tmp< volScalarField > dmdt(const phasePairKey &key) const
Return the mass transfer rate for a pair.
A simple wrapper around bool so that it can be read as a word: true/false, on/off, yes/no, any/none. Also accepts 0/1 as a string and shortcuts t/f, y/n.
Definition: Switch.H:77
tmp< volScalarField > wDmdt(const phasePairKey &key) const
Return the boundary mass transfer rate for a pair.
Class to provide interfacial heat and mass transfer between a number of phases according the interfac...
tmp< volScalarField > iDmdt(const phasePairKey &key) const
Return the interfacial mass transfer rate for a pair.
wMDotLTable wMDotL_
Boundary thermal energy transfer rate.
A class for handling words, derived from Foam::string.
Definition: word.H:63
virtual void correctInterfaceThermo()
Correct the interface thermodynamics.
HashPtrTable< volScalarField, phasePairKey, phasePairKey::hash > wDmdtTable
An ordered or unorder pair of phase names. Typically specified as follows.
Definition: phasePairKey.H:61
const saturationModel & saturation() const
Return the saturationModel.
auto key(const Type &t) -> typename std::enable_if< std::is_enum< Type >::value, typename std::underlying_type< Type >::type >::type
Definition: foamGltfBase.H:103
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers...
Definition: List.H:55
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.
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
Definition: HashPtrTable.H:48
virtual PtrList< volScalarField > dmdts() const
Return the mass transfer rates for each phase.
A class for managing temporary objects.
Definition: HashPtrTable.H:50
word volatile_
Name of the volatile specie.
virtual autoPtr< phaseSystem::massTransferTable > massTransfer() const
Return the mass transfer matrices.
Namespace for OpenFOAM.
HashPtrTable< volScalarField, phasePairKey, phasePairKey::hash > iDmdtTable