MassTransferPhaseSystem.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) 2017 OpenCFD Ltd.
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::MassTransferPhaseSystem
28 
29 Description
30  Class for mass transfer between phases
31 
32 SourceFiles
33  MassTransferPhaseSystem.C
34 
35 \*---------------------------------------------------------------------------*/
36 
37 #ifndef MassTransferPhaseSystem_H
38 #define MassTransferPhaseSystem_H
39 
40 #include "phaseSystem.H"
41 #include "HashPtrTable.H"
42 #include "interfaceCompositionModel.H"
43 
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 
46 namespace Foam
47 {
48 
49 /*---------------------------------------------------------------------------*\
50  Class MassTransferPhaseSystem Declaration
51 \*---------------------------------------------------------------------------*/
52 
53 template<class BasePhaseSystem>
55 :
56  public BasePhaseSystem
57 {
58 public:
59 
60  // Public typedefs
61 
62  typedef
63  HashTable
64  <
68  >
70 
71 protected:
72 
73  // Protected typedefs
74 
75  typedef
77  <
81  >
82  dmdtTable;
83 
84 
85  // Protected data
86 
87  //- Overall inter-phase mass transfer rates [Kg/s]
89 
90  //- Mass transfer models
92 
93 
94  // Protected memebers
95 
96  //- Calculate L between phases
98  (
99  const volScalarField& dmdtNetki,
100  const phasePairKey& keyik,
101  const phasePairKey& keyki,
102  const volScalarField& T
103  ) const;
104 
105 
106 public:
107 
108  // Constructors
109 
110  //- Construct from fvMesh
112 
113 
114  //- Destructor
115  virtual ~MassTransferPhaseSystem() = default;
116 
117 
118  // Member Functions
119 
120  //- Return total interfacial mass flow rate
121  tmp<volScalarField> dmdt(const phasePairKey& key) const;
122 
123 
124  // Mass transfer functions
125 
126  //- Return the heat transfer matrix and fill dmdt for phases
128 
129 
130  //- Calculate mass transfer for species
131  virtual void massSpeciesTransfer
132  (
133  const phaseModel& phase,
136  const word speciesName
137  );
138 
139 };
140 
141 
142 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
143 
144 } // End namespace Foam
145 
146 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
147 
148 #ifdef NoRepository
149 # include "MassTransferPhaseSystem.C"
150 #endif
151 
152 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
153 
154 #endif
155 
156 // ************************************************************************* //
Foam::phaseModel
Single incompressible phase derived from the phase-fraction. Used as part of the multiPhaseMixture fo...
Definition: phaseModel.H:57
Foam::MassTransferPhaseSystem::calculateL
tmp< volScalarField > calculateL(const volScalarField &dmdtNetki, const phasePairKey &keyik, const phasePairKey &keyki, const volScalarField &T) const
Calculate L between phases.
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:62
Foam::phase
Single incompressible phase derived from the phase-fraction. Used as part of the multiPhaseMixture fo...
Definition: phase.H:54
Foam::tmp< volScalarField >
Foam::phasePairKey::hash
Ordered or unordered hashing of word pair.
Definition: phasePairKey.H:65
Sp
zeroField Sp
Definition: alphaSuSp.H:2
Foam::MassTransferPhaseSystem::MassTransferPhaseSystem
MassTransferPhaseSystem(const fvMesh &)
Construct from fvMesh.
Foam::MassTransferPhaseSystem::dmdtTable
HashPtrTable< volScalarField, phasePairKey, phasePairKey::hash > dmdtTable
Definition: MassTransferPhaseSystem.H:81
Foam::MassTransferPhaseSystem::heatTransfer
virtual tmp< fvScalarMatrix > heatTransfer(const volScalarField &T)
Return the heat transfer matrix and fill dmdt for phases.
MassTransferPhaseSystem.C
Su
zeroField Su
Definition: alphaSuSp.H:1
Foam::MassTransferPhaseSystem::dmdt
tmp< volScalarField > dmdt(const phasePairKey &key) const
Return total interfacial mass flow rate.
Foam::MassTransferPhaseSystem::dmdt_
dmdtTable dmdt_
Overall inter-phase mass transfer rates [Kg/s].
Definition: MassTransferPhaseSystem.H:87
Foam::T
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
Definition: FieldFieldFunctions.C:58
Foam::MassTransferPhaseSystem::~MassTransferPhaseSystem
virtual ~MassTransferPhaseSystem()=default
Destructor.
Foam::volScalarField
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:57
Foam::phasePairKey
Definition: phasePairKey.H:59
Foam::MassTransferPhaseSystem::massTransferModels_
massTransferModelTable massTransferModels_
Mass transfer models.
Definition: MassTransferPhaseSystem.H:90
Foam::fvMesh
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:84
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::MassTransferPhaseSystem
Class for mass transfer between phases.
Definition: MassTransferPhaseSystem.H:53
Foam::MassTransferPhaseSystem::massTransferModelTable
HashTable< autoPtr< interfaceCompositionModel >, phasePairKey, phasePairKey::hash > massTransferModelTable
Definition: MassTransferPhaseSystem.H:68
Foam::HashTable
A HashTable similar to std::unordered_map.
Definition: HashTable.H:105
Foam::autoPtr< interfaceCompositionModel >
Foam::HashPtrTable
A HashTable of pointers to objects of type <T>.
Definition: HashPtrTable.H:54
Foam::MassTransferPhaseSystem::massSpeciesTransfer
virtual void massSpeciesTransfer(const phaseModel &phase, volScalarField::Internal &Su, volScalarField::Internal &Sp, const word speciesName)
Calculate mass transfer for species.
HashPtrTable.H
Foam::GeometricField< scalar, fvPatchField, volMesh >
Foam::DimensionedField
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Definition: DimensionedField.H:54