ThermalPhaseChangePhaseSystem.C
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2015-2020 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 \*---------------------------------------------------------------------------*/
25 
28 #include "fvcVolumeIntegrate.H"
29 #include "fvmSup.H"
30 #include "rhoReactionThermo.H"
31 
32 // * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * //
33 
34 template<class BasePhaseSystem>
37 (
38  const phasePairKey& key
39 ) const
40 {
41  tmp<volScalarField> tTotalDmdtf = phaseSystem::dmdtf(key);
42  volScalarField& totalDmdtf = tTotalDmdtf.ref();
43 
44  const scalar tTotalDmdtfSign =
45  Pair<word>::compare(this->phasePairs_[key], key);
46 
47  if (dmdtfs_.found(key))
48  {
49  totalDmdtf += *dmdtfs_[key];
50  }
51 
52  if (nDmdtfs_.found(key))
53  {
54  totalDmdtf += *nDmdtfs_[key];
55  }
56 
57  return tTotalDmdtfSign*tTotalDmdtf;
58 }
59 
60 
61 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
62 
63 template<class BasePhaseSystem>
66 (
67  const fvMesh& mesh
68 )
69 :
70  BasePhaseSystem(mesh),
71  volatile_(this->template lookupOrDefault<word>("volatile", "none")),
72  dmdt0s_(this->phases().size())
73 {
74  this->generatePairsAndSubModels
75  (
76  "saturation",
77  saturationModels_
78  );
79 
81  (
83  this->phasePairs_,
84  phasePairIter
85  )
86  {
87  const phasePair& pair(phasePairIter());
88 
89  if (pair.ordered())
90  {
91  continue;
92  }
93 
94  // Initially assume no mass transfer
95  dmdtfs_.insert
96  (
97  pair,
98  new volScalarField
99  (
100  IOobject
101  (
103  (
104  "thermalPhaseChange:dmdtf",
105  pair.name()
106  ),
107  this->mesh().time().timeName(),
108  this->mesh(),
111  ),
112  this->mesh(),
114  )
115  );
116 
117  // Initially assume no mass transfer
118  nDmdtfs_.insert
119  (
120  pair,
121  new volScalarField
122  (
123  IOobject
124  (
126  (
127  "thermalPhaseChange:nucleation:dmdtf",
128  pair.name()
129  ),
130  this->mesh().time().timeName(),
131  this->mesh(),
134  ),
135  this->mesh(),
137  )
138  );
139 
140  // Initially assume no mass transfer
141  nDmdtLfs_.insert
142  (
143  pair,
144  new volScalarField
145  (
146  IOobject
147  (
149  (
150  "thermalPhaseChange:nucleation:dmdtLf",
151  pair.name()
152  ),
153  this->mesh().time().timeName(),
154  this->mesh(),
157  ),
158  this->mesh(),
160  )
161  );
162  }
163 }
164 
165 
166 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
167 
168 template<class BasePhaseSystem>
171 {}
172 
173 
174 // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
175 
176 template<class BasePhaseSystem>
179 (
180  const phasePairKey& key
181 ) const
182 {
183  return saturationModels_[key];
184 }
185 
186 
187 template<class BasePhaseSystem>
190 (
191  const phasePairKey& key
192 ) const
193 {
194  return BasePhaseSystem::dmdtf(key) + this->totalDmdtf(key);
195 }
196 
197 
198 template<class BasePhaseSystem>
201 {
202  PtrList<volScalarField> dmdts(BasePhaseSystem::dmdts());
203 
204  forAllConstIter(phaseSystem::dmdtfTable, dmdtfs_, dmdtfIter)
205  {
206  const phasePair& pair = this->phasePairs_[dmdtfIter.key()];
207  const volScalarField& dmdtf = *dmdtfIter();
208 
209  addField(pair.phase1(), "dmdt", dmdtf, dmdts);
210  addField(pair.phase2(), "dmdt", - dmdtf, dmdts);
211  }
212 
213  forAllConstIter(phaseSystem::dmdtfTable, nDmdtfs_, nDmdtfIter)
214  {
215  const phasePair& pair = this->phasePairs_[nDmdtfIter.key()];
216  const volScalarField& nDmdtf = *nDmdtfIter();
217 
218  addField(pair.phase1(), "dmdt", nDmdtf, dmdts);
219  addField(pair.phase2(), "dmdt", - nDmdtf, dmdts);
220  }
221 
222  return dmdts;
223 }
224 
225 
226 template<class BasePhaseSystem>
230 {
231  autoPtr<phaseSystem::momentumTransferTable> eqnsPtr =
233 
234  phaseSystem::momentumTransferTable& eqns = eqnsPtr();
235 
236  this->addDmdtUfs(dmdtfs_, eqns);
237  this->addDmdtUfs(nDmdtfs_, eqns);
238 
239  return eqnsPtr;
240 }
241 
242 
243 template<class BasePhaseSystem>
247 {
248  autoPtr<phaseSystem::momentumTransferTable> eqnsPtr =
249  BasePhaseSystem::momentumTransferf();
250 
251  phaseSystem::momentumTransferTable& eqns = eqnsPtr();
252 
253  this->addDmdtUfs(dmdtfs_, eqns);
254  this->addDmdtUfs(nDmdtfs_, eqns);
255 
256  return eqnsPtr;
257 }
258 
259 
260 template<class BasePhaseSystem>
263 {
264  autoPtr<phaseSystem::heatTransferTable> eqnsPtr =
265  BasePhaseSystem::heatTransfer();
266 
267  phaseSystem::heatTransferTable& eqns = eqnsPtr();
268 
270  (
271  typename BasePhaseSystem::heatTransferModelTable,
272  this->heatTransferModels_,
273  heatTransferModelIter
274  )
275  {
276  const phasePair& pair
277  (
278  this->phasePairs_[heatTransferModelIter.key()]
279  );
280 
281  const phaseModel& phase1 = pair.phase1();
282  const phaseModel& phase2 = pair.phase2();
283 
284  const volScalarField& Tf(*this->Tf_[pair]);
285 
286  const volScalarField H1(heatTransferModelIter().first()->K());
287  const volScalarField H2(heatTransferModelIter().second()->K());
288  const volScalarField HEff(H1*H2/(H1 + H2));
289 
290  *eqns[phase1.name()] +=
291  H1*(Tf - phase1.thermo().T())
292  - HEff*(phase2.thermo().T() - phase1.thermo().T());
293 
294  *eqns[phase2.name()] +=
295  H2*(Tf - phase2.thermo().T())
296  - HEff*(phase1.thermo().T() - phase2.thermo().T());
297  }
298 
300  (
302  this->phases(),
303  phaseIter
304  )
305  {
306  const phaseModel& phase(phaseIter());
307 
308  if (dmdt0s_.set(phase.index()))
309  {
310  *eqns[phase.name()] +=
311  fvm::Sp(dmdt0s_[phase.index()],phase.thermo().he());
312  }
313  }
314 
316  (
318  this->phasePairs_,
319  phasePairIter
320  )
321  {
322  const phasePair& pair(phasePairIter());
323 
324  if (pair.ordered())
325  {
326  continue;
327  }
328 
329  const phaseModel& phase1 = pair.phase1();
330  const phaseModel& phase2 = pair.phase2();
331 
332  const rhoThermo& thermo1 = phase1.thermo();
333  const rhoThermo& thermo2 = phase2.thermo();
334 
335  const volScalarField& he1(thermo1.he());
336  const volScalarField& he2(thermo2.he());
337 
338  const volScalarField K1(phase1.K());
339  const volScalarField K2(phase2.K());
340 
341  const volScalarField dmdtf(this->totalDmdtf(pair));
342  const volScalarField dmdtf21(posPart(dmdtf));
343  const volScalarField dmdtf12(negPart(dmdtf));
344 
345  *eqns[phase1.name()] +=
346  - fvm::Sp(dmdtf21, he1)
347  + dmdtf21*K2 + dmdtf12*K1;
348 
349  *eqns[phase2.name()] -=
350  - fvm::Sp(dmdtf12, he2)
351  + dmdtf12*K1 + dmdtf21*K2;
352 
353  if (this->saturationModels_.found(phasePairIter.key()))
354  {
355  const volScalarField& Tf(*this->Tf_[pair]);
356 
357  if (volatile_ != "none" && isA<rhoReactionThermo>(thermo1))
358  {
359  const basicSpecieMixture& composition1 =
360  refCast<const rhoReactionThermo>(thermo1).composition();
361 
362  *eqns[phase1.name()] +=
363  dmdtf21
364  *composition1.HE
365  (
366  composition1.species()[volatile_],
367  thermo1.p(),
368  Tf
369  );
370  }
371  else
372  {
373  *eqns[phase1.name()] +=
374  dmdtf21*thermo1.he(thermo1.p(), Tf);
375  }
376 
377  if (volatile_ != "none" && isA<rhoReactionThermo>(thermo2))
378  {
379  const basicSpecieMixture& composition2 =
380  refCast<const rhoReactionThermo>(thermo2).composition();
381 
382  *eqns[phase2.name()] -=
383  dmdtf12
384  *composition2.HE
385  (
386  composition2.species()[volatile_],
387  thermo2.p(),
388  Tf
389  );
390  }
391  else
392  {
393  *eqns[phase2.name()] -=
394  dmdtf12*thermo2.he(thermo2.p(), Tf);
395  }
396  }
397  else
398  {
399  *eqns[phase1.name()] += dmdtf21*he2;
400  *eqns[phase2.name()] -= dmdtf12*he1;
401  }
402 
403  if (this->nDmdtLfs_.found(phasePairIter.key()))
404  {
405  *eqns[phase1.name()] += negPart(*this->nDmdtLfs_[pair]);
406  *eqns[phase2.name()] -= posPart(*this->nDmdtLfs_[pair]);
407  }
408 
409  if (phase1.thermo().he().member() == "e")
410  {
411  *eqns[phase1.name()] +=
412  phase1.thermo().p()*dmdtf/phase1.thermo().rho();
413  }
414 
415  if (phase2.thermo().he().member() == "e")
416  {
417  *eqns[phase2.name()] -=
418  phase2.thermo().p()*dmdtf/phase2.thermo().rho();
419  }
420  }
421 
422  return eqnsPtr;
423 }
424 
425 
426 template<class BasePhaseSystem>
429 {
430  autoPtr<phaseSystem::specieTransferTable> eqnsPtr =
432 
433  if (volatile_ == "none")
434  {
435  return eqnsPtr;
436  }
437 
438  phaseSystem::specieTransferTable& eqns = eqnsPtr();
439 
441  (
443  this->phasePairs_,
444  phasePairIter
445  )
446  {
447  const phasePair& pair(phasePairIter());
448 
449  if (pair.ordered())
450  {
451  continue;
452  }
453 
454  const phaseModel& phase1 = pair.phase1();
455  const phaseModel& phase2 = pair.phase2();
456 
457  if (phase1.pure() || phase2.pure())
458  {
460  << "Volatile specie was given, but at least one phase in pair "
461  << pair << " is pure."
462  << exit(FatalError);
463  }
464 
465  const volScalarField& Y1 = phase1.Y(volatile_);
466  const volScalarField& Y2 = phase2.Y(volatile_);
467 
468  const volScalarField dmdtf(this->totalDmdtf(pair));
469 
470  *eqns[Y1.name()] += dmdtf;
471  *eqns[Y2.name()] -= dmdtf;
472  }
473 
474  return eqnsPtr;
475 }
476 
477 
478 template<class BasePhaseSystem>
481 {
482  dmdt0s_ = PtrList<volScalarField>(this->phases().size());
483 
484  forAllConstIter(phaseSystem::dmdtfTable, dmdtfs_, dmdtfIter)
485  {
486  const phasePair& pair = this->phasePairs_[dmdtfIter.key()];
487  const volScalarField& dmdtf = *dmdtfIter();
488 
489  addField(pair.phase1(), "dmdt", dmdtf, dmdt0s_);
490  addField(pair.phase2(), "dmdt", - dmdtf, dmdt0s_);
491  }
492 
493  forAllConstIter(phaseSystem::dmdtfTable, nDmdtfs_, nDmdtfIter)
494  {
495  const phasePair& pair = this->phasePairs_[nDmdtfIter.key()];
496  const volScalarField& nDmdtf = *nDmdtfIter();
497 
498  addField(pair.phase1(), "dmdt", nDmdtf, dmdt0s_);
499  addField(pair.phase2(), "dmdt", - nDmdtf, dmdt0s_);
500  }
501 
502  BasePhaseSystem::correctContinuityError();
503 }
504 
505 
506 template<class BasePhaseSystem>
507 void
509 {
510  typedef compressible::alphatPhaseChangeWallFunctionFvPatchScalarField
511  alphatPhaseChangeWallFunction;
512 
514  (
515  typename BasePhaseSystem::heatTransferModelTable,
516  this->heatTransferModels_,
517  heatTransferModelIter
518  )
519  {
520  const phasePair& pair
521  (
522  this->phasePairs_[heatTransferModelIter.key()]
523  );
524 
525  const phaseModel& phase1 = pair.phase1();
526  const phaseModel& phase2 = pair.phase2();
527 
528  const rhoThermo& thermo1 = phase1.thermo();
529  const rhoThermo& thermo2 = phase2.thermo();
530 
531  const volScalarField& T1(thermo1.T());
532  const volScalarField& T2(thermo2.T());
533 
534  const volScalarField& p(thermo1.p());
535 
536  volScalarField& dmdtf(*this->dmdtfs_[pair]);
537  volScalarField& Tf(*this->Tf_[pair]);
538 
539  volScalarField dmdtfNew(dmdtf);
540 
541  if (saturationModels_.found(heatTransferModelIter.key()))
542  {
543  const phasePairKey& key = heatTransferModelIter.key();
544  const volScalarField Tsat(saturation(key).Tsat(thermo1.p()));
545 
546  volScalarField ha1(thermo1.ha());
547  volScalarField haf1(thermo1.ha(p, Tsat));
548 
549  if (volatile_ != "none" && isA<rhoReactionThermo>(thermo1))
550  {
551  const basicSpecieMixture& composition1 =
552  refCast<const rhoReactionThermo>(thermo1).composition();
553 
554  ha1 =
555  composition1.Ha
556  (
557  composition1.species()[volatile_],
558  p,
559  T1
560  );
561 
562  haf1 =
563  composition1.Ha
564  (
565  composition1.species()[volatile_],
566  p,
567  Tsat
568  );
569  }
570 
571  volScalarField ha2(thermo2.ha());
572  volScalarField haf2(thermo2.ha(p, Tsat));
573 
574  if (volatile_ != "none" && isA<rhoReactionThermo>(thermo2))
575  {
576  const basicSpecieMixture& composition2 =
577  refCast<const rhoReactionThermo>(thermo2).composition();
578 
579  ha2 =
580  composition2.Ha
581  (
582  composition2.species()[volatile_],
583  p,
584  T2
585  );
586 
587  haf2 =
588  composition2.Ha
589  (
590  composition2.species()[volatile_],
591  p,
592  Tsat
593  );
594  }
595 
597  (
598  (neg0(dmdtf)*haf2 + pos(dmdtf)*ha2)
599  - (pos0(dmdtf)*haf1 + neg(dmdtf)*ha1)
600  );
601 
602  volScalarField H1(heatTransferModelIter().first()->K(0));
603  volScalarField H2(heatTransferModelIter().second()->K(0));
604 
605  dmdtfNew = (H1*(Tsat - T1) + H2*(Tsat - T2))/L;
606 
607  if (volatile_ != "none")
608  {
609  dmdtfNew *=
610  neg0(dmdtfNew)*phase1.Y(volatile_)
611  + pos(dmdtfNew)*phase2.Y(volatile_);
612  }
613 
614  H1 = heatTransferModelIter().first()->K();
615  H2 = heatTransferModelIter().second()->K();
616 
617  // Limit the H[12] to avoid /0
618  H1.max(small);
619  H2.max(small);
620 
621  Tf = (H1*T1 + H2*T2 + dmdtfNew*L)/(H1 + H2);
622  }
623  else
624  {
625  dmdtfNew = Zero;
626  volScalarField H1(heatTransferModelIter().first()->K());
627  volScalarField H2(heatTransferModelIter().second()->K());
628 
629  Tf = (H1*T1 + H2*T2)/(H1 + H2);
630  }
631 
632  Info<< "Tf." << pair.name()
633  << ": min = " << min(Tf.primitiveField())
634  << ", mean = " << average(Tf.primitiveField())
635  << ", max = " << max(Tf.primitiveField())
636  << endl;
637 
638  scalar dmdtfRelax =
639  this->mesh().fieldRelaxationFactor(dmdtf.member());
640  dmdtf = (1 - dmdtfRelax)*dmdtf + dmdtfRelax*dmdtfNew;
641 
642  if (saturationModels_.found(heatTransferModelIter.key()))
643  {
644  Info<< dmdtf.name()
645  << ": min = " << min(dmdtf.primitiveField())
646  << ", mean = " << average(dmdtf.primitiveField())
647  << ", max = " << max(dmdtf.primitiveField())
648  << ", integral = " << fvc::domainIntegrate(dmdtf).value()
649  << endl;
650  }
651 
652  volScalarField& nDmdtf(*this->nDmdtfs_[pair]);
653  volScalarField& nDmdtLf(*this->nDmdtLfs_[pair]);
654  nDmdtf = Zero;
655  nDmdtLf = Zero;
656 
657  bool wallBoilingActive = false;
658 
659  forAllConstIter(phasePair, pair, iter)
660  {
661  const phaseModel& phase = iter();
662  const phaseModel& otherPhase = iter.otherPhase();
663 
664  if
665  (
666  phase.mesh().foundObject<volScalarField>
667  (
668  IOobject::groupName("alphat", phase.name())
669  ) &&
670  saturationModels_.found(heatTransferModelIter.key())
671  )
672  {
673  const volScalarField& alphat =
674  phase.mesh().lookupObject<volScalarField>
675  (
676  IOobject::groupName("alphat", phase.name())
677  );
678 
679  const fvPatchList& patches = this->mesh().boundary();
680  forAll(patches, patchi)
681  {
682  const fvPatch& currPatch = patches[patchi];
683 
684  if
685  (
686  isA<alphatPhaseChangeWallFunction>
687  (
688  alphat.boundaryField()[patchi]
689  )
690  )
691  {
692  const alphatPhaseChangeWallFunction& PCpatch =
693  refCast<const alphatPhaseChangeWallFunction>
694  (
695  alphat.boundaryField()[patchi]
696  );
697 
698  phasePairKey key(phase.name(), otherPhase.name());
699 
700  if (PCpatch.activePhasePair(key))
701  {
702  wallBoilingActive = true;
703 
704  const scalarField& patchDmdtf = PCpatch.dmdtf(key);
705  const scalarField& patchDmdtLf =
706  PCpatch.dmdtLf(key);
707 
708  const scalar sign
709  (
710  Pair<word>::compare(pair, key)
711  );
712 
713  forAll(patchDmdtf, facei)
714  {
715  const label faceCelli =
716  currPatch.faceCells()[facei];
717  nDmdtf[faceCelli] -= sign*patchDmdtf[facei];
718  nDmdtLf[faceCelli] -= sign*patchDmdtLf[facei];
719  }
720  }
721  }
722  }
723  }
724  }
725 
726  if (wallBoilingActive)
727  {
728  Info<< nDmdtf.name()
729  << ": min = " << min(nDmdtf.primitiveField())
730  << ", mean = " << average(nDmdtf.primitiveField())
731  << ", max = " << max(nDmdtf.primitiveField())
732  << ", integral = " << fvc::domainIntegrate(nDmdtf).value()
733  << endl;
734  }
735  }
736 }
737 
738 
739 template<class BasePhaseSystem>
741 {
742  if (BasePhaseSystem::read())
743  {
744  bool readOK = true;
745 
746  // Models ...
747 
748  return readOK;
749  }
750  else
751  {
752  return false;
753  }
754 }
755 
756 
757 // ************************************************************************* //
dimensionedScalar sign(const dimensionedScalar &ds)
#define forAll(list, i)
Loop across all elements in list.
Definition: UList.H:434
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
errorManipArg< error, int > exit(error &err, const int errNo=1)
Definition: errorManip.H:124
#define K1
Definition: SHA1.C:167
HashTable< autoPtr< phasePair >, phasePairKey, phasePairKey::hash > phasePairTable
Definition: phaseSystem.H:87
error FatalError
virtual PtrList< volScalarField > dmdts() const
Return the mass transfer rates for each phase.
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Definition: error.H:319
ThermalPhaseChangePhaseSystem(const fvMesh &)
Construct from fvMesh.
basicSpecieMixture & composition
#define K2
Definition: SHA1.C:168
HashPtrTable< fvVectorMatrix > momentumTransferTable
Definition: phaseSystem.H:75
static int compare(const Pair< word > &a, const Pair< word > &b)
Compare Pairs.
Definition: Pair.H:142
virtual autoPtr< phaseSystem::specieTransferTable > specieTransfer() const
Return the specie transfer matrices.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:251
virtual PtrList< volScalarField > dmdts() const
Return the mass transfer rates for each phase.
HashPtrTable< fvScalarMatrix > heatTransferTable
Definition: phaseSystem.H:77
dimensioned< Type > domainIntegrate(const GeometricField< Type, fvPatchField, volMesh > &vf)
HashPtrTable< fvScalarMatrix > specieTransferTable
Definition: phaseSystem.H:79
void read(Istream &, label &, const dictionary &)
In-place read with dictionary lookup.
const saturationModel & saturation(const phasePairKey &key) const
Return the saturationModel.
tmp< fvMatrix< Type > > Sp(const volScalarField::Internal &, const GeometricField< Type, fvPatchField, volMesh > &)
CGAL::Exact_predicates_exact_constructions_kernel K
dimensionedScalar posPart(const dimensionedScalar &ds)
Class to provide interfacial heat and mass transfer between a number of phases according the interfac...
dimensionedScalar neg(const dimensionedScalar &ds)
virtual tmp< volScalarField > dmdtf(const phasePairKey &key) const
Return the mass transfer rate for an interface.
bool insert(const Key &, const T &newElmt)
Insert a new hashedEntry.
Definition: HashTableI.H:80
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:57
dimensionedScalar pos(const dimensionedScalar &ds)
const dimensionSet dimVolume(pow3(dimLength))
Definition: dimensionSets.H:58
virtual void correctInterfaceThermo()
Correct the interface thermodynamics.
dynamicFvMesh & mesh
mixture thermo2().correctRho(psi2 *(p_rgh - p_rgh_0))
virtual tmp< volScalarField > dmdtf(const phasePairKey &key) const
Return the mass transfer rate for an interface.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
static word groupName(Name name, const word &group)
HashPtrTable< volScalarField, phasePairKey, phasePairKey::hash > dmdtfTable
Definition: phaseSystem.H:91
dimensionedScalar neg0(const dimensionedScalar &ds)
PtrListDictionary< phaseModel > phaseModelList
Definition: phaseSystem.H:81
virtual autoPtr< phaseSystem::heatTransferTable > heatTransfer() const
Return the heat transfer matrices.
virtual autoPtr< phaseSystem::momentumTransferTable > momentumTransferf()
Return the momentum transfer matrices for the face-based algorithm.
Volume integrate volField creating a volField.
mixture thermo1().correctRho(psi1 *(p_rgh - p_rgh_0))
static const zero Zero
Definition: zero.H:97
dimensioned< Type > average(const DimensionedField< Type, GeoMesh > &df)
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
Definition: pEqn.H:29
dimensionedScalar pos0(const dimensionedScalar &ds)
phaseSystem::specieTransferTable & specieTransfer(specieTransferPtr())
const Mesh & mesh() const
Return mesh.
virtual bool read()
Read base phaseProperties dictionary.
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
const dimensionSet dimEnergy
phaseSystem::momentumTransferTable & momentumTransfer(momentumTransferPtr())
const dimensionSet dimDensity
Internal & ref()
Return a reference to the dimensioned internal field.
PtrList< fvPatch > fvPatchList
container classes for fvPatch
Definition: fvPatchList.H:45
label patchi
virtual ~ThermalPhaseChangePhaseSystem()
Destructor.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
Definition: List.H:70
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
Definition: dimensionSets.H:51
virtual void correctContinuityError()
Store phase dmdts at the during the continuity error update.
phaseSystem::phaseModelList & phases
Definition: createFields.H:12
messageStream Info
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:52
volScalarField & p
A class for managing temporary objects.
Definition: PtrList.H:53
virtual autoPtr< phaseSystem::momentumTransferTable > momentumTransfer()
Return the momentum transfer matrices for the cell-based algorithm.
Calculate the matrix for implicit and explicit sources.
dimensionedScalar negPart(const dimensionedScalar &ds)