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:63
Foam::ThermalPhaseChangePhaseSystem::volatile_
word volatile_
Definition: ThermalPhaseChangePhaseSystem.H:73
Foam::ThermalPhaseChangePhaseSystem::dmdts
virtual PtrList< volScalarField > dmdts() const
Definition: ThermalPhaseChangePhaseSystem.C:188
Foam::ThermalPhaseChangePhaseSystem
Class to provide interfacial heat and mass transfer between a number of phases according the interfac...
Definition: ThermalPhaseChangePhaseSystem.H:51
Foam::ThermalPhaseChangePhaseSystem::iDmdt
tmp< volScalarField > iDmdt(const phasePairKey &key) const
Definition: ThermalPhaseChangePhaseSystem.C:32
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:57
Foam::saturationModel
Definition: saturationModel.H:49
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:103
Foam::ThermalPhaseChangePhaseSystem::iDmdtTable
HashPtrTable< volScalarField, phasePairKey, phasePairKey::hash > iDmdtTable
Definition: ThermalPhaseChangePhaseSystem.H:61
Foam::ThermalPhaseChangePhaseSystem::iDmdt_
iDmdtTable iDmdt_
Definition: ThermalPhaseChangePhaseSystem.H:82
Foam::ThermalPhaseChangePhaseSystem::wMDotLTable
HashPtrTable< volScalarField, phasePairKey, phasePairKey::hash > wMDotLTable
Definition: ThermalPhaseChangePhaseSystem.H:67
Foam::ThermalPhaseChangePhaseSystem::read
virtual bool read()
Definition: ThermalPhaseChangePhaseSystem.C:533
Foam::ThermalPhaseChangePhaseSystem::phaseChange_
Switch phaseChange_
Definition: ThermalPhaseChangePhaseSystem.H:79
saturationModel.H
Foam::ThermalPhaseChangePhaseSystem::~ThermalPhaseChangePhaseSystem
virtual ~ThermalPhaseChangePhaseSystem()
Definition: ThermalPhaseChangePhaseSystem.C:161
Foam::ThermalPhaseChangePhaseSystem::ThermalPhaseChangePhaseSystem
ThermalPhaseChangePhaseSystem(const fvMesh &)
Definition: ThermalPhaseChangePhaseSystem.C:70
ThermalPhaseChangePhaseSystem.C
Foam::ThermalPhaseChangePhaseSystem::correctInterfaceThermo
virtual void correctInterfaceThermo()
Definition: ThermalPhaseChangePhaseSystem.C:337
Switch.H
Foam::ThermalPhaseChangePhaseSystem::saturationModel_
autoPtr< saturationModel > saturationModel_
Definition: ThermalPhaseChangePhaseSystem.H:76
Foam::PtrList
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
Definition: List.H:55
Foam::phasePairKey
An ordered or unorder pair of phase names. Typically specified as follows.
Definition: phasePairKey.H:61
Foam::fvMesh
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:81
Foam
Definition: atmBoundaryLayer.C:26
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:49
Foam::HashPtrTable< volScalarField, phasePairKey, phasePairKey::hash >
Foam::ThermalPhaseChangePhaseSystem::wDmdtTable
HashPtrTable< volScalarField, phasePairKey, phasePairKey::hash > wDmdtTable
Definition: ThermalPhaseChangePhaseSystem.H:64
Foam::ThermalPhaseChangePhaseSystem::saturation
const saturationModel & saturation() const
Definition: ThermalPhaseChangePhaseSystem.C:169
Foam::ThermalPhaseChangePhaseSystem::dmdt
virtual tmp< volScalarField > dmdt(const phasePairKey &key) const
Definition: ThermalPhaseChangePhaseSystem.C:178
Foam::ThermalPhaseChangePhaseSystem::wMDotL_
wMDotLTable wMDotL_
Definition: ThermalPhaseChangePhaseSystem.H:88
Foam::ThermalPhaseChangePhaseSystem::wDmdt
tmp< volScalarField > wDmdt(const phasePairKey &key) const
Definition: ThermalPhaseChangePhaseSystem.C:50
Foam::ThermalPhaseChangePhaseSystem::wDmdt_
wDmdtTable wDmdt_
Definition: ThermalPhaseChangePhaseSystem.H:85
Foam::ThermalPhaseChangePhaseSystem::heatTransfer
virtual autoPtr< phaseSystem::heatTransferTable > heatTransfer() const
Definition: ThermalPhaseChangePhaseSystem.C:216
Foam::ThermalPhaseChangePhaseSystem::massTransfer
virtual autoPtr< phaseSystem::massTransferTable > massTransfer() const
Definition: ThermalPhaseChangePhaseSystem.C:278