MomentumTransferPhaseSystem.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 | Copyright (C) 2015 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::MomentumTransferPhaseSystem
26 
27 Description
28  Class which models interfacial momenum transfer between a number of phases.
29  Drag, virtual mass, lift, wall lubrication and turbulent dispersion are all
30  modelled. The explicit contribution from the drag is omitted from the
31  transfer matrices, as this forms part of the solution of the pressure
32  equation.
33 
34 SourceFiles
35  MomentumTransferPhaseSystem.C
36 
37 \*---------------------------------------------------------------------------*/
38 
39 #ifndef MomentumTransferPhaseSystem_H
40 #define MomentumTransferPhaseSystem_H
41 
42 #include "phaseSystem.H"
43 #include "HashPtrTable.H"
44 
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 
47 namespace Foam
48 {
49 
50 template <class modelType>
51 class BlendedInterfacialModel;
52 
53 class blendingMethod;
54 class dragModel;
55 class virtualMassModel;
56 class liftModel;
57 class wallLubricationModel;
58 class turbulentDispersionModel;
59 
60 /*---------------------------------------------------------------------------*\
61  Class MomentumTransferPhaseSystem Declaration
62 \*---------------------------------------------------------------------------*/
63 
64 template<class BasePhaseSystem>
66 :
67  public BasePhaseSystem
68 {
69 protected:
70 
71  // Protected typedefs
72 
73  typedef HashTable
74  <
79 
80  typedef HashTable
81  <
86 
87  typedef HashTable
88  <
93 
94  typedef HashTable
95  <
100 
101  typedef HashTable
102  <
104  phasePairKey,
107 
108 
109 private:
110 
111  // Private data
112 
113  //- Drag coefficients
115 
116  //- Virtual mass coefficients
118 
119  // Sub Models
120 
121  //- Drag models
123 
124  //- Virtual mass models
126 
127  //- Lift models
129 
130  //- Wall lubrication models
132 
133  //- Turbulent dispersion models
135 
136  //- Construct element phasei of Fs if not set and return
137  // Used by Fs()
139  (
141  ) const;
142 
143  //- Construct element phasei of phiDs if not set and return
144  // Used by phiDs()
146  (
148  ) const;
149 
150 
151 public:
152 
153  // Constructors
154 
155  //- Construct from fvMesh
157 
158 
159  //- Destructor
161 
162 
163  // Member Functions
164 
165  //- Constant access to drag coefficients
166  virtual const phaseSystem::KdTable& Kds() const
167  {
168  return Kds_;
169  }
170 
171  //- Return the drag coefficient
172  virtual tmp<volScalarField> Kd(const phasePairKey& key) const;
173 
174  //- Return the face drag coefficient
175  virtual tmp<surfaceScalarField> Kdf(const phasePairKey& key) const;
176 
177  //- Return the drag coefficient for phase
178  virtual tmp<volScalarField> Kd(const phaseModel& phase) const;
179 
180  //- Return the virtual mass coefficient
181  virtual tmp<volScalarField> Vm(const phasePairKey& key) const;
182 
183  //- Return the face virtual mass coefficient
184  virtual tmp<surfaceScalarField> Vmf(const phasePairKey& key) const;
185 
186  //- Return the combined force (lift + wall-lubrication)
187  virtual tmp<volVectorField> F(const phasePairKey& key) const;
188 
189  //- Return the combined force (lift + wall-lubrication)
190  virtual autoPtr<PtrList<volVectorField> > Fs() const;
191 
192  //- Return the turbulent dispersion force on faces for phase pair
194  (
196  ) const;
197 
198  //- Return the combined face-force (lift + wall-lubrication)
199  virtual tmp<surfaceScalarField> Ff(const phasePairKey& key) const;
200 
201  //- Return the turbulent diffusivity
202  // Multiplies the phase-fraction gradient
203  virtual tmp<volScalarField> D(const phasePairKey& key) const;
204 
205  //- Return the momentum transfer matrices
207  momentumTransfer() const;
208 
209  //- Read base phaseProperties dictionary
210  virtual bool read();
211 };
212 
213 
214 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
215 
216 } // End namespace Foam
217 
218 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
219 
220 #ifdef NoRepository
222 #endif
223 
224 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
225 
226 #endif
227 
228 // ************************************************************************* //
Foam::MomentumTransferPhaseSystem::liftModels_
liftModelTable liftModels_
Lift models.
Definition: MomentumTransferPhaseSystem.H:127
Foam::phaseModel
Single incompressible phase derived from the phase-fraction. Used as part of the multiPhaseMixture fo...
Definition: phaseModel.H:53
MomentumTransferPhaseSystem.C
Foam::MomentumTransferPhaseSystem::virtualMassModelTable
HashTable< autoPtr< BlendedInterfacialModel< virtualMassModel > >, phasePairKey, phasePairKey::hash > virtualMassModelTable
Definition: MomentumTransferPhaseSystem.H:84
Foam::MomentumTransferPhaseSystem::D
virtual tmp< volScalarField > D(const phasePairKey &key) const
Return the turbulent diffusivity.
Foam::phase
Single incompressible phase derived from the phase-fraction. Used as part of the multiPhaseMixture fo...
Definition: phase.H:52
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:118
Foam::phasePairKey::hash
Definition: phasePairKey.H:52
Foam::MomentumTransferPhaseSystem::wallLubricationModels_
wallLubricationModelTable wallLubricationModels_
Wall lubrication models.
Definition: MomentumTransferPhaseSystem.H:130
Foam::MomentumTransferPhaseSystem::momentumTransfer
virtual autoPtr< phaseSystem::momentumTransferTable > momentumTransfer() const
Return the momentum transfer matrices.
Foam::MomentumTransferPhaseSystem::Kd
virtual tmp< volScalarField > Kd(const phasePairKey &key) const
Return the drag coefficient.
Foam::MomentumTransferPhaseSystem::~MomentumTransferPhaseSystem
virtual ~MomentumTransferPhaseSystem()
Destructor.
phaseSystem.H
Foam::MomentumTransferPhaseSystem::wallLubricationModelTable
HashTable< autoPtr< BlendedInterfacialModel< wallLubricationModel > >, phasePairKey, phasePairKey::hash > wallLubricationModelTable
Definition: MomentumTransferPhaseSystem.H:98
Foam::MomentumTransferPhaseSystem::dragModels_
dragModelTable dragModels_
Drag models.
Definition: MomentumTransferPhaseSystem.H:121
Foam::MomentumTransferPhaseSystem::Fs
virtual autoPtr< PtrList< volVectorField > > Fs() const
Return the combined force (lift + wall-lubrication)
Foam::MomentumTransferPhaseSystem::Kds
virtual const phaseSystem::KdTable & Kds() const
Constant access to drag coefficients.
Definition: MomentumTransferPhaseSystem.H:165
Foam::MomentumTransferPhaseSystem::setF
volVectorField & setF(PtrList< volVectorField > &Fs, const label phasei) const
Construct element phasei of Fs if not set and return.
Foam::MomentumTransferPhaseSystem::Kdf
virtual tmp< surfaceScalarField > Kdf(const phasePairKey &key) const
Return the face drag coefficient.
Foam::MomentumTransferPhaseSystem::dragModelTable
HashTable< autoPtr< BlendedInterfacialModel< dragModel > >, phasePairKey, phasePairKey::hash > dragModelTable
Definition: MomentumTransferPhaseSystem.H:77
Foam::label
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
Foam::PtrList
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
Definition: List.H:61
Foam::phasePairKey
Definition: phasePairKey.H:46
Foam::MomentumTransferPhaseSystem::turbulentDispersionModelTable
HashTable< autoPtr< BlendedInterfacialModel< turbulentDispersionModel > >, phasePairKey, phasePairKey::hash > turbulentDispersionModelTable
Definition: MomentumTransferPhaseSystem.H:105
Foam::MomentumTransferPhaseSystem::MomentumTransferPhaseSystem
MomentumTransferPhaseSystem(const fvMesh &)
Construct from fvMesh.
Foam::fvMesh
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::MomentumTransferPhaseSystem::Kds_
phaseSystem::KdTable Kds_
Drag coefficients.
Definition: MomentumTransferPhaseSystem.H:113
Foam::MomentumTransferPhaseSystem::virtualMassModels_
virtualMassModelTable virtualMassModels_
Virtual mass models.
Definition: MomentumTransferPhaseSystem.H:124
Foam::MomentumTransferPhaseSystem::Vms_
phaseSystem::VmTable Vms_
Virtual mass coefficients.
Definition: MomentumTransferPhaseSystem.H:116
Foam::MomentumTransferPhaseSystem::read
virtual bool read()
Read base phaseProperties dictionary.
Foam::HashTable
An STL-conforming hash table.
Definition: HashTable.H:61
Foam::autoPtr
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:117
Foam::MomentumTransferPhaseSystem::F
virtual tmp< volVectorField > F(const phasePairKey &key) const
Return the combined force (lift + wall-lubrication)
phasei
label phasei
Definition: pEqn.H:37
Foam::HashPtrTable< volScalarField, phasePairKey, phasePairKey::hash >
HashPtrTable.H
Foam::MomentumTransferPhaseSystem::Vmf
virtual tmp< surfaceScalarField > Vmf(const phasePairKey &key) const
Return the face virtual mass coefficient.
Foam::MomentumTransferPhaseSystem::setPhiD
surfaceScalarField & setPhiD(PtrList< surfaceScalarField > &phiDs, const label phasei) const
Construct element phasei of phiDs if not set and return.
Foam::MomentumTransferPhaseSystem::liftModelTable
HashTable< autoPtr< BlendedInterfacialModel< liftModel > >, phasePairKey, phasePairKey::hash > liftModelTable
Definition: MomentumTransferPhaseSystem.H:91
Foam::MomentumTransferPhaseSystem::Vm
virtual tmp< volScalarField > Vm(const phasePairKey &key) const
Return the virtual mass coefficient.
rAUs
PtrList< volScalarField > rAUs(fluid.phases().size())
Foam::GeometricField
Generic GeometricField class.
Definition: surfaceFieldsFwd.H:52
Foam::MomentumTransferPhaseSystem
Class which models interfacial momenum transfer between a number of phases. Drag, virtual mass,...
Definition: MomentumTransferPhaseSystem.H:64
Foam::MomentumTransferPhaseSystem::phiDs
virtual autoPtr< PtrList< surfaceScalarField > > phiDs(const PtrList< volScalarField > &rAUs) const
Return the turbulent dispersion force on faces for phase pair.
Foam::MomentumTransferPhaseSystem::turbulentDispersionModels_
turbulentDispersionModelTable turbulentDispersionModels_
Turbulent dispersion models.
Definition: MomentumTransferPhaseSystem.H:133
Foam::MomentumTransferPhaseSystem::Ff
virtual tmp< surfaceScalarField > Ff(const phasePairKey &key) const
Return the combined face-force (lift + wall-lubrication)