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-2020 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 class surfaceTensionModel;
58 class porousModel;
59 
60 /*---------------------------------------------------------------------------*\
61  Class phaseSystem Declaration
62 \*---------------------------------------------------------------------------*/
63 
64 class phaseSystem
65 :
66  public basicThermo,
68 {
69 public:
70 
71  // Public typedefs
72 
73  typedef
74  HashTable
75  <
77  >
79 
80 
82 
83 
85 
86 
87 protected:
88 
89  // Protected typedefs
90 
91  typedef
93 
94 
95  typedef
96  HashTable
97  <
101  >
103 
104 
105  typedef
106  HashTable
107  <
109  phasePairKey,
111  >
113 
114 
115 
116  // Protected data
117 
118  //- Reference to the mesh
119  const fvMesh& mesh_;
120 
121  //- Dynamic viscocity
123 
124  //- Phase names
126 
127  //- Mixture total volumetric flux
129 
130  //- Mixture total mass flux
132 
133  //- Phase models
135 
136  //- Phase pairs
138 
139  //- Total ordered phase pairs in the system
141 
142  //- Turbulent Prandt number
144 
145 
146  // Sub Models
147 
148  //- Surface tension models
150 
151  //- Interface porous models
153 
154 
155  // Protected member functions
156 
157 
158  //- Calculate and return the laminar viscosity
159  void calcMu();
160 
161  //- Generate the phases
163  (
164  const wordList& names
165  ) const;
166 
167  //- Generate the mixture flux
169  (
170  const HashTable<autoPtr<phaseModel>>& phaseModels
171  ) const;
172 
173  //- Generate pairs
174  void generatePairs(const dictTable& modelDicts);
175 
176  //- Generate pair table
177  void generatePairsTable();
178 
179  //- Generate pairs and sub-model tables using pair keys
180  template<class modelType>
181  void createSubModels
182  (
183  const dictTable& modelDicts,
184  HashTable
185  <
187  phasePairKey,
189  >& models
190  );
191 
192  //- Generate pairs and sub-model tables using mesh
193  template<class modelType>
194  void createSubModels
195  (
196  const dictTable& modelDicts,
197  const fvMesh& mesh,
198  HashTable
199  <
201  phasePairKey,
203  >& models
204  );
205 
206  //- Generate pairs and sub-model tables
207  template<class modelType>
209  (
210  const word& modelName,
211  HashTable
212  <
214  phasePairKey,
216  >& models
217  );
218 
219 
220  //- Generate pairs and per-phase sub-model tables with mesh ref
221  template<class modelType>
223  (
224  const word& modelName,
225  const fvMesh& mesh,
226  HashTable
227  <
229  phasePairKey,
231  >& models
232  );
233 
234 
235  //- Generate pairs and per-phase sub-model tables
236  template<class modelType>
238  (
239  const word& modelName,
240  HashTable
241  <
243  phasePairKey,
245  >& models
246  );
247 
248 
249 public:
250 
251  //- Runtime type information
252  TypeName("phaseSystem");
253 
254  //- Default name of the phase properties dictionary
255  static const word phasePropertiesName;
256 
257 
258  // Constructors
259 
260  //- Construct from fvMesh
261  phaseSystem(const fvMesh& mesh);
262 
263 
264  //- Destructor
265  virtual ~phaseSystem();
266 
267 
268  // Energy related thermo functionaliy functions
269 
270  //- Return access to the internal energy field [J/Kg]
271  // \note this mixture thermo is prepared to work with T
272  virtual volScalarField& he()
273  {
275  return const_cast<volScalarField&>(volScalarField::null());
276  }
277 
278  //- Return access to the internal energy field [J/Kg]
279  // \note this mixture thermo is prepared to work with T
280  virtual const volScalarField& he() const
281  {
283  return volScalarField::null();
284  }
285 
286  //- Enthalpy/Internal energy
287  // for given pressure and temperature [J/kg]
288  virtual tmp<volScalarField> he
289  (
290  const volScalarField& p,
291  const volScalarField& T
292  ) const;
293 
294  //- Enthalpy/Internal energy for cell-set [J/kg]
295  virtual tmp<scalarField> he
296  (
297  const scalarField& p,
298  const scalarField& T,
299  const labelList& cells
300  ) const;
301 
302  //- Enthalpy/Internal energy for patch [J/kg]
303  virtual tmp<scalarField> he
304  (
305  const scalarField& p,
306  const scalarField& T,
307  const label patchi
308  ) const;
309 
310  //- Chemical enthalpy of the mixture [J/kg]
311  virtual tmp<volScalarField> hc() const;
312 
313  //- Temperature from enthalpy/internal energy for cell-set
314  virtual tmp<scalarField> THE
315  (
316  const scalarField& h,
317  const scalarField& p,
318  const scalarField& T0,
319  const labelList& cells
320  ) const;
321 
322  //- Temperature from enthalpy/internal energy for patch
323  virtual tmp<scalarField> THE
324  (
325  const scalarField& h,
326  const scalarField& p,
327  const scalarField& T0,
328  const label patchi
329  ) const;
330 
331 
332  // Thermo
333 
334  //- Return the mixture density
335  virtual tmp<volScalarField> rho() const;
336 
337  //- Return the mixture density on a patch
338  virtual tmp<scalarField> rho(const label patchi) const;
339 
340  //- Return Cp of the mixture
341  virtual tmp<volScalarField> Cp() const;
342 
343  //- Heat capacity at constant pressure for patch [J/kg/K]
344  virtual tmp<scalarField> Cp
345  (
346  const scalarField& p,
347  const scalarField& T,
348  const label patchi
349  ) const;
350 
351  //- Return Cv of the mixture
352  virtual tmp<volScalarField> Cv() const;
353 
354  //- Heat capacity at constant volume for patch [J/kg/K]
355  virtual tmp<scalarField> Cv
356  (
357  const scalarField& p,
358  const scalarField& T,
359  const label patchI
360  ) const;
361 
362  //- Gamma = Cp/Cv []
363  virtual tmp<volScalarField> gamma() const;
364 
365  //- Gamma = Cp/Cv for patch []
366  virtual tmp<scalarField> gamma
367  (
368  const scalarField& p,
369  const scalarField& T,
370  const label patchi
371  ) const;
372 
373  //- Heat capacity at constant pressure/volume [J/kg/K]
374  virtual tmp<volScalarField> Cpv() const;
375 
376  //- Heat capacity at constant pressure/volume for patch [J/kg/K]
377  virtual tmp<scalarField> Cpv
378  (
379  const scalarField& p,
380  const scalarField& T,
381  const label patchi
382  ) const;
383 
384  //- Heat capacity ratio []
385  virtual tmp<volScalarField> CpByCpv() const;
386 
387  //- Heat capacity ratio for patch []
388  virtual tmp<scalarField> CpByCpv
389  (
390  const scalarField& p,
391  const scalarField& T,
392  const label patchi
393  ) const;
394 
395  //- Molecular weight [kg/kmol] of the mixture
396  virtual tmp<volScalarField> W() const;
397 
398 
399  // Transport
400 
401  //- Thermal diffusivity for temperature of mixture [J/m/s/K]
402  virtual tmp<volScalarField> kappa() const;
403 
404  //- Thermal diffusivity for temperature
405  // of mixture for patch [J/m/s/K]
406  virtual tmp<scalarField> kappa
407  (
408  const label patchi
409  ) const;
410 
411  //- Thermal diffusivity for energy of mixture [kg/m/s]
412  virtual tmp<volScalarField> alphahe() const;
413 
414  //- Thermal diffusivity for energy of mixture for patch [kg/m/s]
415  virtual tmp<scalarField> alphahe(const label patchi) const;
416 
417  //- Effective thermal diffusivity for temperature
418  // of mixture [J/m/s/K]
420  (
421  const volScalarField& kappat
422  ) const;
423 
424  //- Effective thermal diffusivity for temperature
425  // of mixture for patch [J/m/s/K]
426  virtual tmp<scalarField> kappaEff
427  (
428  const scalarField& alphat,
429  const label patchi
430  ) const;
431 
432  //- Effective thermal diffusivity of mixture [kg/m/s]
434  (
435  const volScalarField& alphat
436  ) const;
437 
438  //- Effective thermal diffusivity of mixture for patch [kg/m/s]
439  virtual tmp<scalarField> alphaEff
440  (
441  const scalarField& alphat,
442  const label patchi
443  ) const;
444 
445  //- Return Prandt number
446  const dimensionedScalar& Prt() const;
447 
448 
449  // Access to transport state variables
450 
451  //- Dynamic viscosity of mixture [kg/m/s]
452  virtual tmp<volScalarField> mu() const;
453 
454  //- Dynamic viscosity of mixture for patch [kg/m/s]
455  virtual tmp<scalarField> mu(const label patchi) const;
456 
457  //- Kinematic viscosity of mixture [m^2/s]
458  virtual tmp<volScalarField> nu() const;
459 
460  //- Kinematic viscosity of mixture for patch [m^2/s]
461  virtual tmp<scalarField> nu(const label patchi) const;
462 
463 
464  // Phase fluxes
465 
466  //- Constant access to the total flux
467  const surfaceScalarField& phi() const;
468 
469  //- Access to the total mixture flux
471 
472  //- Constant access to the mixture mass flux
473  const surfaceScalarField& rhoPhi() const;
474 
475  //- Access to the total mixture mass flux
477 
478  //- Mixture U
479  tmp<volVectorField> U() const;
480 
481 
482  // Surface tension
483 
484  //- Calculate surface tension of the mixture
486 
487  //- Return the surface tension coefficient
489  (
490  const phasePairKey& key
491  ) const;
492 
493 
494  //- Return coefficients (1/rho)
495  virtual tmp<volScalarField> coeffs(const word& key) const;
496 
497 
498  // Interface porous between solid/fluid phases
499 
500  //- Add interface porosity on phasePair
502 
503 
504  // Inter-Phase mass and heat transfe
505 
506  //- Return interfacial source mass rate per phase pair
507  virtual tmp<volScalarField> dmdt(const phasePairKey& key) const = 0;
508 
509  //- Return the heat transfer matrices
511  (
512  const volScalarField& T
513  ) = 0;
514 
515  //- Return the volumetric rate transfer matrix
517  (
518  const volScalarField& p
519  ) = 0;
520 
521  //- Calculate mass transfer for alpha's
522  virtual void alphaTransfer(SuSpTable& Su, SuSpTable& Sp) = 0;
523 
524  //- Calculate mass transfer for species
525  virtual void massSpeciesTransfer
526  (
527  const phaseModel& phase,
530  const word speciesName
531  ) = 0;
532 
533  //- Add volume change in pEq
534  virtual bool includeVolChange() = 0;
535 
536 
537  // Solve phases and correct models
538 
539  //- Solve for the phase transport equations
540  virtual void solve() = 0;
541 
542  //- Correct the mixture thermos
543  virtual void correct();
544 
545  //- Correct mass sources
546  virtual void correctMassSources(const volScalarField& T) = 0;
547 
548  //- Return the name of the thermo physics
549  virtual word thermoName() const
550  {
552  return word();
553  }
554 
555  //- Correct the turbulence
556  // \note Each phase could have its own turbulence
557  virtual void correctTurbulence();
558 
559  //- Read base phaseProperties dictionary
560  virtual bool read();
561 
562 
563  // Access to phases models
564 
565  //- Constant access the total phase pairs
566  const phasePairTable& totalPhasePairs() const;
567 
568  //- Non-constant access the total phase pairs
570 
571  //- Constant access the phases
572  const phaseModelTable& phases() const;
573 
574  //- Access the phases
576 
577  //- Access a sub model between a phase pair
578  template <class modelType>
579  const modelType& lookupSubModel(const phasePair& key) const;
580 
581  //- Access a sub model between two phases
582  template <class modelType>
583  const modelType& lookupSubModel
584  (
585  const phaseModel& from,
586  const phaseModel& to
587  ) const;
588 
589 
590  // Query phase thermo information
591 
592  //- Return true if the equation of state is incompressible for all
593  // phases
594  virtual bool incompressible() const;
595 
596  //- Return true if a phase is incompressible
597  virtual bool incompressible(const word) const;
598 
599  //- Return true if the equation of state is isochoric for all phasses
600  // i.e. rho = const
601  virtual bool isochoric() const;
602 
603  //- Return mesh
604  const fvMesh& mesh() const;
605 
606 
607  // Help functions for the interfaces
608 
609  //- Interface normal surface vector
611  (
612  const volScalarField& alpha1,
613  const volScalarField& alpha2
614  ) const;
615 
616 
617  //- Interface normal volume vector
619  (
620  const volScalarField& alpha1,
621  const volScalarField& alpha2
622  ) const;
623 
624 
625  //- Interface curvature
627  (
628  const volScalarField& alpha1,
629  const volScalarField& alpha2
630  ) const;
631 
632 
633  //- Near Interface of alpha1 and alpha2
635  (
636  const volScalarField& alpha1,
637  const volScalarField& alpha2
638  ) const;
639 
640  //- Near Interface of alpha'n
642 };
643 
644 
645 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
646 
647 } // End namespace Foam
648 
649 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
650 
651 #ifdef NoRepository
652 # include "phaseSystemTemplates.H"
653 #endif
654 
655 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
656 
657 #endif
658 
659 // ************************************************************************* //
Foam::labelList
List< label > labelList
A List of labels.
Definition: List.H:71
Foam::phaseSystem::totalPhasePairs
const phasePairTable & totalPhasePairs() const
Constant access the total phase pairs.
Definition: phaseSystem.C:933
Foam::phaseSystem::surfaceTensionForce
tmp< surfaceScalarField > surfaceTensionForce() const
Calculate surface tension of the mixture.
Definition: phaseSystem.C:986
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:538
Foam::phaseSystem::Cv
virtual tmp< volScalarField > Cv() const
Return Cv of the mixture.
Definition: phaseSystem.C:459
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:673
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:151
Foam::phaseSystem::nu
virtual tmp< volScalarField > nu() const
Kinematic viscosity of mixture [m^2/s].
Definition: phaseSystem.C:835
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:62
Foam::basicThermo::p
virtual volScalarField & p()
Pressure [Pa].
Definition: basicThermo.C:512
Foam::phaseSystem::surfaceTensionModels_
surfaceTensionModelTable surfaceTensionModels_
Surface tension models.
Definition: phaseSystem.H:148
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:1142
Foam::phaseSystem::phasePairTable
HashTable< autoPtr< phasePair >, phasePairKey, phasePairKey::hash > phasePairTable
Definition: phaseSystem.H:77
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:1205
Foam::phaseSystem::Prt
const dimensionedScalar & Prt() const
Return Prandt number.
Definition: phaseSystem.C:788
Sp
zeroField Sp
Definition: alphaSuSp.H:2
Foam::phaseSystem::phaseSystem
phaseSystem(const fvMesh &mesh)
Construct from fvMesh.
Definition: phaseSystem.C:205
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:352
Foam::phaseSystem::phi
const surfaceScalarField & phi() const
Constant access to the total flux.
Definition: phaseSystem.C:876
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:1036
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:794
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:292
Foam::phaseSystem::dictTable
HashTable< dictionary, phasePairKey, phasePairKey::hash > dictTable
Definition: phaseSystem.H:91
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:121
Foam::phaseSystem::gamma
virtual tmp< volScalarField > gamma() const
Gamma = Cp/Cv [].
Definition: phaseSystem.C:500
Foam::phaseSystem::he
virtual volScalarField & he()
Return access to the internal energy field [J/Kg].
Definition: phaseSystem.H:271
Foam::phasePairKey::hash
Ordered or unordered hashing of word pair.
Definition: phasePairKey.H:70
Foam::phaseSystem::nHatfv
tmp< surfaceVectorField > nHatfv(const volScalarField &alpha1, const volScalarField &alpha2) const
Interface normal surface vector.
Definition: phaseSystem.C:1181
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:1116
NotImplemented
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
Definition: error.H:445
Foam::fvVectorMatrix
fvMatrix< vector > fvVectorMatrix
Definition: fvMatricesFwd.H:47
Foam::phaseSystem::phi_
surfaceScalarField phi_
Mixture total volumetric flux.
Definition: phaseSystem.H:127
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:737
Foam::phaseSystem::CpByCpv
virtual tmp< volScalarField > CpByCpv() const
Heat capacity ratio [].
Definition: phaseSystem.C:579
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::GeometricField< scalar, fvPatchField, volMesh >::Internal
DimensionedField< scalar, volMesh > Internal
Type of the internal field from which this GeometricField is derived.
Definition: GeometricField.H:107
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:716
Foam::phaseSystem::totalPhasePairs_
phasePairTable totalPhasePairs_
Total ordered phase pairs in the system.
Definition: phaseSystem.H:139
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:900
Foam::phaseSystem::mesh_
const fvMesh & mesh_
Reference to the mesh.
Definition: phaseSystem.H:118
Foam::dimensionedScalar
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
Definition: dimensionedScalarFwd.H:43
Foam::volScalarField
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:57
Foam::phasePairKey
Definition: phasePairKey.H:57
Foam::phaseSystem::thermoName
virtual word thermoName() const
Return the name of the thermo physics.
Definition: phaseSystem.H:548
Foam::phaseSystem::surfaceTensionModelTable
HashTable< autoPtr< surfaceTensionModel >, phasePairKey, phasePairKey::hash > surfaceTensionModelTable
Definition: phaseSystem.H:101
Foam::phaseSystem::Cp
virtual tmp< volScalarField > Cp() const
Return Cp of the mixture.
Definition: phaseSystem.C:418
Foam::phaseSystem::W
virtual tmp< volScalarField > W() const
Molecular weight [kg/kmol] of the mixture.
Definition: phaseSystem.C:625
Foam::phaseSystem::SuSpTable
HashTable< volScalarField::Internal > SuSpTable
Definition: phaseSystem.H:83
Foam::dimensioned< scalar >
Foam::phaseSystem::hc
virtual tmp< volScalarField > hc() const
Chemical enthalpy of the mixture [J/kg].
Definition: phaseSystem.C:333
Foam::fvMesh
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:83
Foam::phaseSystem::rhoPhi_
surfaceScalarField rhoPhi_
Mixture total mass flux.
Definition: phaseSystem.H:130
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:632
Foam::phaseSystem::phaseNames_
wordList phaseNames_
Phase names.
Definition: phaseSystem.H:124
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:979
Foam::phaseSystem::interfacePorousModelTable
HashTable< autoPtr< porousModel >, phasePairKey, phasePairKey::hash > interfacePorousModelTable
Definition: phaseSystem.H:111
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:142
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:911
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:133
Foam::phaseSystem::surfaceTensionCoeff
virtual tmp< volScalarField > surfaceTensionCoeff(const phasePairKey &key) const
Return the surface tension coefficient.
Definition: phaseSystem.C:1062
Foam::basicThermo::T
virtual const volScalarField & T() const
Temperature [K].
Definition: basicThermo.C:524
Foam::phaseSystem::phasePropertiesName
static const word phasePropertiesName
Default name of the phase properties dictionary.
Definition: phaseSystem.H:254
Foam::surfaceScalarField
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
Definition: surfaceFieldsFwd.H:54
Foam::phaseSystem::isochoric
virtual bool isochoric() const
Return true if the equation of state is isochoric for all phasses.
Definition: phaseSystem.C:965
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:80
Foam::phaseSystem::rhoPhi
const surfaceScalarField & rhoPhi() const
Constant access to the mixture mass flux.
Definition: phaseSystem.C:888
compressibleTransportModel.H
Foam::phaseSystem::addInterfacePorosity
void addInterfacePorosity(fvVectorMatrix &UEqn)
Add interface porosity on phasePair.
Definition: phaseSystem.C:1077
Foam::fvMatrix
A special matrix type and solver, designed for finite volume solutions of scalar equations....
Definition: fvPatchField.H:76
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::phasePairs_
phasePairTable phasePairs_
Phase pairs.
Definition: phaseSystem.H:136
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:920
Foam::phaseSystem
Class to represent a system of phases and model interfacial transfers between them.
Definition: phaseSystem.H:63
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:377
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:945
Foam::phaseSystem::read
virtual bool read()
Read base phaseProperties dictionary.
Definition: phaseSystem.C:1215
Foam::phaseSystem::coeffs
virtual tmp< volScalarField > coeffs(const word &key) const
Return coefficients (1/rho)
Definition: phaseSystem.C:1069
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.