PhaseTransferPhaseSystem.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) 2018-2022 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::PhaseTransferPhaseSystem
26 
27 Description
28  Class which models non-thermally-coupled or weakly thermally coupled
29  mass transfers.
30 
31 SourceFiles
32  PhaseTransferPhaseSystem.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef PhaseTransferPhaseSystem_H
37 #define PhaseTransferPhaseSystem_H
38 
39 #include "phaseSystem.H"
40 
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 
43 namespace Foam
44 {
45 
46 class blendedPhaseTransferModel;
47 
48 /*---------------------------------------------------------------------------*\
49  Class PhaseTransferPhaseSystem Declaration
50 \*---------------------------------------------------------------------------*/
51 
52 template<class BasePhaseSystem>
54 :
55  public BasePhaseSystem
56 {
57 private:
58 
59  // Private typedefs
60 
61  typedef HashTable
62  <
67 
68 
69  // Private data
70 
71  // Sub Models
72 
73  //- Mass transfer models
74  phaseTransferModelTable phaseTransferModels_;
75 
76  //- Bulk mass transfer rates
78 
79  //- Specie mass transfer rates
80  phaseSystem::dmidtfTable dmidtfs_;
81 
82 
83  // Private Member Functions
84 
85  //- Return the summed mass transfers across each interface
86  autoPtr<phaseSystem::dmdtfTable> totalDmdtfs() const;
87 
88 
89 protected:
90 
91  // Protected member functions
92 
93  //- Add specie transfer terms which result from bulk mass transfers
94  void addDmdtYfs
95  (
96  const phaseSystem::dmdtfTable& dmdtfs,
98  ) const;
99 
100  //- Add specie transfer terms which result from specie mass transfers
101  void addDmidtYf
102  (
103  const phaseSystem::dmidtfTable& dmidtfs,
105  ) const;
106 
107 
108 public:
109 
110  // Constructors
111 
112  //- Construct from fvMesh
114 
115 
116  //- Destructor
117  virtual ~PhaseTransferPhaseSystem();
118 
119 
120  // Member Functions
121 
122  //- Return the mass transfer rate for an interface
123  virtual tmp<volScalarField> dmdtf(const phaseInterfaceKey& key) const;
124 
125  //- Return the mass transfer rates for each phase
126  virtual PtrList<volScalarField> dmdts() const;
127 
128  //- Return the momentum transfer matrices for the cell-based algorithm
130 
131  //- Return the momentum transfer matrices for the face-based algorithm
133 
134  //- Return the heat transfer matrices
136 
137  //- Return the specie transfer matrices
139  specieTransfer() const;
140 
141  //- Correct the mass transfer rates
142  virtual void correct();
143 
144  //- Read base phaseProperties dictionary
145  virtual bool read();
146 };
147 
148 
149 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
150 
151 } // End namespace Foam
152 
153 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
154 
155 #ifdef NoRepository
156  #include "PhaseTransferPhaseSystem.C"
157 #endif
158 
159 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
160 
161 #endif
162 
163 // ************************************************************************* //
PhaseTransferPhaseSystem(const fvMesh &)
Construct from fvMesh.
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.
Class which models non-thermally-coupled or weakly thermally coupled mass transfers.
Word-pair based class used for keying interface models in hash tables.
virtual void correct()
Correct the mass transfer rates.
virtual bool read()
Read base phaseProperties dictionary.
void addDmdtYfs(const phaseSystem::dmdtfTable &dmdtfs, phaseSystem::specieTransferTable &eqns) const
Add specie transfer terms which result from bulk mass transfers.
An STL-conforming hash table.
Definition: HashTable.H:61
virtual PtrList< volScalarField > dmdts() const
Return the mass transfer rates for each phase.
virtual autoPtr< phaseSystem::momentumTransferTable > momentumTransfer()
Return the momentum transfer matrices for the cell-based algorithm.
virtual autoPtr< phaseSystem::specieTransferTable > specieTransfer() const
Return the specie transfer matrices.
void addDmidtYf(const phaseSystem::dmidtfTable &dmidtfs, phaseSystem::specieTransferTable &eqns) const
Add specie transfer terms which result from specie mass transfers.
virtual tmp< volScalarField > dmdtf(const phaseInterfaceKey &key) const
Return the mass transfer rate for an interface.
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:95
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
Namespace for OpenFOAM.
virtual ~PhaseTransferPhaseSystem()
Destructor.