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 // ************************************************************************* //
Foam::phasePairKey::hasher
Hashing functor for phasePairKey.
Definition: phasePairKey.H:122
Foam::PhaseTransferPhaseSystem::rDmdt
virtual tmp< volScalarField > rDmdt(const phasePairKey &key) const
Return the representation mass transfer rate.
Definition: PhaseTransferPhaseSystem.C:37
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Foam::PhaseTransferPhaseSystem::phaseTransferModelTable
HashTable< autoPtr< BlendedInterfacialModel< phaseTransferModel > >, phasePairKey, phasePairKey::hash > phaseTransferModelTable
Definition: PhaseTransferPhaseSystem.H:69
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::PhaseTransferPhaseSystem::dmdts
virtual PtrList< volScalarField > dmdts() const
Return the mass transfer rates for each phase.
Definition: PhaseTransferPhaseSystem.C:108
Foam::PhaseTransferPhaseSystem::rDmdt_
rDmdtTable rDmdt_
Mass transfer rates.
Definition: PhaseTransferPhaseSystem.H:83
PhaseTransferPhaseSystem.C
Foam::PhaseTransferPhaseSystem::phaseTransferModels_
phaseTransferModelTable phaseTransferModels_
Mass transfer models.
Definition: PhaseTransferPhaseSystem.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::PhaseTransferPhaseSystem::~PhaseTransferPhaseSystem
virtual ~PhaseTransferPhaseSystem()
Destructor.
Definition: PhaseTransferPhaseSystem.C:89
Foam::phasePairKey
An ordered or unorder pair of phase names. Typically specified as follows.
Definition: phasePairKey.H:65
Foam::PhaseTransferPhaseSystem::PhaseTransferPhaseSystem
PhaseTransferPhaseSystem(const fvMesh &)
Construct from fvMesh.
Definition: PhaseTransferPhaseSystem.C:56
Foam::PhaseTransferPhaseSystem
Class which models non-thermally-coupled mass transfers; i.e., representation changes,...
Definition: PhaseTransferPhaseSystem.H:56
Foam::PhaseTransferPhaseSystem::correct
virtual void correct()
Correct the mass transfer rates.
Definition: PhaseTransferPhaseSystem.C:203
Foam::PhaseTransferPhaseSystem::rDmdtTable
HashPtrTable< volScalarField, phasePairKey, phasePairKey::hash > rDmdtTable
Definition: PhaseTransferPhaseSystem.H:72
Foam::fvMesh
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:85
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::PhaseTransferPhaseSystem::read
virtual bool read()
Read base phaseProperties dictionary.
Definition: PhaseTransferPhaseSystem.C:232
Foam::HashTable
A HashTable similar to std::unordered_map.
Definition: HashTable.H:105
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
Foam::PhaseTransferPhaseSystem::dmdt
virtual tmp< volScalarField > dmdt(const phasePairKey &key) const
Return the mass transfer rate for a pair.
Definition: PhaseTransferPhaseSystem.C:98
Foam::PhaseTransferPhaseSystem::massTransfer
virtual autoPtr< phaseSystem::massTransferTable > massTransfer() const
Return the mass transfer matrices.
Definition: PhaseTransferPhaseSystem.C:127
Foam::HashPtrTable< volScalarField, phasePairKey, phasePairKey::hash >