phaseSystem.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-2021 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::phaseSystem
28 
29 Description
30 
31 SourceFiles
32  phaseSystem.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef phaseSystem_H
37 #define phaseSystem_H
38 
39 #include "basicThermo.H"
40 
41 #include "phaseModel.H"
42 #include "phasePair.H"
43 #include "orderedPhasePair.H"
44 
45 #include "volFields.H"
46 #include "surfaceFields.H"
47 #include "fvMatricesFwd.H"
49 #include "localMin.H"
50 
51 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
52 
53 namespace Foam
54 {
55 
56 // Forward Declarations
57 namespace multiphaseInter
58 {
59 class surfaceTensionModel;
60 }
61 class porousModel;
62 
63 /*---------------------------------------------------------------------------*\
64  Class phaseSystem Declaration
65 \*---------------------------------------------------------------------------*/
66 
67 class phaseSystem
68 :
69  public basicThermo,
71 {
72 public:
73 
74  // Public typedefs
75 
76  typedef
77  HashTable
78  <
80  >
82 
83 
85 
86 
88 
89 
90 protected:
91 
92  // Protected typedefs
93 
94  typedef
96 
97 
98  typedef
99  HashTable
100  <
102  phasePairKey,
104  >
106 
107 
108  typedef
109  HashTable
110  <
112  phasePairKey,
114  >
116 
117 
118 
119  // Protected data
120 
121  //- Reference to the mesh
122  const fvMesh& mesh_;
123 
124  //- Dynamic viscocity
126 
127  //- Phase names
129 
130  //- Mixture total volumetric flux
132 
133  //- Mixture total mass flux
135 
136  //- Phase models
138 
139  //- Phase pairs
141 
142  //- Total ordered phase pairs in the system
144 
145  //- Turbulent Prandt number
147 
148 
149  // Sub Models
150 
151  //- Surface tension models
153 
154  //- Interface porous models
156 
157 
158  // Protected member functions
159 
160 
161  //- Calculate and return the laminar viscosity
162  void calcMu();
163 
164  //- Generate the phases
166  (
167  const wordList& names
168  ) const;
169 
170  //- Generate the mixture flux
172  (
173  const HashTable<autoPtr<phaseModel>>& phaseModels
174  ) const;
175 
176  //- Generate pairs
177  void generatePairs(const dictTable& modelDicts);
178 
179  //- Generate pair table
180  void generatePairsTable();
181 
182  //- Generate pairs and sub-model tables using pair keys
183  template<class modelType>
184  void createSubModels
185  (
186  const dictTable& modelDicts,
187  HashTable
188  <
190  phasePairKey,
192  >& models
193  );
194 
195  //- Generate pairs and sub-model tables using mesh
196  template<class modelType>
197  void createSubModels
198  (
199  const dictTable& modelDicts,
200  const fvMesh& mesh,
201  HashTable
202  <
204  phasePairKey,
206  >& models
207  );
208 
209  //- Generate pairs and sub-model tables
210  template<class modelType>
212  (
213  const word& modelName,
214  HashTable
215  <
217  phasePairKey,
219  >& models
220  );
221 
222 
223  //- Generate pairs and per-phase sub-model tables with mesh ref
224  template<class modelType>
226  (
227  const word& modelName,
228  const fvMesh& mesh,
229  HashTable
230  <
232  phasePairKey,
234  >& models
235  );
236 
237 
238  //- Generate pairs and per-phase sub-model tables
239  template<class modelType>
241  (
242  const word& modelName,
243  HashTable
244  <
246  phasePairKey,
248  >& models
249  );
250 
251 
252 public:
253 
254  //- Runtime type information
255  TypeName("phaseSystem");
256 
257  //- Default name of the phase properties dictionary
258  static const word phasePropertiesName;
259 
260 
261  // Constructors
262 
263  //- Construct from fvMesh
264  phaseSystem(const fvMesh& mesh);
265 
266 
267  //- Destructor
268  virtual ~phaseSystem();
269 
270 
271  // Energy related thermo functionaliy functions
272 
273  //- Return access to the internal energy field [J/Kg]
274  // \note this mixture thermo is prepared to work with T
275  virtual volScalarField& he()
276  {
278  return const_cast<volScalarField&>(volScalarField::null());
279  }
280 
281  //- Return access to the internal energy field [J/Kg]
282  // \note this mixture thermo is prepared to work with T
283  virtual const volScalarField& he() const
284  {
286  return volScalarField::null();
287  }
288 
289  //- Enthalpy/Internal energy
290  // for given pressure and temperature [J/kg]
291  virtual tmp<volScalarField> he
292  (
293  const volScalarField& p,
294  const volScalarField& T
295  ) const;
296 
297  //- Enthalpy/Internal energy for cell-set [J/kg]
298  virtual tmp<scalarField> he
299  (
300  const scalarField& p,
301  const scalarField& T,
302  const labelList& cells
303  ) const;
304 
305  //- Enthalpy/Internal energy for patch [J/kg]
306  virtual tmp<scalarField> he
307  (
308  const scalarField& p,
309  const scalarField& T,
310  const label patchi
311  ) const;
312 
313  //- Chemical enthalpy of the mixture [J/kg]
314  virtual tmp<volScalarField> hc() const;
315 
316  //- Temperature from enthalpy/internal energy for cell-set
317  virtual tmp<scalarField> THE
318  (
319  const scalarField& h,
320  const scalarField& p,
321  const scalarField& T0,
322  const labelList& cells
323  ) const;
324 
325  //- Temperature from enthalpy/internal energy for patch
326  virtual tmp<scalarField> THE
327  (
328  const scalarField& h,
329  const scalarField& p,
330  const scalarField& T0,
331  const label patchi
332  ) const;
333 
334 
335  // Thermo
336 
337  //- Return the mixture density
338  virtual tmp<volScalarField> rho() const;
339 
340  //- Return the mixture density on a patch
341  virtual tmp<scalarField> rho(const label patchi) const;
342 
343  //- Return Cp of the mixture
344  virtual tmp<volScalarField> Cp() const;
345 
346  //- Heat capacity at constant pressure for patch [J/kg/K]
347  virtual tmp<scalarField> Cp
348  (
349  const scalarField& p,
350  const scalarField& T,
351  const label patchi
352  ) const;
353 
354  //- Heat capacity using pressure and temperature
356  (
357  const scalarField& p,
358  const scalarField& T,
359  const labelList& cells
360  ) const
361  {
363  return tmp<scalarField>::New(p);
364  }
365 
366  //- Return Cv of the mixture
367  virtual tmp<volScalarField> Cv() const;
368 
369  //- Heat capacity at constant volume for patch [J/kg/K]
370  virtual tmp<scalarField> Cv
371  (
372  const scalarField& p,
373  const scalarField& T,
374  const label patchI
375  ) const;
376 
377  //- Density from pressure and temperature
378  virtual tmp<scalarField> rhoEoS
379  (
380  const scalarField& p,
381  const scalarField& T,
382  const labelList& cells
383  ) const;
384 
385  //- Gamma = Cp/Cv []
386  virtual tmp<volScalarField> gamma() const;
387 
388  //- Gamma = Cp/Cv for patch []
389  virtual tmp<scalarField> gamma
390  (
391  const scalarField& p,
392  const scalarField& T,
393  const label patchi
394  ) const;
395 
396  //- Heat capacity at constant pressure/volume [J/kg/K]
397  virtual tmp<volScalarField> Cpv() const;
398 
399  //- Heat capacity at constant pressure/volume for patch [J/kg/K]
400  virtual tmp<scalarField> Cpv
401  (
402  const scalarField& p,
403  const scalarField& T,
404  const label patchi
405  ) const;
406 
407  //- Heat capacity ratio []
408  virtual tmp<volScalarField> CpByCpv() const;
409 
410  //- Heat capacity ratio for patch []
411  virtual tmp<scalarField> CpByCpv
412  (
413  const scalarField& p,
414  const scalarField& T,
415  const label patchi
416  ) const;
417 
418  //- Molecular weight [kg/kmol] of the mixture
419  virtual tmp<volScalarField> W() const;
420 
421 
422  // Transport
423 
424  //- Thermal diffusivity for temperature of mixture [J/m/s/K]
425  virtual tmp<volScalarField> kappa() const;
426 
427  //- Thermal diffusivity for temperature
428  // of mixture for patch [J/m/s/K]
429  virtual tmp<scalarField> kappa
430  (
431  const label patchi
432  ) const;
433 
434  //- Thermal diffusivity for energy of mixture [kg/m/s]
435  virtual tmp<volScalarField> alphahe() const;
436 
437  //- Thermal diffusivity for energy of mixture for patch [kg/m/s]
438  virtual tmp<scalarField> alphahe(const label patchi) const;
439 
440  //- Effective thermal diffusivity for temperature
441  // of mixture [J/m/s/K]
443  (
444  const volScalarField& kappat
445  ) const;
446 
447  //- Effective thermal diffusivity for temperature
448  // of mixture for patch [J/m/s/K]
449  virtual tmp<scalarField> kappaEff
450  (
451  const scalarField& alphat,
452  const label patchi
453  ) const;
454 
455  //- Effective thermal diffusivity of mixture [kg/m/s]
457  (
458  const volScalarField& alphat
459  ) const;
460 
461  //- Effective thermal diffusivity of mixture for patch [kg/m/s]
462  virtual tmp<scalarField> alphaEff
463  (
464  const scalarField& alphat,
465  const label patchi
466  ) const;
467 
468  //- Return Prandt number
469  const dimensionedScalar& Prt() const;
470 
471 
472  // Access to transport state variables
473 
474  //- Dynamic viscosity of mixture [kg/m/s]
475  virtual tmp<volScalarField> mu() const;
476 
477  //- Dynamic viscosity of mixture for patch [kg/m/s]
478  virtual tmp<scalarField> mu(const label patchi) const;
479 
480  //- Kinematic viscosity of mixture [m^2/s]
481  virtual tmp<volScalarField> nu() const;
482 
483  //- Kinematic viscosity of mixture for patch [m^2/s]
484  virtual tmp<scalarField> nu(const label patchi) const;
485 
486 
487  // Phase fluxes
488 
489  //- Constant access to the total flux
490  const surfaceScalarField& phi() const;
491 
492  //- Access to the total mixture flux
494 
495  //- Constant access to the mixture mass flux
496  const surfaceScalarField& rhoPhi() const;
497 
498  //- Access to the total mixture mass flux
500 
501  //- Mixture U
502  tmp<volVectorField> U() const;
503 
504 
505  // Surface tension
506 
507  //- Calculate surface tension of the mixture
509 
510  //- Return the surface tension coefficient
512  (
513  const phasePairKey& key
514  ) const;
515 
516 
517  //- Return coefficients (1/rho)
518  virtual tmp<volScalarField> coeffs(const word& key) const;
519 
520 
521  // Interface porous between solid/fluid phases
522 
523  //- Add interface porosity on phasePair
525 
526 
527  // Inter-Phase mass and heat transfe
528 
529  //- Return interfacial source mass rate per phase pair
530  virtual tmp<volScalarField> dmdt(const phasePairKey& key) const = 0;
531 
532  //- Return the heat transfer matrices
534  (
535  const volScalarField& T
536  ) = 0;
537 
538  //- Return the volumetric rate transfer matrix
540  (
541  const volScalarField& p
542  ) = 0;
543 
544  //- Calculate mass transfer for alpha's
545  virtual void alphaTransfer(SuSpTable& Su, SuSpTable& Sp) = 0;
546 
547  //- Calculate mass transfer for species
548  virtual void massSpeciesTransfer
549  (
550  const phaseModel& phase,
553  const word speciesName
554  ) = 0;
555 
556  //- Add volume change in pEq
557  virtual bool includeVolChange() = 0;
558 
559 
560  // Solve phases and correct models
561 
562  //- Solve for the phase transport equations
563  virtual void solve() = 0;
564 
565  //- Correct the mixture thermos
566  virtual void correct();
567 
568  //- Correct mass sources
569  virtual void correctMassSources(const volScalarField& T) = 0;
570 
571  //- Return the name of the thermo physics
572  virtual word thermoName() const
573  {
575  return word();
576  }
577 
578  //- Correct the turbulence
579  // \note Each phase could have its own turbulence
580  virtual void correctTurbulence();
581 
582  //- Read base phaseProperties dictionary
583  virtual bool read();
584 
585 
586  // Access to phases models
587 
588  //- Constant access the total phase pairs
589  const phasePairTable& totalPhasePairs() const;
590 
591  //- Non-constant access the total phase pairs
593 
594  //- Constant access the phases
595  const phaseModelTable& phases() const;
596 
597  //- Access the phases
599 
600  //- Access a sub model between a phase pair
601  template <class modelType>
602  const modelType& lookupSubModel(const phasePair& key) const;
603 
604  //- Access a sub model between two phases
605  template <class modelType>
606  const modelType& lookupSubModel
607  (
608  const phaseModel& from,
609  const phaseModel& to
610  ) const;
611 
612 
613  // Query phase thermo information
614 
615  //- Return true if the equation of state is incompressible for all
616  // phases
617  virtual bool incompressible() const;
618 
619  //- Return true if a phase is incompressible
620  virtual bool incompressible(const word) const;
621 
622  //- Return true if the equation of state is isochoric for all phasses
623  // i.e. rho = const
624  virtual bool isochoric() const;
625 
626  //- Return mesh
627  const fvMesh& mesh() const;
628 
629 
630  // Help functions for the interfaces
631 
632  //- Interface normal surface vector
634  (
635  const volScalarField& alpha1,
636  const volScalarField& alpha2
637  ) const;
638 
639 
640  //- Interface normal volume vector
642  (
643  const volScalarField& alpha1,
644  const volScalarField& alpha2
645  ) const;
646 
647 
648  //- Interface curvature
650  (
651  const volScalarField& alpha1,
652  const volScalarField& alpha2
653  ) const;
654 
655 
656  //- Near Interface of alpha1 and alpha2
658  (
659  const volScalarField& alpha1,
660  const volScalarField& alpha2
661  ) const;
662 
663  //- Near Interface of alpha'n
665 };
666 
667 
668 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
669 
670 } // End namespace Foam
671 
672 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
673 
674 #ifdef NoRepository
675 # include "phaseSystemTemplates.H"
676 #endif
677 
678 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
679 
680 #endif
681 
682 // ************************************************************************* //
Foam::labelList
List< label > labelList
A List of labels.
Definition: List.H:67
Foam::phaseSystem::totalPhasePairs
const phasePairTable & totalPhasePairs() const
Constant access the total phase pairs.
Definition: phaseSystem.C:944
Foam::phaseSystem::surfaceTensionForce
tmp< surfaceScalarField > surfaceTensionForce() const
Calculate surface tension of the mixture.
Definition: phaseSystem.C:997
volFields.H
Foam::phaseModel
Single incompressible phase derived from the phase-fraction. Used as part of the multiPhaseMixture fo...
Definition: phaseModel.H:54
Foam::phaseSystem::Cpv
virtual tmp< volScalarField > Cpv() const
Heat capacity at constant pressure/volume [J/kg/K].
Definition: phaseSystem.C:549
Foam::phaseSystem::Cv
virtual tmp< volScalarField > Cv() const
Return Cv of the mixture.
Definition: phaseSystem.C:458
Foam::scalarField
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
Definition: primitiveFieldsFwd.H:52
Foam::phasePair
Description for mass transfer between a pair of phases. The direction of the mass transfer is from th...
Definition: phasePair.H:53
Foam::phaseSystem::alphahe
virtual tmp< volScalarField > alphahe() const
Thermal diffusivity for energy of mixture [kg/m/s].
Definition: phaseSystem.C:684
Foam::phaseSystem::includeVolChange
virtual bool includeVolChange()=0
Add volume change in pEq.
basicThermo.H
Foam::phaseSystem::interfacePorousModelTable_
interfacePorousModelTable interfacePorousModelTable_
Interface porous models.
Definition: phaseSystem.H:154
Foam::phasePairKey::hasher
Hashing functor for phasePairKey.
Definition: phasePairKey.H:122
Foam::phaseSystem::nu
virtual tmp< volScalarField > nu() const
Kinematic viscosity of mixture [m^2/s].
Definition: phaseSystem.C:846
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
Foam::basicThermo::p
virtual volScalarField & p()
Pressure [Pa].
Definition: basicThermo.C:602
Foam::phaseSystem::surfaceTensionModels_
surfaceTensionModelTable surfaceTensionModels_
Surface tension models.
Definition: phaseSystem.H:151
Foam::phase
Single incompressible phase derived from the phase-fraction. Used as part of the multiPhaseMixture fo...
Definition: phase.H:54
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Foam::phaseSystem::nearInterface
tmp< volScalarField > nearInterface() const
Near Interface of alpha'n.
Definition: phaseSystem.C:1153
Foam::phaseSystem::phasePairTable
HashTable< autoPtr< phasePair >, phasePairKey, phasePairKey::hash > phasePairTable
Definition: phaseSystem.H:80
alpha2
const volScalarField & alpha2
Definition: setRegionFluidFields.H:9
Foam::phaseSystem::nHatf
tmp< surfaceScalarField > nHatf(const volScalarField &alpha1, const volScalarField &alpha2) const
Interface normal volume vector.
Definition: phaseSystem.C:1216
Foam::phaseSystem::Prt
const dimensionedScalar & Prt() const
Return Prandt number.
Definition: phaseSystem.C:799
Sp
zeroField Sp
Definition: alphaSuSp.H:2
Foam::phaseSystem::phaseSystem
phaseSystem(const fvMesh &mesh)
Construct from fvMesh.
Definition: phaseSystem.C:205
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::phaseSystem::createSubModels
void createSubModels(const dictTable &modelDicts, HashTable< autoPtr< modelType >, phasePairKey, phasePairKey::hash > &models)
Generate pairs and sub-model tables using pair keys.
Definition: phaseSystemTemplates.H:32
Foam::phaseSystem::THE
virtual tmp< scalarField > THE(const scalarField &h, const scalarField &p, const scalarField &T0, const labelList &cells) const
Temperature from enthalpy/internal energy for cell-set.
Definition: phaseSystem.C:351
Foam::phaseSystem::phi
const surfaceScalarField & phi() const
Constant access to the total flux.
Definition: phaseSystem.C:887
Foam::basicThermo
Abstract base-class for fluid and solid thermodynamic properties.
Definition: basicThermo.H:63
fvMatricesFwd.H
Forward declarations of fvMatrix specializations.
surfaceFields.H
Foam::surfaceFields.
Foam::phaseSystem::U
tmp< volVectorField > U() const
Mixture U.
Definition: phaseSystem.C:1047
Foam::phaseSystem::lookupSubModel
const modelType & lookupSubModel(const phasePair &key) const
Access a sub model between a phase pair.
Definition: phaseSystemTemplates.H:179
phaseSystemTemplates.H
Foam::phaseSystem::mu
virtual tmp< volScalarField > mu() const
Dynamic viscosity of mixture [kg/m/s].
Definition: phaseSystem.C:805
Foam::phaseSystem::generatePairsTable
void generatePairsTable()
Generate pair table.
Definition: phaseSystem.C:155
alpha1
const volScalarField & alpha1
Definition: setRegionFluidFields.H:8
Foam::phaseSystem::~phaseSystem
virtual ~phaseSystem()
Destructor.
Definition: phaseSystem.C:291
Foam::phaseSystem::dictTable
HashTable< dictionary, phasePairKey, phasePairKey::hash > dictTable
Definition: phaseSystem.H:94
Foam::phaseSystem::dmdt
virtual tmp< volScalarField > dmdt(const phasePairKey &key) const =0
Return interfacial source mass rate per phase pair.
Definition: phaseSystem.C:338
Foam::phaseSystem::mu_
volScalarField mu_
Dynamic viscocity.
Definition: phaseSystem.H:124
Foam::phaseSystem::gamma
virtual tmp< volScalarField > gamma() const
Gamma = Cp/Cv [].
Definition: phaseSystem.C:511
Foam::phaseSystem::he
virtual volScalarField & he()
Return access to the internal energy field [J/Kg].
Definition: phaseSystem.H:274
Foam::phaseSystem::nHatfv
tmp< surfaceVectorField > nHatfv(const volScalarField &alpha1, const volScalarField &alpha2) const
Interface normal surface vector.
Definition: phaseSystem.C:1192
Su
zeroField Su
Definition: alphaSuSp.H:1
Foam::phaseSystem::K
tmp< volScalarField > K(const volScalarField &alpha1, const volScalarField &alpha2) const
Interface curvature.
Definition: phaseSystem.C:1127
NotImplemented
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
Definition: error.H:517
Foam::phaseSystem::phi_
surfaceScalarField phi_
Mixture total volumetric flux.
Definition: phaseSystem.H:130
Foam::Field< scalar >
Foam::constant::universal::h
const dimensionedScalar h
Planck constant.
Definition: setRegionSolidFields.H:33
Foam::phaseSystem::alphaEff
virtual tmp< volScalarField > alphaEff(const volScalarField &alphat) const
Effective thermal diffusivity of mixture [kg/m/s].
Definition: phaseSystem.C:748
Foam::phaseSystem::CpByCpv
virtual tmp< volScalarField > CpByCpv() const
Heat capacity ratio [].
Definition: phaseSystem.C:590
Foam::phaseSystem::generatePairsAndSubModels
void generatePairsAndSubModels(const word &modelName, HashTable< autoPtr< modelType >, phasePairKey, phasePairKey::hash > &models)
Generate pairs and sub-model tables.
Definition: phaseSystemTemplates.H:91
Foam::phaseSystem::heatTransfer
virtual autoPtr< heatTransferTable > heatTransfer() const =0
Return the heat transfer matrices.
Foam::phaseSystem::kappaEff
virtual tmp< volScalarField > kappaEff(const volScalarField &kappat) const
Effective thermal diffusivity for temperature.
Definition: phaseSystem.C:727
Foam::phaseSystem::totalPhasePairs_
phasePairTable totalPhasePairs_
Total ordered phase pairs in the system.
Definition: phaseSystem.H:142
Foam::phaseSystem::correctMassSources
virtual void correctMassSources(const volScalarField &T)=0
Correct mass sources.
Foam::phaseSystem::correct
virtual void correct()
Correct the mixture thermos.
Definition: phaseSystem.C:911
Foam::phaseSystem::mesh_
const fvMesh & mesh_
Reference to the mesh.
Definition: phaseSystem.H:121
Foam::volScalarField
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:57
Foam::phasePairKey
An ordered or unorder pair of phase names. Typically specified as follows.
Definition: phasePairKey.H:65
Foam::phaseSystem::thermoName
virtual word thermoName() const
Return the name of the thermo physics.
Definition: phaseSystem.H:571
Foam::phaseSystem::Cp
virtual tmp< volScalarField > Cp() const
Return Cp of the mixture.
Definition: phaseSystem.C:417
Foam::phaseSystem::W
virtual tmp< volScalarField > W() const
Molecular weight [kg/kmol] of the mixture.
Definition: phaseSystem.C:636
Foam::phaseSystem::SuSpTable
HashTable< volScalarField::Internal > SuSpTable
Definition: phaseSystem.H:86
Foam::dimensioned< scalar >
Foam::phaseSystem::hc
virtual tmp< volScalarField > hc() const
Chemical enthalpy of the mixture [J/kg].
Definition: phaseSystem.C:332
Foam::fvMesh
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:85
Foam::phaseSystem::rhoPhi_
surfaceScalarField rhoPhi_
Mixture total mass flux.
Definition: phaseSystem.H:133
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::phaseSystem::kappa
virtual tmp< volScalarField > kappa() const
Thermal diffusivity for temperature of mixture [J/m/s/K].
Definition: phaseSystem.C:643
Foam::phaseSystem::phaseNames_
wordList phaseNames_
Phase names.
Definition: phaseSystem.H:127
Foam::phaseSystem::calcMu
void calcMu()
Calculate and return the laminar viscosity.
Definition: phaseSystem.C:58
Foam::phaseSystem::mesh
const fvMesh & mesh() const
Return mesh.
Definition: phaseSystem.C:990
Foam::phaseSystem::interfacePorousModelTable
HashTable< autoPtr< porousModel >, phasePairKey, phasePairKey::hash > interfacePorousModelTable
Definition: phaseSystem.H:114
Foam::phaseSystem::solve
virtual void solve()=0
Solve for the phase transport equations.
Definition: phaseSystem.C:359
Foam::HashTable
A HashTable similar to std::unordered_map.
Definition: HashTable.H:105
Foam::phaseSystem::Prt_
dimensionedScalar Prt_
Turbulent Prandt number.
Definition: phaseSystem.H:145
Foam::phaseSystem::TypeName
TypeName("phaseSystem")
Runtime type information.
Foam::phaseSystem::volTransfer
virtual tmp< fvScalarMatrix > volTransfer(const volScalarField &p)=0
Return the volumetric rate transfer matrix.
Foam::autoPtr< phasePair >
localMin.H
Foam::phaseSystem::correctTurbulence
virtual void correctTurbulence()
Correct the turbulence.
Definition: phaseSystem.C:922
Foam::compressibleTransportModel
Base-class for all transport models used by the compressible turbulence models.
Definition: compressibleTransportModel.H:53
Foam::phaseSystem::phaseModels_
phaseModelTable phaseModels_
Phase models.
Definition: phaseSystem.H:136
Foam::phaseSystem::surfaceTensionCoeff
virtual tmp< volScalarField > surfaceTensionCoeff(const phasePairKey &key) const
Return the surface tension coefficient.
Definition: phaseSystem.C:1073
Foam::basicThermo::T
virtual const volScalarField & T() const
Temperature [K].
Definition: basicThermo.C:614
Foam::phaseSystem::phasePropertiesName
static const word phasePropertiesName
Default name of the phase properties dictionary.
Definition: phaseSystem.H:257
Foam::phaseSystem::isochoric
virtual bool isochoric() const
Return true if the equation of state is isochoric for all phasses.
Definition: phaseSystem.C:976
Foam::phaseSystem::generatePhaseModels
HashTable< autoPtr< phaseModel > > generatePhaseModels(const wordList &names) const
Generate the phases.
Definition: phaseSystem.C:65
Foam::List< word >
Foam::phaseSystem::phaseModelTable
HashTable< autoPtr< phaseModel > > phaseModelTable
Definition: phaseSystem.H:83
Foam::phaseSystem::rhoPhi
const surfaceScalarField & rhoPhi() const
Constant access to the mixture mass flux.
Definition: phaseSystem.C:899
compressibleTransportModel.H
Foam::tmp::New
static tmp< T > New(Args &&... args)
Construct tmp of T with forwarding arguments.
Foam::phaseSystem::addInterfacePorosity
void addInterfacePorosity(fvVectorMatrix &UEqn)
Add interface porosity on phasePair.
Definition: phaseSystem.C:1088
Foam::fvMatrix
A special matrix type and solver, designed for finite volume solutions of scalar equations....
Definition: fvPatchField.H:68
Foam::phaseSystem::massSpeciesTransfer
virtual void massSpeciesTransfer(const phaseModel &phase, volScalarField::Internal &Su, volScalarField::Internal &Sp, const word speciesName)=0
Calculate mass transfer for species.
Foam::phaseSystem::rhoEoS
virtual tmp< scalarField > rhoEoS(const scalarField &p, const scalarField &T, const labelList &cells) const
Density from pressure and temperature.
Definition: phaseSystem.C:500
Foam::phaseSystem::surfaceTensionModelTable
HashTable< autoPtr< multiphaseInter::surfaceTensionModel >, phasePairKey, phasePairKey::hash > surfaceTensionModelTable
Definition: phaseSystem.H:104
Foam::phaseSystem::phasePairs_
phasePairTable phasePairs_
Phase pairs.
Definition: phaseSystem.H:139
UEqn
fvVectorMatrix & UEqn
Definition: UEqn.H:13
Foam::phaseSystem::generatePhi
tmp< surfaceScalarField > generatePhi(const HashTable< autoPtr< phaseModel >> &phaseModels) const
Generate the mixture flux.
Definition: phaseSystem.C:87
Foam::phaseSystem::phases
const phaseModelTable & phases() const
Constant access the phases.
Definition: phaseSystem.C:931
Foam::phaseSystem
Class to represent a system of phases and model interfacial transfers between them.
Definition: phaseSystem.H:66
cells
const cellShapeList & cells
Definition: gmvOutputHeader.H:3
Foam::GeometricField< scalar, fvPatchField, volMesh >::null
static const GeometricField< scalar, fvPatchField, volMesh > & null()
Return a null geometric field.
Definition: GeometricFieldI.H:32
Foam::GeometricField< scalar, fvPatchField, volMesh >
Foam::phaseSystem::rho
virtual tmp< volScalarField > rho() const
Return the mixture density.
Definition: phaseSystem.C:376
Foam::PtrListOps::names
List< word > names(const UPtrList< T > &list, const UnaryMatchPredicate &matcher)
T0
scalar T0
Definition: createFields.H:22
Foam::phaseSystem::incompressible
virtual bool incompressible() const
Return true if the equation of state is incompressible for all.
Definition: phaseSystem.C:956
Foam::phaseSystem::read
virtual bool read()
Read base phaseProperties dictionary.
Definition: phaseSystem.C:1226
Foam::phaseSystem::coeffs
virtual tmp< volScalarField > coeffs(const word &key) const
Return coefficients (1/rho)
Definition: phaseSystem.C:1080
Foam::DimensionedField
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Definition: DimensionedField.H:54
Foam::phaseSystem::generatePairs
void generatePairs(const dictTable &modelDicts)
Generate pairs.
Definition: phaseSystem.C:108
Foam::phaseSystem::alphaTransfer
virtual void alphaTransfer(SuSpTable &Su, SuSpTable &Sp)=0
Calculate mass transfer for alpha's.