MassTransferPhaseSystem.C
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 \*---------------------------------------------------------------------------*/
27 
29 #include "HashPtrTable.H"
30 #include "fvcDiv.H"
31 #include "fvmSup.H"
32 #include "fvMatrix.H"
33 #include "volFields.H"
34 #include "fundamentalConstants.H"
35 
36 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
37 
38 template<class BasePhaseSystem>
40 (
41  const fvMesh& mesh
42 )
43 :
44  BasePhaseSystem(mesh)
45 {
46  this->generatePairsAndSubModels("massTransferModel", massTransferModels_);
47 
48  forAllConstIters(massTransferModels_, iterModel)
49  {
50  if (!dmdt_.found(iterModel()->pair()))
51  {
52  dmdt_.set
53  (
54  iterModel()->pair(),
55  new volScalarField
56  (
57  IOobject
58  (
59  IOobject::groupName("dmdt",iterModel()->pair().name()),
60  this->mesh().time().timeName(),
61  this->mesh(),
62  IOobject::NO_READ,
63  IOobject::AUTO_WRITE
64  ),
65  this->mesh(),
67  )
68  );
69  }
70  }
71 }
72 
73 
74 // * * * * * * * * * * * * * * Protected Member Functions * * * * * * * * * //
75 
76 template<class BasePhaseSystem>
79 (
80  const volScalarField& dmdtNetki,
81  const phasePairKey& keyik,
82  const phasePairKey& keyki,
83  const volScalarField& T
84 ) const
85 {
86  auto tL = tmp<volScalarField>::New
87  (
88  IOobject
89  (
90  "tL",
91  this->mesh().time().timeName(),
92  this->mesh(),
93  IOobject::NO_READ,
94  IOobject::NO_WRITE
95  ),
96  this->mesh(),
98  );
99  auto& L = tL.ref();
100 
101  if (massTransferModels_.found(keyik))
102  {
103  const autoPtr<interfaceCompositionModel>& interfacePtr =
104  massTransferModels_[keyik];
105 
106  word speciesName = interfacePtr->transferSpecie();
107 
108  const word species(speciesName.substr(0, speciesName.find('.')));
109 
110  L -= neg(dmdtNetki)*interfacePtr->L(species, T);
111  }
112 
113  if (massTransferModels_.found(keyki))
114  {
115  const autoPtr<interfaceCompositionModel>& interfacePtr =
116  massTransferModels_[keyki];
117 
118  word speciesName = interfacePtr->transferSpecie();
119 
120  const word species(speciesName.substr(0, speciesName.find('.')));
121 
122  L += pos(dmdtNetki)*interfacePtr->L(species, T);
123  }
124 
125  return tL;
126 }
127 
128 
129 // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
130 
131 template<class BasePhaseSystem>
134 (
135  const phasePairKey& key
136 ) const
137 {
138  auto tdmdt = tmp<volScalarField>::New
139  (
140  IOobject
141  (
142  "dmdt",
143  this->mesh().time().timeName(),
144  this->mesh()
145  ),
146  this->mesh(),
148  );
149  auto& dmdt = tdmdt.ref();
150 
151  if (dmdt_.found(key))
152  {
153  dmdt = *dmdt_[key];
154  }
155 
156  return tdmdt;
157 }
158 
159 
160 template<class BasePhaseSystem>
163 (
164  const volScalarField& T
165 )
166 {
168  auto& eqn = teqn.ref();
169 
170  forAllConstIters(this->phaseModels_, iteri)
171  {
172  const phaseModel& phasei = iteri()();
173 
174  auto iterk = iteri;
175 
176  for (++iterk; iterk != this->phaseModels_.end(); ++iterk)
177  {
178  if (iteri()().name() != iterk()().name())
179  {
180  const phaseModel& phasek = iterk()();
181 
182  // Phase i to phase k
183  const phasePairKey keyik(phasei.name(), phasek.name(), true);
184 
185  // Phase k to phase i
186  const phasePairKey keyki(phasek.name(), phasei.name(), true);
187 
188  // Net mass transfer from k to i phase
189  auto tdmdtNetki = tmp<volScalarField>::New
190  (
191  IOobject
192  (
193  "tdmdtYki",
194  this->mesh().time().timeName(),
195  this->mesh()
196  ),
197  this->mesh(),
199  );
200  auto& dmdtNetki = tdmdtNetki.ref();
201 
202  auto tSp = tmp<volScalarField>::New
203  (
204  IOobject
205  (
206  "Sp",
207  this->mesh().time().timeName(),
208  this->mesh()
209  ),
210  this->mesh(),
212  );
213  auto& Sp = tSp.ref();
214 
215  auto tSu = tmp<volScalarField>::New
216  (
217  IOobject
218  (
219  "Su",
220  this->mesh().time().timeName(),
221  this->mesh()
222  ),
223  this->mesh(),
225  );
226  auto& Su = tSu.ref();
227 
228 
229  if (massTransferModels_.found(keyik))
230  {
231  autoPtr<interfaceCompositionModel>& interfacePtr =
232  massTransferModels_[keyik];
233 
234  dmdtNetki -= *dmdt_[keyik];
235 
236  tmp<volScalarField> KSp =
237  interfacePtr->KSp(interfaceCompositionModel::T, T);
238 
239  if (KSp.valid())
240  {
241  Sp -= KSp.ref();
242  }
243 
244  tmp<volScalarField> KSu =
245  interfacePtr->KSu(interfaceCompositionModel::T, T);
246 
247  if (KSu.valid())
248  {
249  Su -= KSu.ref();
250  }
251 
252  // If linearization is not provided used full explicit
253  if (!KSp.valid() && !KSu.valid())
254  {
255  Su -= *dmdt_[keyik];
256  }
257  }
258 
259  // Looking for mass transfer in the other direction (k to i)
260  if (massTransferModels_.found(keyki))
261  {
262  autoPtr<interfaceCompositionModel>& interfacePtr =
263  massTransferModels_[keyki];
264 
265  dmdtNetki += *dmdt_[keyki];
266 
267 
268  tmp<volScalarField> KSp =
269  interfacePtr->KSp(interfaceCompositionModel::T, T);
270 
271  if (KSp.valid())
272  {
273  Sp += KSp.ref();
274  }
275 
276  tmp<volScalarField> KSu =
277  interfacePtr->KSu(interfaceCompositionModel::T, T);
278 
279  if (KSu.valid())
280  {
281  Su += KSu.ref();
282  }
283 
284  // If linearization is not provided used full explicit
285  if (!KSp.valid() && !KSu.valid())
286  {
287  Su += *dmdt_[keyki];
288  }
289  }
290 
291  tmp<volScalarField> L = calculateL(dmdtNetki, keyik, keyki, T);
292 
293  //eqn -= dmdtNetki*L;
294  eqn -= fvm::Sp(Sp*L.ref(), T) + Su*L.ref();
295  }
296  }
297  }
298  return teqn;
299 }
300 
301 
302 template<class BasePhaseSystem>
305 (
306  const volScalarField& p
307 )
308 {
310  auto& eqn = teqn.ref();
311 
312  auto tSp = tmp<volScalarField>::New
313  (
314  IOobject
315  (
316  "Sp",
317  this->mesh().time().timeName(),
318  this->mesh()
319  ),
320  this->mesh(),
322  );
323  auto& Sp = tSp.ref();
324 
325  auto tSu = tmp<volScalarField>::New
326  (
327  IOobject
328  (
329  "Su",
330  this->mesh().time().timeName(),
331  this->mesh()
332  ),
333  this->mesh(),
335  );
336  auto& Su = tSu.ref();
337 
338  forAllConstIters(this->totalPhasePairs(), iter)
339  {
340  const phasePair& pair = iter()();
341 
342  const phaseModel& phase1 = pair.phase1();
343  const phaseModel& phase2 = pair.phase2();
344 
345  const phasePairKey key12
346  (
347  phase1.name(),
348  phase2.name(),
349  true
350  );
351 
352  if (massTransferModels_.found(key12))
353  {
354  autoPtr<interfaceCompositionModel>& interfacePtr =
355  massTransferModels_[key12];
356 
357  tmp<volScalarField> KSp =
358  interfacePtr->KSp(interfaceCompositionModel::P, p);
359 
360  if (KSp.valid())
361  {
362  Sp -=
363  KSp.ref()
364  *(
365  - this->coeffs(phase1.name())
366  + this->coeffs(phase2.name())
367  );
368  }
369 
370  tmp<volScalarField> KSu =
371  interfacePtr->KSu(interfaceCompositionModel::P, p);
372 
373  if (KSu.valid())
374  {
375  Su -=
376  KSu.ref()
377  *(
378  - this->coeffs(phase1.name())
379  + this->coeffs(phase2.name())
380  );
381  }
382 
383  // If linearization is not provided used full explicit
384  if (!KSp.valid() && !KSu.valid())
385  {
386  Su -=
387  *dmdt_[key12]
388  *(
389  - this->coeffs(phase1.name())
390  + this->coeffs(phase2.name())
391  );
392  }
393  }
394 
395  const phasePairKey key21
396  (
397  phase2.name(),
398  phase1.name(),
399  true
400  );
401 
402  if (massTransferModels_.found(key21))
403  {
404  autoPtr<interfaceCompositionModel>& interfacePtr =
405  massTransferModels_[key21];
406 
407  tmp<volScalarField> KSp =
408  interfacePtr->KSp(interfaceCompositionModel::P, p);
409 
410  if (KSp.valid())
411  {
412  Sp +=
413  KSp.ref()
414  *(
415  - this->coeffs(phase1.name())
416  + this->coeffs(phase2.name())
417  );
418  }
419 
420  tmp<volScalarField> KSu =
421  interfacePtr->KSu(interfaceCompositionModel::P, p);
422 
423  if (KSu.valid())
424  {
425  Su +=
426  KSu.ref()
427  *(
428  - this->coeffs(phase1.name())
429  + this->coeffs(phase2.name())
430  );
431  }
432 
433  // If linearization is not provided used full explicit
434  if (!KSp.valid() && !KSu.valid())
435  {
436  Su +=
437  *dmdt_[key21]
438  *(
439  - this->coeffs(phase1.name())
440  + this->coeffs(phase2.name())
441  );
442  }
443  }
444 
445  }
446 
447  eqn += fvm::Sp(Sp, p) + Su;
448  return teqn;
449 }
450 
451 
452 template<class BasePhaseSystem>
454 (
455  const volScalarField& T
456 )
457 {
458  forAllConstIters(this->phaseModels_, iteri)
459  {
460  const phaseModel& phasei = iteri()();
461 
462  auto iterk = iteri;
463 
464  for (++iterk; iterk != this->phaseModels_.end(); ++iterk)
465  {
466  if (iteri()().name() != iterk()().name())
467  {
468  const phaseModel& phasek = iterk()();
469 
470  // Phase i to phase k
471  const phasePairKey keyik(phasei.name(), phasek.name(), true);
472 
473  // Phase k to phase i
474  const phasePairKey keyki(phasek.name(), phasei.name(), true);
475 
476  if (massTransferModels_.found(keyik))
477  {
478  autoPtr<interfaceCompositionModel>& interfacePtr =
479  massTransferModels_[keyik];
480 
481  tmp<volScalarField> Kexp = interfacePtr->Kexp(T);
482 
483  *dmdt_[keyik] = Kexp.ref();
484 
485  }
486 
487  if (massTransferModels_.found(keyki))
488  {
489  autoPtr<interfaceCompositionModel>& interfacePtr =
490  massTransferModels_[keyki];
491 
492  // Explicit temperature mass transfer rate
493  const tmp<volScalarField> Kexp = interfacePtr->Kexp(T);
494 
495  *dmdt_[keyki] = Kexp.ref();
496  }
497  }
498  }
499  }
500 }
501 
502 
503 template<class BasePhaseSystem>
505 (
506  SuSpTable& Su,
507  SuSpTable& Sp
508 )
509 {
510  // This term adds/subtracts alpha*div(U) as a source term
511  // for alpha, substituting div(U) = mDot(1/rho1 - 1/rho2)
512  bool includeDivU(true);
513 
514  forAllConstIters(this->totalPhasePairs(), iter)
515  {
516  const phasePair& pair = iter()();
517 
518  const phaseModel& phase1 = pair.phase1();
519  const phaseModel& phase2 = pair.phase2();
520 
521  const volScalarField& alpha1 = pair.phase1();
522  const volScalarField& alpha2 = pair.phase2();
523 
524  tmp<volScalarField> tCoeffs1 = this->coeffs(phase1.name());
525  const volScalarField& coeffs1 = tCoeffs1();
526 
527  tmp<volScalarField> tCoeffs2 = this->coeffs(phase2.name());
528  const volScalarField& coeffs2 = tCoeffs2();
529 
530  // Phase 1 to phase 2
531  const phasePairKey key12
532  (
533  phase1.name(),
534  phase2.name(),
535  true
536  );
537 
538  tmp<volScalarField> tdmdt12(this->dmdt(key12));
539  volScalarField& dmdt12 = tdmdt12.ref();
540 
541  if (massTransferModels_.found(key12))
542  {
543  autoPtr<interfaceCompositionModel>& interfacePtr =
544  massTransferModels_[key12];
545 
546  tmp<volScalarField> KSu =
548 
549  if (KSu.valid())
550  {
551  dmdt12 = KSu.ref();
552  }
553 
554  includeDivU = interfacePtr->includeDivU();
555  }
556 
557 
558  // Phase 2 to phase 1
559  const phasePairKey key21
560  (
561  phase2.name(),
562  phase1.name(),
563  true
564  );
565 
566  tmp<volScalarField> tdmdt21(this->dmdt(key21));
567  volScalarField& dmdt21 = tdmdt21.ref();
568 
569  if (massTransferModels_.found(key21))
570  {
571  autoPtr<interfaceCompositionModel>& interfacePtr =
572  massTransferModels_[key21];
573 
574  tmp<volScalarField> KSu =
576 
577  if (KSu.valid())
578  {
579  dmdt21 = KSu.ref();
580  }
581 
582  includeDivU = interfacePtr->includeDivU();
583  }
584 
585  volScalarField::Internal& SpPhase1 = Sp[phase1.name()];
586 
587  volScalarField::Internal& SuPhase1 = Su[phase1.name()];
588 
589  volScalarField::Internal& SpPhase2 = Sp[phase2.name()];
590 
591  volScalarField::Internal& SuPhase2 = Su[phase2.name()];
592 
593  const volScalarField dmdtNet(dmdt21 - dmdt12);
594 
595  const volScalarField coeffs12(coeffs1 - coeffs2);
596 
597  const surfaceScalarField& phi = this->phi();
598 
599  if (includeDivU)
600  {
601  SuPhase1 +=
602  fvc::div(phi)*min(max(alpha1, scalar(0)), scalar(1));
603 
604  SuPhase2 +=
605  fvc::div(phi)*min(max(alpha2, scalar(0)), scalar(1));
606  }
607 
608  // NOTE: dmdtNet is distributed in terms =
609  // Source for phase 1 =
610  // dmdtNet/rho1
611  // - alpha1*dmdtNet(1/rho1 - 1/rho2)
612 
613  forAll(dmdtNet, celli)
614  {
615  scalar dmdt21 = dmdtNet[celli];
616  scalar coeffs12Cell = coeffs12[celli];
617 
618  scalar alpha1Limited = max(min(alpha1[celli], 1.0), 0.0);
619 
620  // exp.
621  SuPhase1[celli] += coeffs1[celli]*dmdt21;
622 
623  if (includeDivU)
624  {
625  if (dmdt21 > 0)
626  {
627  if (coeffs12Cell > 0)
628  {
629  // imp
630  SpPhase1[celli] -= dmdt21*coeffs12Cell;
631  }
632  else if (coeffs12Cell < 0)
633  {
634  // exp
635  SuPhase1[celli] -=
636  dmdt21*coeffs12Cell*alpha1Limited;
637  }
638  }
639  else if (dmdt21 < 0)
640  {
641  if (coeffs12Cell > 0)
642  {
643  // exp
644  SuPhase1[celli] -=
645  dmdt21*coeffs12Cell*alpha1Limited;
646  }
647  else if (coeffs12Cell < 0)
648  {
649  // imp
650  SpPhase1[celli] -= dmdt21*coeffs12Cell;
651  }
652  }
653  }
654  }
655 
656  forAll(dmdtNet, celli)
657  {
658  scalar dmdt12 = -dmdtNet[celli];
659  scalar coeffs21Cell = -coeffs12[celli];
660 
661  scalar alpha2Limited = max(min(alpha2[celli], 1.0), 0.0);
662 
663  // exp
664  SuPhase2[celli] += coeffs2[celli]*dmdt12;
665 
666  if (includeDivU)
667  {
668  if (dmdt12 > 0)
669  {
670  if (coeffs21Cell > 0)
671  {
672  // imp
673  SpPhase2[celli] -= dmdt12*coeffs21Cell;
674  }
675  else if (coeffs21Cell < 0)
676  {
677  // exp
678  SuPhase2[celli] -=
679  dmdt12*coeffs21Cell*alpha2Limited;
680  }
681  }
682  else if (dmdt12 < 0)
683  {
684  if (coeffs21Cell > 0)
685  {
686  // exp
687  SuPhase2[celli] -=
688  coeffs21Cell*dmdt12*alpha2Limited;
689  }
690  else if (coeffs21Cell < 0)
691  {
692  // imp
693  SpPhase2[celli] -= dmdt12*coeffs21Cell;
694  }
695  }
696  }
697 
698  }
699 
700  // Update ddtAlphaMax
701  this->ddtAlphaMax_ =
702  max(gMax((dmdt21*coeffs1)()), gMax((dmdt12*coeffs2)()));
703  }
704 }
705 
706 
707 template<class BasePhaseSystem>
709 (
710  const phaseModel& phase,
711  volScalarField::Internal& Su,
712  volScalarField::Internal& Sp,
713  const word speciesName
714 )
715 {
716  // Fill the volumetric mass transfer for species
717  forAllConstIters(massTransferModels_, iter)
718  {
719  if (iter()->transferSpecie() == speciesName)
720  {
721  // Explicit source
722  Su +=
723  this->Su()[phase.name()]
724  + this->Sp()[phase.name()]*phase.oldTime();
725  }
726  }
727 }
728 
729 
730 template<class BasePhaseSystem>
732 {
733  bool includeVolChange(true);
734  forAllIters(massTransferModels_, iter)
735  {
736  if (!iter()->includeVolChange())
737  {
738  includeVolChange = false;
739  }
740  }
741  return includeVolChange;
742 }
743 
744 // ************************************************************************* //
volFields.H
Foam::phaseModel
Single incompressible phase derived from the phase-fraction. Used as part of the multiPhaseMixture fo...
Definition: phaseModel.H:54
Foam::dimPressure
const dimensionSet dimPressure
Foam::IOobject
Defines the attributes of an object for which implicit objectRegistry management is supported,...
Definition: IOobject.H:169
L
const vector L(dict.get< vector >("L"))
Foam::phasePair
Description for mass transfer between a pair of phases. The direction of the mass transfer is from th...
Definition: phasePair.H:53
p
volScalarField & p
Definition: createFieldRefs.H:8
Foam::interfaceCompositionModel::Kexp
virtual tmp< volScalarField > Kexp(const volScalarField &field)=0
Explicit full mass transfer.
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
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::Zero
static constexpr const zero Zero
Global zero (0)
Definition: zero.H:131
Foam::dimEnergy
const dimensionSet dimEnergy
Foam::dimDensity
const dimensionSet dimDensity
alpha2
const volScalarField & alpha2
Definition: setRegionFluidFields.H:9
Foam::constant::atomic::alpha
const dimensionedScalar alpha
Fine-structure constant: default SI units: [].
Definition: readThermalProperties.H:212
Foam::MassTransferPhaseSystem::calculateL
tmp< volScalarField > calculateL(const volScalarField &dmdtNetki, const phasePairKey &keyik, const phasePairKey &keyki, const volScalarField &T) const
Calculate L between phases.
Definition: MassTransferPhaseSystem.C:79
Foam::MassTransferPhaseSystem::volTransfer
virtual tmp< fvScalarMatrix > volTransfer(const volScalarField &p)
Return the volumetric rate transfer matrix.
Definition: MassTransferPhaseSystem.C:305
Sp
zeroField Sp
Definition: alphaSuSp.H:2
Foam::GeometricField::oldTime
const GeometricField< Type, PatchField, GeoMesh > & oldTime() const
Return old time field.
Definition: GeometricField.C:850
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::MassTransferPhaseSystem::MassTransferPhaseSystem
MassTransferPhaseSystem(const fvMesh &)
Construct from fvMesh.
Definition: MassTransferPhaseSystem.C:40
fvcDiv.H
Calculate the divergence of the given field.
phasei
label phasei
Definition: pEqn.H:27
fvMatrix.H
alpha1
const volScalarField & alpha1
Definition: setRegionFluidFields.H:8
Foam::interfaceCompositionModel::transferSpecie
const word transferSpecie() const
Return the transferring species name.
Definition: interfaceCompositionModel.C:116
Foam::fac::div
tmp< GeometricField< Type, faPatchField, areaMesh > > div(const GeometricField< Type, faePatchField, edgeMesh > &ssf)
Definition: facDiv.C:50
Foam::min
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
Definition: hashSets.C:33
forAll
#define forAll(list, i)
Loop across all elements in list.
Definition: stdFoam.H:296
Foam::MassTransferPhaseSystem::massSpeciesTransfer
virtual void massSpeciesTransfer(const phaseModel &phase, volScalarField::Internal &Su, volScalarField::Internal &Sp, const word speciesName)
Calculate mass transfer for species.
Definition: MassTransferPhaseSystem.C:709
Su
zeroField Su
Definition: alphaSuSp.H:1
Foam::dimTime
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
Definition: dimensionSets.H:53
Foam::tmp::ref
T & ref() const
Definition: tmpI.H:227
Foam::interfaceCompositionModel::L
virtual tmp< volScalarField > L(const word &speciesName, const volScalarField &Tf) const =0
Latent heat (delta Hc)
Foam::dimensionedScalar
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
Definition: dimensionedScalarFwd.H:42
phi
surfaceScalarField & phi
Definition: setRegionFluidFields.H:8
Foam::phasePairKey
An ordered or unorder pair of phase names. Typically specified as follows.
Definition: phasePairKey.H:65
Foam::max
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
Definition: hashSets.C:47
Foam::interfaceCompositionModel::includeDivU
virtual bool includeDivU() const noexcept
Definition: interfaceCompositionModel.C:134
forAllIters
#define forAllIters(container, iter)
Iterate across all elements in the container object.
Definition: stdFoam.H:223
Foam::interfaceCompositionModel::KSu
virtual tmp< volScalarField > KSu(label modelVariable, const volScalarField &field)=0
Explicit mass transfer.
timeName
word timeName
Definition: getTimeIndex.H:3
phase2
phaseModel & phase2
Definition: setRegionFluidFields.H:6
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:6
Foam::fvMesh
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:85
Foam::dimMass
const dimensionSet dimMass(1, 0, 0, 0, 0, 0, 0)
Definition: dimensionSets.H:51
T
const volScalarField & T
Definition: createFieldRefs.H:2
Foam::interfaceCompositionModel::KSp
virtual tmp< volScalarField > KSp(label modelVariable, const volScalarField &field)=0
Implicit mass transfer.
MassTransferPhaseSystem.H
Foam::MassTransferPhaseSystem::heatTransfer
virtual tmp< fvScalarMatrix > heatTransfer(const volScalarField &T)
Return the heat transfer matrix.
Definition: MassTransferPhaseSystem.C:163
fvmSup.H
Calculate the matrix for implicit and explicit sources.
Foam::HashTable< volScalarField::Internal >
Foam::New
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions)
Global function forwards to reuseTmpDimensionedField::New.
Definition: DimensionedFieldReuseFunctions.H:105
Foam::phaseModel::name
const word & name() const
Definition: phaseModel.H:140
Foam::autoPtr< interfaceCompositionModel >
forAllConstIters
forAllConstIters(mixture.phases(), phase)
Definition: pEqn.H:28
Foam::GeometricField::ref
Internal & ref(const bool updateAccessTime=true)
Return a reference to the dimensioned internal field.
Definition: GeometricField.C:749
fundamentalConstants.H
Fundamental dimensioned constants.
HashPtrTable.H
Foam::MassTransferPhaseSystem::includeVolChange
virtual bool includeVolChange()
Add volume change in pEq.
Definition: MassTransferPhaseSystem.C:731
Foam::phasePair::phase2
const phaseModel & phase2() const
Definition: phasePairI.H:36
Foam::dimTemperature
const dimensionSet dimTemperature(0, 0, 0, 1, 0, 0, 0)
Definition: dimensionSets.H:54
Foam::name
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
Definition: exprTraits.C:59
Foam::MassTransferPhaseSystem::correctMassSources
virtual void correctMassSources(const volScalarField &T)
Correct/calculates mass sources dmdt for phases.
Definition: MassTransferPhaseSystem.C:454
Foam::MassTransferPhaseSystem::dmdt
tmp< volScalarField > dmdt(const phasePairKey &key) const
Return total interfacial mass flow rate.
Definition: MassTransferPhaseSystem.C:134
phase1
phaseModel & phase1
Definition: setRegionFluidFields.H:5
Foam::tmp::valid
bool valid() const noexcept
Identical to good(), or bool operator.
Definition: tmp.H:292
Foam::dimVolume
const dimensionSet dimVolume(pow3(dimLength))
Definition: dimensionSets.H:60
Foam::phasePair::phase1
const phaseModel & phase1() const
Definition: phasePairI.H:30
Foam::GeometricField< scalar, fvPatchField, volMesh >
Foam::neg
dimensionedScalar neg(const dimensionedScalar &ds)
Definition: dimensionedScalar.C:199
Foam::gMax
Type gMax(const FieldField< Field, Type > &f)
Definition: FieldFieldFunctions.C:592
Foam::MassTransferPhaseSystem::alphaTransfer
virtual void alphaTransfer(SuSpTable &Su, SuSpTable &Sp)
Calculate mass transfer for alpha's.
Definition: MassTransferPhaseSystem.C:505
Foam::dimless
const dimensionSet dimless
Dimensionless.
Definition: dimensionSets.C:189
Foam::pos
dimensionedScalar pos(const dimensionedScalar &ds)
Definition: dimensionedScalar.C:177