PhaseTransferPhaseSystem.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) 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::PhaseTransferPhaseSystem
28 
29 Description
30  Class which models non-thermally-coupled mass transfers; i.e.,
31  representation changes, rather than phase changes.
32 
33 SourceFiles
34  PhaseTransferPhaseSystem.C
35 
36 \*---------------------------------------------------------------------------*/
37 
38 #ifndef PhaseTransferPhaseSystem_H
39 #define PhaseTransferPhaseSystem_H
40 
41 #include "phaseSystem.H"
42 
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 
45 namespace Foam
46 {
47 
48 class blendingMethod;
49 template<class modelType> class BlendedInterfacialModel;
50 class phaseTransferModel;
51 
52 /*---------------------------------------------------------------------------*\
53  Class PhaseTransferPhaseSystem Declaration
54 \*---------------------------------------------------------------------------*/
55 
56 template<class BasePhaseSystem>
58 :
59  public BasePhaseSystem
60 {
61 protected:
62 
63  // Protected typedefs
64 
65  typedef HashTable
66  <
71 
73  rDmdtTable;
74 
75 
76  // Protected data
77 
78  // Sub Models
79 
80  //- Mass transfer models
82 
83  //- Mass transfer rates
85 
86  // Protected member functions
87 
88  //- Return the representation mass transfer rate
89  virtual tmp<volScalarField> rDmdt(const phasePairKey& key) const;
90 
91 
92 public:
93 
94  // Constructors
95 
96  //- Construct from fvMesh
98 
99 
100  //- Destructor
101  virtual ~PhaseTransferPhaseSystem();
102 
103 
104  // Member Functions
105 
106  //- Return the mass transfer rate for a pair
107  virtual tmp<volScalarField> dmdt(const phasePairKey& key) const;
108 
109  //- Return the mass transfer rates for each phase
110  virtual PtrList<volScalarField> dmdts() const;
111 
112  //- Return the mass transfer matrices
114 
115  //- Correct the mass transfer rates
116  virtual void correct();
117 
118  //- Read base phaseProperties dictionary
119  virtual bool read();
120 };
121 
122 
123 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
124 
125 } // End namespace Foam
126 
127 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
128 
129 #ifdef NoRepository
130  #include "PhaseTransferPhaseSystem.C"
131 #endif
132 
133 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
134 
135 #endif
136 
137 // ************************************************************************* //
PhaseTransferPhaseSystem(const fvMesh &)
Construct from fvMesh.
virtual PtrList< volScalarField > dmdts() const
Return the mass transfer rates for each phase.
virtual tmp< volScalarField > dmdt(const phasePairKey &key) const
Return the mass transfer rate for a pair.
virtual void correct()
Correct the mass transfer rates.
HashPtrTable< volScalarField, phasePairKey, phasePairKey::hash > rDmdtTable
Class which models non-thermally-coupled mass transfers; i.e., representation changes, rather than phase changes.
virtual bool read()
Read base phaseProperties dictionary.
Hashing functor for phasePairKey.
Definition: phasePairKey.H:138
virtual autoPtr< phaseSystem::massTransferTable > massTransfer() const
Return the mass transfer matrices.
HashTable< autoPtr< BlendedInterfacialModel< phaseTransferModel > >, phasePairKey, phasePairKey::hash > phaseTransferModelTable
A HashTable similar to std::unordered_map.
Definition: HashTable.H:108
An ordered or unorder pair of phase names. Typically specified as follows.
Definition: phasePairKey.H:61
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
virtual tmp< volScalarField > rDmdt(const phasePairKey &key) const
Return the representation mass transfer rate.
virtual ~PhaseTransferPhaseSystem()
Destructor.
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
Definition: HashPtrTable.H:48
A class for managing temporary objects.
Definition: HashPtrTable.H:50
rDmdtTable rDmdt_
Mass transfer rates.
phaseTransferModelTable phaseTransferModels_
Mass transfer models.
Namespace for OpenFOAM.