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-2020 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 blendingMethod;
47 template<class modelType> class BlendedInterfacialModel;
48 class phaseTransferModel;
49 
50 /*---------------------------------------------------------------------------*\
51  Class PhaseTransferPhaseSystem Declaration
52 \*---------------------------------------------------------------------------*/
53 
54 template<class BasePhaseSystem>
56 :
57  public BasePhaseSystem
58 {
59 private:
60 
61  // Private typedefs
62 
63  typedef HashTable
64  <
69 
70 
71  // Private data
72 
73  // Sub Models
74 
75  //- Mass transfer models
76  phaseTransferModelTable phaseTransferModels_;
77 
78  //- Bulk mass transfer rates
80 
81  //- Specie mass transfer rates
82  phaseSystem::dmidtfTable dmidtfs_;
83 
84 
85  // Private Member Functions
86 
87  //- Return the summed mass transfers across each interface
88  autoPtr<phaseSystem::dmdtfTable> totalDmdtfs() const;
89 
90 
91 protected:
92 
93  // Protected member functions
94 
95  //- Add specie transfer terms which result from bulk mass transfers
96  void addDmdtYfs
97  (
98  const phaseSystem::dmdtfTable& dmdtfs,
100  ) const;
101 
102  //- Add specie transfer terms which result from specie mass transfers
103  void addDmidtYf
104  (
105  const phaseSystem::dmidtfTable& dmidtfs,
107  ) const;
108 
109 
110 public:
111 
112  // Constructors
113 
114  //- Construct from fvMesh
116 
117 
118  //- Destructor
119  virtual ~PhaseTransferPhaseSystem();
120 
121 
122  // Member Functions
123 
124  //- Return the mass transfer rate for an interface
125  virtual tmp<volScalarField> dmdtf(const phasePairKey& key) const;
126 
127  //- Return the mass transfer rates for each phase
128  virtual PtrList<volScalarField> dmdts() const;
129 
130  //- Return the momentum transfer matrices for the cell-based algorithm
132 
133  //- Return the momentum transfer matrices for the face-based algorithm
135 
136  //- Return the heat transfer matrices
138 
139  //- Return the specie transfer matrices
141  specieTransfer() const;
142 
143  //- Correct the mass transfer rates
144  virtual void correct();
145 
146  //- Read base phaseProperties dictionary
147  virtual bool read();
148 };
149 
150 
151 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
152 
153 } // End namespace Foam
154 
155 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
156 
157 #ifdef NoRepository
158  #include "PhaseTransferPhaseSystem.C"
159 #endif
160 
161 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
162 
163 #endif
164 
165 // ************************************************************************* //
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.
virtual void correct()
Correct the mass transfer rates.
virtual bool read()
Read base phaseProperties dictionary.
virtual tmp< volScalarField > dmdtf(const phasePairKey &key) const
Return the mass transfer rate for an interface.
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.
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:78
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.