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 // ************************************************************************* //
Foam::Switch
A simple wrapper around bool so that it can be read as a word: true/false, on/off,...
Definition: Switch.H:77
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
Foam::ThermalPhaseChangePhaseSystem::volatile_
word volatile_
Name of the volatile specie.
Definition: ThermalPhaseChangePhaseSystem.H:77
Foam::ThermalPhaseChangePhaseSystem::dmdts
virtual PtrList< volScalarField > dmdts() const
Return the mass transfer rates for each phase.
Definition: ThermalPhaseChangePhaseSystem.C:195
Foam::ThermalPhaseChangePhaseSystem
Class to provide interfacial heat and mass transfer between a number of phases according the interfac...
Definition: ThermalPhaseChangePhaseSystem.H:55
Foam::ThermalPhaseChangePhaseSystem::iDmdt
tmp< volScalarField > iDmdt(const phasePairKey &key) const
Return the interfacial mass transfer rate for a pair.
Definition: ThermalPhaseChangePhaseSystem.C:39
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Foam::saturationModel
Definition: saturationModel.H:53
Foam::glTF::key
auto key(const Type &t) -> typename std::enable_if< std::is_enum< Type >::value, typename std::underlying_type< Type >::type >::type
Definition: foamGltfBase.H:108
Foam::ThermalPhaseChangePhaseSystem::iDmdtTable
HashPtrTable< volScalarField, phasePairKey, phasePairKey::hash > iDmdtTable
Definition: ThermalPhaseChangePhaseSystem.H:65
Foam::ThermalPhaseChangePhaseSystem::iDmdt_
iDmdtTable iDmdt_
Interfacial Mass transfer rate.
Definition: ThermalPhaseChangePhaseSystem.H:86
Foam::ThermalPhaseChangePhaseSystem::wMDotLTable
HashPtrTable< volScalarField, phasePairKey, phasePairKey::hash > wMDotLTable
Definition: ThermalPhaseChangePhaseSystem.H:71
Foam::ThermalPhaseChangePhaseSystem::read
virtual bool read()
Read base phaseProperties dictionary.
Definition: ThermalPhaseChangePhaseSystem.C:540
Foam::ThermalPhaseChangePhaseSystem::phaseChange_
Switch phaseChange_
Definition: ThermalPhaseChangePhaseSystem.H:83
saturationModel.H
Foam::ThermalPhaseChangePhaseSystem::~ThermalPhaseChangePhaseSystem
virtual ~ThermalPhaseChangePhaseSystem()
Destructor.
Definition: ThermalPhaseChangePhaseSystem.C:168
Foam::ThermalPhaseChangePhaseSystem::ThermalPhaseChangePhaseSystem
ThermalPhaseChangePhaseSystem(const fvMesh &)
Construct from fvMesh.
Definition: ThermalPhaseChangePhaseSystem.C:77
ThermalPhaseChangePhaseSystem.C
Foam::ThermalPhaseChangePhaseSystem::correctInterfaceThermo
virtual void correctInterfaceThermo()
Correct the interface thermodynamics.
Definition: ThermalPhaseChangePhaseSystem.C:344
Switch.H
Foam::ThermalPhaseChangePhaseSystem::saturationModel_
autoPtr< saturationModel > saturationModel_
The saturation model used to evaluate Tsat = Tf.
Definition: ThermalPhaseChangePhaseSystem.H:80
Foam::PtrList
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
Definition: List.H:59
Foam::phasePairKey
An ordered or unorder pair of phase names. Typically specified as follows.
Definition: phasePairKey.H:65
Foam::fvMesh
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:85
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
Foam::HashPtrTable< volScalarField, phasePairKey, phasePairKey::hash >
Foam::ThermalPhaseChangePhaseSystem::wDmdtTable
HashPtrTable< volScalarField, phasePairKey, phasePairKey::hash > wDmdtTable
Definition: ThermalPhaseChangePhaseSystem.H:68
Foam::ThermalPhaseChangePhaseSystem::saturation
const saturationModel & saturation() const
Return the saturationModel.
Definition: ThermalPhaseChangePhaseSystem.C:176
Foam::ThermalPhaseChangePhaseSystem::dmdt
virtual tmp< volScalarField > dmdt(const phasePairKey &key) const
Return the mass transfer rate for a pair.
Definition: ThermalPhaseChangePhaseSystem.C:185
Foam::ThermalPhaseChangePhaseSystem::wMDotL_
wMDotLTable wMDotL_
Boundary thermal energy transfer rate.
Definition: ThermalPhaseChangePhaseSystem.H:92
Foam::ThermalPhaseChangePhaseSystem::wDmdt
tmp< volScalarField > wDmdt(const phasePairKey &key) const
Return the boundary mass transfer rate for a pair.
Definition: ThermalPhaseChangePhaseSystem.C:57
Foam::ThermalPhaseChangePhaseSystem::wDmdt_
wDmdtTable wDmdt_
Boundary Mass transfer rate.
Definition: ThermalPhaseChangePhaseSystem.H:89
Foam::ThermalPhaseChangePhaseSystem::heatTransfer
virtual autoPtr< phaseSystem::heatTransferTable > heatTransfer() const
Return the heat transfer matrices.
Definition: ThermalPhaseChangePhaseSystem.C:223
Foam::ThermalPhaseChangePhaseSystem::massTransfer
virtual autoPtr< phaseSystem::massTransferTable > massTransfer() const
Return the mass transfer matrices.
Definition: ThermalPhaseChangePhaseSystem.C:285