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 | www.openfoam.com
6 \\/ M anipulation |
7-------------------------------------------------------------------------------
8 Copyright (C) 2015-2018 OpenFOAM Foundation
9-------------------------------------------------------------------------------
10License
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
26Class
27 Foam::MomentumTransferPhaseSystem
28
29Description
30 Class which models interfacial momenum transfer between a number of phases.
31 Drag, virtual mass, lift, wall lubrication and turbulent dispersion are all
32 modelled. The explicit contribution from the drag is omitted from the
33 transfer matrices, as this forms part of the solution of the pressure
34 equation.
35
36SourceFiles
37 MomentumTransferPhaseSystem.C
38
39\*---------------------------------------------------------------------------*/
40
41#ifndef MomentumTransferPhaseSystem_H
42#define MomentumTransferPhaseSystem_H
43
44#include "phaseSystem.H"
45#include "HashPtrTable.H"
46
47// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48
49namespace Foam
50{
51
52template<class modelType>
53class BlendedInterfacialModel;
54
55class blendingMethod;
56class dragModel;
57class virtualMassModel;
58class liftModel;
59class wallLubricationModel;
60class turbulentDispersionModel;
61
62/*---------------------------------------------------------------------------*\
63 Class MomentumTransferPhaseSystem Declaration
64\*---------------------------------------------------------------------------*/
65
66template<class BasePhaseSystem>
68:
69 public BasePhaseSystem
70{
71protected:
72
73 // Protected typedefs
74
75 typedef HashPtrTable
76 <
80 > KdTable;
81
82 typedef HashPtrTable
83 <
87 > KdfTable;
88
89 typedef HashPtrTable
90 <
94 > VmTable;
95
96 typedef HashPtrTable
97 <
101 > VmfTable;
102
103 typedef HashTable
104 <
109
110 typedef HashTable
111 <
116
117 typedef HashTable
118 <
123
124 typedef HashTable
125 <
130
131 typedef HashTable
132 <
137
138
139private:
140
141 // Private data
142
143 //- Drag coefficients
144 KdTable Kds_;
145
146 //- Face drag coefficients
147 KdfTable Kdfs_;
148
149 //- Virtual mass coefficients
150 VmTable Vms_;
151
152 //- Face virtual mass coefficients
153 VmfTable Vmfs_;
154
155 //- The phase diffusivities divided by the momentum coefficients
157
158 // Sub Models
159
160 //- Drag models
161 dragModelTable dragModels_;
162
163 //- Virtual mass models
164 virtualMassModelTable virtualMassModels_;
165
166 //- Lift models
167 liftModelTable liftModels_;
168
169 //- Wall lubrication models
170 wallLubricationModelTable wallLubricationModels_;
171
172 //- Turbulent dispersion models
173 turbulentDispersionModelTable turbulentDispersionModels_;
174
175
176 // Private member functions
177
178 //- Return the drag coefficient for the phase pair
179 virtual tmp<volScalarField> Kd(const phasePairKey& key) const;
180
181 //- Return the face drag coefficient for the phase pair
182 virtual tmp<surfaceScalarField> Kdf(const phasePairKey& key) const;
183
184 //- Return the virtual mass coefficient for the phase pair
185 virtual tmp<volScalarField> Vm(const phasePairKey& key) const;
186
187 //- Add the mass-transfer-based momentum transfer to the equations
188 void addMassTransferMomentumTransfer
189 (
191 ) const;
192
193public:
194
195 // Constructors
196
197 //- Construct from fvMesh
199
200
201 //- Destructor
203
204
205 // Member Functions
206
207 //- Return the momentum transfer matrices for the cell-based algorithm.
208 // This includes implicit and explicit forces that add into the cell
209 // UEqn in the normal way.
211
212 //- As momentumTransfer, but for the face-based algorithm
214
215 //- Return implicit force coefficients on the faces, for the face-based
216 // algorithm.
217 virtual PtrList<surfaceScalarField> AFfs() const;
218
219 //- Return the explicit force fluxes for the cell-based algorithm, that
220 // do not depend on phase mass/volume fluxes, and can therefore be
221 // evaluated outside the corrector loop. This includes things like
222 // lift, turbulent dispersion, and wall lubrication.
224 (
226 );
227
228 //- As phiFs, but for the face-based algorithm
230 (
232 );
233
234 //- Return the explicit drag force fluxes for the cell-based algorithm.
235 // These depend on phase mass/volume fluxes, and must therefore be
236 // evaluated inside the corrector loop.
238 (
240 ) const;
241
242 //- As phiKdPhis, but for the face-based algorithm
244 (
246 ) const;
247
248 //- Return the explicit part of the drag force for the cell-based
249 // algorithm. This is the cell-equivalent of phiKdPhis. These depend on
250 // phase velocities, and must therefore be evaluated inside the
251 // corrector loop.
253 (
255 ) const;
256
257 //- Solve the drag system for the velocities and fluxes
258 virtual void partialElimination
259 (
261 );
262
263 //- As partialElimination, but for the face-based algorithm. Only solves
264 // for the fluxes.
265 virtual void partialEliminationf
266 (
268 );
269
270 //- Return the flux corrections for the cell-based algorithm. These
271 // depend on phase mass/volume fluxes, and must therefore be evaluated
272 // inside the corrector loop.
274 (
276 const bool includeVirtualMass = false
277 ) const;
278
279 //- Return the phase diffusivities divided by the momentum coefficients
280 virtual const HashPtrTable<surfaceScalarField>& DByAfs() const;
281
282 //- Read base phaseProperties dictionary
283 virtual bool read();
284};
285
286
287// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
288
289} // End namespace Foam
290
291// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
292
293#ifdef NoRepository
295#endif
296
297// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
298
299#endif
300
301// ************************************************************************* //
A HashTable of pointers to objects of type <T>, with deallocation management of the pointers.
Definition: HashPtrTable.H:68
A HashTable similar to std::unordered_map.
Definition: HashTable.H:123
Class which models interfacial momenum transfer between a number of phases. Drag, virtual mass,...
virtual PtrList< surfaceScalarField > AFfs() const
Return implicit force coefficients on the faces, for the face-based.
HashTable< autoPtr< BlendedInterfacialModel< dragModel > >, phasePairKey, phasePairKey::hash > dragModelTable
HashPtrTable< volScalarField, phasePairKey, phasePairKey::hash > KdTable
virtual PtrList< surfaceScalarField > phiFs(const PtrList< volScalarField > &rAUs)
Return the explicit force fluxes for the cell-based algorithm, that.
virtual autoPtr< phaseSystem::momentumTransferTable > momentumTransfer()
Return the momentum transfer matrices for the cell-based algorithm.
virtual PtrList< surfaceScalarField > ddtCorrByAs(const PtrList< volScalarField > &rAUs, const bool includeVirtualMass=false) const
Return the flux corrections for the cell-based algorithm. These.
virtual void partialElimination(const PtrList< volScalarField > &rAUs)
Solve the drag system for the velocities and fluxes.
virtual PtrList< surfaceScalarField > phiKdPhifs(const PtrList< surfaceScalarField > &rAUfs) const
As phiKdPhis, but for the face-based algorithm.
HashTable< autoPtr< BlendedInterfacialModel< turbulentDispersionModel > >, phasePairKey, phasePairKey::hash > turbulentDispersionModelTable
HashPtrTable< surfaceScalarField, phasePairKey, phasePairKey::hash > VmfTable
HashPtrTable< surfaceScalarField, phasePairKey, phasePairKey::hash > KdfTable
HashTable< autoPtr< BlendedInterfacialModel< virtualMassModel > >, phasePairKey, phasePairKey::hash > virtualMassModelTable
HashPtrTable< volScalarField, phasePairKey, phasePairKey::hash > VmTable
virtual PtrList< volVectorField > KdUByAs(const PtrList< volScalarField > &rAUs) const
Return the explicit part of the drag force for the cell-based.
virtual const HashPtrTable< surfaceScalarField > & DByAfs() const
Return the phase diffusivities divided by the momentum coefficients.
virtual void partialEliminationf(const PtrList< surfaceScalarField > &rAUfs)
As partialElimination, but for the face-based algorithm. Only solves.
virtual PtrList< surfaceScalarField > phiFfs(const PtrList< surfaceScalarField > &rAUfs)
As phiFs, but for the face-based algorithm.
virtual autoPtr< phaseSystem::momentumTransferTable > momentumTransferf()
As momentumTransfer, but for the face-based algorithm.
virtual PtrList< surfaceScalarField > phiKdPhis(const PtrList< volScalarField > &rAUs) const
Return the explicit drag force fluxes for the cell-based algorithm.
HashTable< autoPtr< BlendedInterfacialModel< wallLubricationModel > >, phasePairKey, phasePairKey::hash > wallLubricationModelTable
HashTable< autoPtr< BlendedInterfacialModel< liftModel > >, phasePairKey, phasePairKey::hash > liftModelTable
virtual bool read()
Read base phaseProperties dictionary.
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
Definition: PtrList.H:73
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: autoPtr.H:66
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:91
An ordered or unorder pair of phase names. Typically specified as follows.
Definition: phasePairKey.H:68
A class for managing temporary objects.
Definition: tmp.H:65
PtrList< volScalarField > rAUs
Definition: pEqn.H:4
PtrList< surfaceScalarField > rAUfs
Definition: pEqn.H:30
Namespace for OpenFOAM.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:82
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
Hashing functor for phasePairKey.
Definition: phasePairKey.H:123