multiphaseMixture.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) 2011-2017 OpenFOAM Foundation
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 
28 #include "multiphaseMixture.H"
29 #include "alphaContactAngleFvPatchScalarField.H"
30 #include "Time.H"
31 #include "subCycle.H"
32 #include "MULES.H"
33 #include "surfaceInterpolate.H"
34 #include "fvcGrad.H"
35 #include "fvcSnGrad.H"
36 #include "fvcDiv.H"
37 #include "fvcFlux.H"
38 #include "unitConversion.H"
39 
40 // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
41 
42 void Foam::multiphaseMixture::calcAlphas()
43 {
44  scalar level = 0.0;
45  alphas_ == 0.0;
46 
47  for (const phase& ph : phases_)
48  {
49  alphas_ += level * ph;
50  level += 1.0;
51  }
52 }
53 
54 
55 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
56 
58 (
59  const volVectorField& U,
60  const surfaceScalarField& phi
61 )
62 :
63  IOdictionary
64  (
65  IOobject
66  (
67  "transportProperties",
68  U.time().constant(),
69  U.db(),
70  IOobject::MUST_READ_IF_MODIFIED,
71  IOobject::NO_WRITE
72  )
73  ),
74 
75  phases_(lookup("phases"), phase::iNew(U, phi)),
76 
77  mesh_(U.mesh()),
78  U_(U),
79  phi_(phi),
80 
81  rhoPhi_
82  (
83  IOobject
84  (
85  "rhoPhi",
86  mesh_.time().timeName(),
87  mesh_,
88  IOobject::NO_READ,
89  IOobject::NO_WRITE
90  ),
91  mesh_,
93  ),
94 
95  alphas_
96  (
97  IOobject
98  (
99  "alphas",
100  mesh_.time().timeName(),
101  mesh_,
102  IOobject::NO_READ,
103  IOobject::AUTO_WRITE
104  ),
105  mesh_,
107  ),
108 
109  nu_
110  (
111  IOobject
112  (
113  "nu",
114  mesh_.time().timeName(),
115  mesh_
116  ),
117  mu()/rho()
118  ),
119 
120  sigmas_(lookup("sigmas")),
121  dimSigma_(1, 0, -2, 0, 0),
122  deltaN_
123  (
124  "deltaN",
125  1e-8/cbrt(average(mesh_.V()))
126  )
127 {
128  rhoPhi_.setOriented();
129 
130  calcAlphas();
131  alphas_.write();
132 }
133 
134 
135 // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
136 
139 {
140  auto iter = phases_.cbegin();
141 
142  tmp<volScalarField> trho = iter()*iter().rho();
143  volScalarField& rho = trho.ref();
144 
145  for (++iter; iter != phases_.cend(); ++iter)
146  {
147  rho += iter()*iter().rho();
148  }
149 
150  return trho;
151 }
152 
153 
155 Foam::multiphaseMixture::rho(const label patchi) const
156 {
157  auto iter = phases_.cbegin();
158 
159  tmp<scalarField> trho = iter().boundaryField()[patchi]*iter().rho().value();
160  scalarField& rho = trho.ref();
161 
162  for (++iter; iter != phases_.cend(); ++iter)
163  {
164  rho += iter().boundaryField()[patchi]*iter().rho().value();
165  }
166 
167  return trho;
168 }
169 
170 
173 {
174  auto iter = phases_.cbegin();
175 
176  tmp<volScalarField> tmu = iter()*iter().rho()*iter().nu();
177  volScalarField& mu = tmu.ref();
178 
179  for (++iter; iter != phases_.cend(); ++iter)
180  {
181  mu += iter()*iter().rho()*iter().nu();
182  }
183 
184  return tmu;
185 }
186 
187 
189 Foam::multiphaseMixture::mu(const label patchi) const
190 {
191  auto iter = phases_.cbegin();
192 
193  tmp<scalarField> tmu =
194  (
195  iter().boundaryField()[patchi]
196  *iter().rho().value()
197  *iter().nu(patchi)
198  );
199 
200  scalarField& mu = tmu.ref();
201 
202  for (++iter; iter != phases_.cend(); ++iter)
203  {
204  mu +=
205  (
206  iter().boundaryField()[patchi]
207  *iter().rho().value()
208  *iter().nu(patchi)
209  );
210  }
211 
212  return tmu;
213 }
214 
215 
218 {
219  auto iter = phases_.cbegin();
220 
221  tmp<surfaceScalarField> tmuf =
222  fvc::interpolate(iter())*iter().rho()*fvc::interpolate(iter().nu());
223  surfaceScalarField& muf = tmuf.ref();
224 
225  for (++iter; iter != phases_.cend(); ++iter)
226  {
227  muf +=
228  fvc::interpolate(iter())*iter().rho()*fvc::interpolate(iter().nu());
229  }
230 
231  return tmuf;
232 }
233 
234 
237 {
238  return nu_;
239 }
240 
241 
243 Foam::multiphaseMixture::nu(const label patchi) const
244 {
245  return nu_.boundaryField()[patchi];
246 }
247 
248 
251 {
252  return muf()/fvc::interpolate(rho());
253 }
254 
255 
258 {
259  tmp<surfaceScalarField> tstf
260  (
262  (
263  IOobject
264  (
265  "surfaceTensionForce",
266  mesh_.time().timeName(),
267  mesh_
268  ),
269  mesh_,
270  dimensionedScalar(dimensionSet(1, -2, -2, 0, 0), Zero)
271  )
272  );
273 
274  surfaceScalarField& stf = tstf.ref();
275  stf.setOriented();
276 
277  forAllConstIters(phases_, iter1)
278  {
279  const phase& alpha1 = iter1();
280 
281  auto iter2 = iter1;
282 
283  for (++iter2; iter2 != phases_.cend(); ++iter2)
284  {
285  const phase& alpha2 = iter2();
286 
287  auto sigma = sigmas_.cfind(interfacePair(alpha1, alpha2));
288 
289  if (!sigma.found())
290  {
292  << "Cannot find interface " << interfacePair(alpha1, alpha2)
293  << " in list of sigma values"
294  << exit(FatalError);
295  }
296 
297  stf += dimensionedScalar("sigma", dimSigma_, *sigma)
299  (
302  );
303  }
304  }
305 
306  return tstf;
307 }
308 
309 
311 {
312  correct();
313 
314  const Time& runTime = mesh_.time();
315 
316  volScalarField& alpha = phases_.first();
317 
318  const dictionary& alphaControls = mesh_.solverDict("alpha");
319  label nAlphaSubCycles(alphaControls.get<label>("nAlphaSubCycles"));
320  scalar cAlpha(alphaControls.get<scalar>("cAlpha"));
321 
322  if (nAlphaSubCycles > 1)
323  {
324  surfaceScalarField rhoPhiSum
325  (
326  IOobject
327  (
328  "rhoPhiSum",
329  runTime.timeName(),
330  mesh_
331  ),
332  mesh_,
333  dimensionedScalar(rhoPhi_.dimensions(), Zero)
334  );
335 
336  dimensionedScalar totalDeltaT = runTime.deltaT();
337 
338  for
339  (
340  subCycle<volScalarField> alphaSubCycle(alpha, nAlphaSubCycles);
341  !(++alphaSubCycle).end();
342  )
343  {
344  solveAlphas(cAlpha);
345  rhoPhiSum += (runTime.deltaT()/totalDeltaT)*rhoPhi_;
346  }
347 
348  rhoPhi_ = rhoPhiSum;
349  }
350  else
351  {
352  solveAlphas(cAlpha);
353  }
354 
355  // Update the mixture kinematic viscosity
356  nu_ = mu()/rho();
357 }
358 
359 
361 {
362  for (phase& ph : phases_)
363  {
364  ph.correct();
365  }
366 }
367 
368 
369 Foam::tmp<Foam::surfaceVectorField> Foam::multiphaseMixture::nHatfv
370 (
371  const volScalarField& alpha1,
372  const volScalarField& alpha2
373 ) const
374 {
375  /*
376  // Cell gradient of alpha
377  volVectorField gradAlpha =
378  alpha2*fvc::grad(alpha1) - alpha1*fvc::grad(alpha2);
379 
380  // Interpolated face-gradient of alpha
381  surfaceVectorField gradAlphaf = fvc::interpolate(gradAlpha);
382  */
383 
384  surfaceVectorField gradAlphaf
385  (
388  );
389 
390  // Face unit interface normal
391  return gradAlphaf/(mag(gradAlphaf) + deltaN_);
392 }
393 
394 
395 Foam::tmp<Foam::surfaceScalarField> Foam::multiphaseMixture::nHatf
396 (
397  const volScalarField& alpha1,
398  const volScalarField& alpha2
399 ) const
400 {
401  // Face unit interface normal flux
402  return nHatfv(alpha1, alpha2) & mesh_.Sf();
403 }
404 
405 
406 // Correction for the boundary condition on the unit normal nHat on
407 // walls to produce the correct contact angle.
408 
409 // The dynamic contact angle is calculated from the component of the
410 // velocity on the direction of the interface, parallel to the wall.
411 
412 void Foam::multiphaseMixture::correctContactAngle
413 (
414  const phase& alpha1,
415  const phase& alpha2,
416  surfaceVectorField::Boundary& nHatb
417 ) const
418 {
419  const volScalarField::Boundary& gbf
420  = alpha1.boundaryField();
421 
422  const fvBoundaryMesh& boundary = mesh_.boundary();
423 
424  forAll(boundary, patchi)
425  {
426  if (isA<alphaContactAngleFvPatchScalarField>(gbf[patchi]))
427  {
428  const alphaContactAngleFvPatchScalarField& acap =
429  refCast<const alphaContactAngleFvPatchScalarField>(gbf[patchi]);
430 
431  vectorField& nHatPatch = nHatb[patchi];
432 
433  vectorField AfHatPatch
434  (
435  mesh_.Sf().boundaryField()[patchi]
436  /mesh_.magSf().boundaryField()[patchi]
437  );
438 
439  const auto tp =
440  acap.thetaProps().cfind(interfacePair(alpha1, alpha2));
441 
442  if (!tp.found())
443  {
445  << "Cannot find interface " << interfacePair(alpha1, alpha2)
446  << "\n in table of theta properties for patch "
447  << acap.patch().name()
448  << exit(FatalError);
449  }
450 
451  const bool matched = (tp.key().first() == alpha1.name());
452 
453  const scalar theta0 = degToRad(tp().theta0(matched));
454  scalarField theta(boundary[patchi].size(), theta0);
455 
456  const scalar uTheta = tp().uTheta();
457 
458  // Calculate the dynamic contact angle if required
459  if (uTheta > SMALL)
460  {
461  const scalar thetaA = degToRad(tp().thetaA(matched));
462  const scalar thetaR = degToRad(tp().thetaR(matched));
463 
464  // Calculated the component of the velocity parallel to the wall
465  vectorField Uwall
466  (
467  U_.boundaryField()[patchi].patchInternalField()
468  - U_.boundaryField()[patchi]
469  );
470  Uwall -= (AfHatPatch & Uwall)*AfHatPatch;
471 
472  // Find the direction of the interface parallel to the wall
473  vectorField nWall
474  (
475  nHatPatch - (AfHatPatch & nHatPatch)*AfHatPatch
476  );
477 
478  // Normalise nWall
479  nWall /= (mag(nWall) + SMALL);
480 
481  // Calculate Uwall resolved normal to the interface parallel to
482  // the interface
483  scalarField uwall(nWall & Uwall);
484 
485  theta += (thetaA - thetaR)*tanh(uwall/uTheta);
486  }
487 
488 
489  // Reset nHatPatch to correspond to the contact angle
490 
491  scalarField a12(nHatPatch & AfHatPatch);
492 
493  scalarField b1(cos(theta));
494 
495  scalarField b2(nHatPatch.size());
496 
497  forAll(b2, facei)
498  {
499  b2[facei] = cos(acos(a12[facei]) - theta[facei]);
500  }
501 
502  scalarField det(1.0 - a12*a12);
503 
504  scalarField a((b1 - a12*b2)/det);
505  scalarField b((b2 - a12*b1)/det);
506 
507  nHatPatch = a*AfHatPatch + b*nHatPatch;
508 
509  nHatPatch /= (mag(nHatPatch) + deltaN_.value());
510  }
511  }
512 }
513 
514 
515 Foam::tmp<Foam::volScalarField> Foam::multiphaseMixture::K
516 (
517  const phase& alpha1,
518  const phase& alpha2
519 ) const
520 {
521  tmp<surfaceVectorField> tnHatfv = nHatfv(alpha1, alpha2);
522 
523  correctContactAngle(alpha1, alpha2, tnHatfv.ref().boundaryFieldRef());
524 
525  // Simple expression for curvature
526  return -fvc::div(tnHatfv & mesh_.Sf());
527 }
528 
529 
532 {
533  tmp<volScalarField> tnearInt
534  (
535  new volScalarField
536  (
537  IOobject
538  (
539  "nearInterface",
540  mesh_.time().timeName(),
541  mesh_
542  ),
543  mesh_,
545  )
546  );
547 
548  for (const phase& ph : phases_)
549  {
550  tnearInt.ref() = max(tnearInt(), pos0(ph - 0.01)*pos0(0.99 - ph));
551  }
552 
553  return tnearInt;
554 }
555 
556 
557 void Foam::multiphaseMixture::solveAlphas
558 (
559  const scalar cAlpha
560 )
561 {
562  static label nSolves(-1);
563  ++nSolves;
564 
565  const word alphaScheme("div(phi,alpha)");
566  const word alpharScheme("div(phirb,alpha)");
567 
568  surfaceScalarField phic(mag(phi_/mesh_.magSf()));
569  phic = min(cAlpha*phic, max(phic));
570 
571  PtrList<surfaceScalarField> alphaPhiCorrs(phases_.size());
572  int phasei = 0;
573 
574  for (phase& alpha : phases_)
575  {
576  alphaPhiCorrs.set
577  (
578  phasei,
580  (
581  "phi" + alpha.name() + "Corr",
582  fvc::flux
583  (
584  phi_,
585  alpha,
586  alphaScheme
587  )
588  )
589  );
590 
591  surfaceScalarField& alphaPhiCorr = alphaPhiCorrs[phasei];
592 
593  for (phase& alpha2 : phases_)
594  {
595  if (&alpha2 == &alpha) continue;
596 
598 
599  alphaPhiCorr += fvc::flux
600  (
602  alpha,
604  );
605  }
606 
608  (
609  1.0/mesh_.time().deltaT().value(),
610  geometricOneField(),
611  alpha,
612  phi_,
613  alphaPhiCorr,
614  zeroField(),
615  zeroField(),
616  oneField(),
617  zeroField(),
618  true
619  );
620 
621  ++phasei;
622  }
623 
624  MULES::limitSum(alphaPhiCorrs);
625 
627 
628  volScalarField sumAlpha
629  (
630  IOobject
631  (
632  "sumAlpha",
633  mesh_.time().timeName(),
634  mesh_
635  ),
636  mesh_,
638  );
639 
640  phasei = 0;
641 
642  for (phase& alpha : phases_)
643  {
644  surfaceScalarField& alphaPhi = alphaPhiCorrs[phasei];
645  alphaPhi += upwind<scalar>(mesh_, phi_).flux(alpha);
646 
648  (
649  geometricOneField(),
650  alpha,
651  alphaPhi
652  );
653 
654  rhoPhi_ += alphaPhi*alpha.rho();
655 
656  Info<< alpha.name() << " volume fraction, min, max = "
657  << alpha.weightedAverage(mesh_.V()).value()
658  << ' ' << min(alpha).value()
659  << ' ' << max(alpha).value()
660  << endl;
661 
662  sumAlpha += alpha;
663 
664  ++phasei;
665  }
666 
667  Info<< "Phase-sum volume fraction, min, max = "
668  << sumAlpha.weightedAverage(mesh_.V()).value()
669  << ' ' << min(sumAlpha).value()
670  << ' ' << max(sumAlpha).value()
671  << endl;
672 
673  // Correct the sum of the phase-fractions to avoid 'drift'
674  volScalarField sumCorr(1.0 - sumAlpha);
675  for (phase& alpha : phases_)
676  {
677  alpha += alpha*sumCorr;
678  }
679 
680  calcAlphas();
681 }
682 
683 
685 {
686  if (transportModel::read())
687  {
688  bool readOK = true;
689 
690  PtrList<entry> phaseData(lookup("phases"));
691  label phasei = 0;
692 
693  for (phase& ph : phases_)
694  {
695  readOK &= ph.read(phaseData[phasei++].dict());
696  }
697 
698  readEntry("sigmas", sigmas_);
699 
700  return readOK;
701  }
702 
703  return false;
704 }
705 
706 
707 // ************************************************************************* //
runTime
engineTime & runTime
Definition: createEngineTime.H:13
Foam::fvc::snGrad
tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > snGrad(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
Definition: fvcSnGrad.C:47
Foam::scalarField
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
Definition: primitiveFieldsFwd.H:52
Foam::fvc::flux
tmp< surfaceScalarField > flux(const volVectorField &vvf)
Return the face-flux field obtained from the given volVectorField.
Foam::dimless
const dimensionSet dimless(0, 0, 0, 0, 0, 0, 0)
Dimensionless.
Definition: dimensionSets.H:50
Foam::MULES::explicitSolve
void explicitSolve(const RdeltaTType &rDeltaT, const RhoType &rho, volScalarField &psi, const surfaceScalarField &phiPsi, const SpType &Sp, const SuType &Su)
Definition: MULESTemplates.C:41
Foam::fvc::grad
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh >> grad(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
Definition: fvcGrad.C:54
Foam::MULES::limit
void limit(const RdeltaTType &rDeltaT, const RhoType &rho, const volScalarField &psi, const surfaceScalarField &phi, surfaceScalarField &phiPsi, const SpType &Sp, const SuType &Su, const PsiMaxType &psiMax, const PsiMinType &psiMin, const bool returnCorr)
Definition: MULESTemplates.C:581
Foam::TimeState::deltaT
dimensionedScalar deltaT() const
Return time step.
Definition: TimeStateI.H:54
Foam::constant::physicoChemical::mu
const dimensionedScalar mu
Atomic mass unit.
Definition: createFieldRefs.H:4
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:59
Foam::Zero
static constexpr const zero Zero
Global zero (0)
Definition: zero.H:131
alpha2
const volScalarField & alpha2
Definition: setRegionFluidFields.H:9
subCycle.H
Foam::constant::atomic::alpha
const dimensionedScalar alpha
Fine-structure constant: default SI units: [].
Definition: readThermalProperties.H:212
Foam::multiphaseMixture::multiphaseMixture
multiphaseMixture(const volVectorField &U, const surfaceScalarField &phi)
Construct from components.
Foam::multiphaseMixture::correct
void correct()
Correct the mixture properties.
Foam::objectRegistry::time
const Time & time() const
Return time.
Definition: objectRegistry.H:186
fvcSnGrad.H
Calculate the snGrad of the given volField.
Foam::vtk::Tools::zeroField
vtkSmartPointer< vtkFloatArray > zeroField(const word &name, const label size)
Create named field initialized to zero.
Definition: foamVtkToolsTemplates.C:327
Foam::Time::timeName
static word timeName(const scalar t, const int precision=precision_)
Definition: Time.C:785
fvcDiv.H
Calculate the divergence of the given field.
Foam::dimensioned::name
const word & name() const
Return const reference to name.
Definition: dimensionedType.C:406
unitConversion.H
Unit conversion functions.
Foam::fvc::div
tmp< GeometricField< Type, fvPatchField, volMesh > > div(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
Definition: fvcDiv.C:49
phasei
label phasei
Definition: pEqn.H:27
Foam::multiphaseMixture::nu
tmp< volScalarField > nu() const
Return the kinematic laminar viscosity.
Foam::endl
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:350
Foam::pos0
dimensionedScalar pos0(const dimensionedScalar &ds)
Definition: dimensionedScalar.C:188
alpha1
const volScalarField & alpha1
Definition: setRegionFluidFields.H:8
Foam::dictionary::get
T get(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Definition: dictionaryTemplates.C:81
nAlphaSubCycles
label nAlphaSubCycles(alphaControls.get< label >("nAlphaSubCycles"))
rho
rho
Definition: readInitialConditions.H:88
alpharScheme
word alpharScheme("div(phirb,alpha)")
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::vectorField
Field< vector > vectorField
Specialisation of Field<T> for vector.
Definition: primitiveFieldsFwd.H:54
phic
surfaceScalarField phic(mixture.cAlpha() *mag(alphaPhic/mesh.magSf()))
K
CGAL::Exact_predicates_exact_constructions_kernel K
Definition: CGALTriangulation3DKernel.H:58
nu
volScalarField & nu
Definition: readMechanicalProperties.H:176
Foam::transportModel::read
virtual bool read()=0
Read transportProperties dictionary.
Definition: transportModel.C:52
trho
tmp< volScalarField > trho
Definition: setRegionSolidFields.H:4
Foam::dimTime
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
Definition: dimensionSets.H:54
Foam::tmp::ref
T & ref() const
Definition: tmpI.H:258
phir
surfaceScalarField phir(fvc::flux(UdmModel.Udm()))
Foam::constant::physicoChemical::b
const dimensionedScalar b
Wien displacement law constant: default SI units: [m.K].
Definition: createFields.H:27
Foam::multiphaseMixture::nuf
tmp< surfaceScalarField > nuf() const
Return the face-interpolated dynamic laminar viscosity.
Foam::tanh
dimensionedScalar tanh(const dimensionedScalar &ds)
Definition: dimensionedScalar.C:272
alphaPhi
surfaceScalarField alphaPhi(phi.name()+alpha1.name(), fvc::flux(phi, alpha1, alphaScheme))
Foam::Info
messageStream Info
Information stream (uses stdout - output is on the master only)
Foam::cellModeller::lookup
const cellModel * lookup(const word &modelName)
Deprecated(2017-11) equivalent to cellModel::ptr static method.
Definition: cellModeller.H:46
correct
fvOptions correct(rho)
Foam::MULES::limitSum
void limitSum(UPtrList< scalarField > &phiPsiCorrs)
Definition: MULES.C:35
Foam::multiphaseMixture::surfaceTensionForce
tmp< surfaceScalarField > surfaceTensionForce() const
Foam::dimensionedScalar
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
Definition: dimensionedScalarFwd.H:43
phi
surfaceScalarField & phi
Definition: setRegionFluidFields.H:8
Foam::volScalarField
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:57
Foam::multiphaseMixture::read
bool read()
Read base transportProperties dictionary.
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
timeName
word timeName
Definition: getTimeIndex.H:3
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::FatalError
error FatalError
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:6
Foam::multiphaseMixture::solve
void solve()
Solve for the mixture phase-fractions.
stdFoam::end
constexpr auto end(C &c) -> decltype(c.end())
Return iterator to the end of the container c.
Definition: stdFoam.H:121
Foam::dimMass
const dimensionSet dimMass(1, 0, 0, 0, 0, 0, 0)
Definition: dimensionSets.H:52
Foam::fvc::interpolate
static tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > interpolate(const GeometricField< Type, fvPatchField, volMesh > &tvf, const surfaceScalarField &faceFlux, Istream &schemeData)
Interpolate field onto faces using scheme given by Istream.
Foam::multiphaseMixture::rho
tmp< volScalarField > rho() const
Return the mixture density.
Foam::degToRad
constexpr scalar degToRad(const scalar deg) noexcept
Conversion from degrees to radians.
Definition: unitConversion.H:48
Foam::exit
errorManipArg< error, int > exit(error &err, const int errNo=1)
Definition: errorManip.H:130
Foam::volVectorField
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:60
Time.H
U
U
Definition: pEqn.H:72
FatalErrorInFunction
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Definition: error.H:372
Foam::multiphaseMixture::mu
tmp< volScalarField > mu() const
Return the dynamic laminar viscosity.
forAllConstIters
forAllConstIters(mixture.phases(), phase)
Definition: pEqn.H:28
Foam::surfaceScalarField
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
Definition: surfaceFieldsFwd.H:54
Foam::GeometricField::ref
Internal & ref(const bool updateAccessTime=true)
Return a reference to the dimensioned internal field.
Definition: GeometricField.C:749
Foam::acos
dimensionedScalar acos(const dimensionedScalar &ds)
Definition: dimensionedScalar.C:268
fvcGrad.H
Calculate the gradient of the given field.
Foam::mag
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
fvcFlux.H
Calculate the face-flux of the given field.
Foam::constant::electromagnetic::e
const dimensionedScalar e
Elementary charge.
Definition: createFields.H:11
Foam::multiphaseMixture::nearInterface
tmp< volScalarField > nearInterface() const
Indicator of the proximity of the interface.
multiphaseMixture.H
Foam::DimensionedField::setOriented
void setOriented(const bool oriented=true)
Set the oriented flag.
Definition: DimensionedFieldI.H:79
Foam::det
dimensionedScalar det(const dimensionedSphericalTensor &dt)
Definition: dimensionedSphericalTensor.C:62
sigma
dimensionedScalar sigma("sigma", dimMass/sqr(dimTime), transportProperties)
Foam::surfaceVectorField
GeometricField< vector, fvsPatchField, surfaceMesh > surfaceVectorField
Definition: surfaceFieldsFwd.H:57
Foam::cbrt
dimensionedScalar cbrt(const dimensionedScalar &ds)
Definition: dimensionedScalar.C:155
MULES.H
MULES: Multidimensional universal limiter for explicit solution.
constant
constant condensation/saturation model.
boundary
faceListList boundary
Definition: createBlockMesh.H:4
Foam::GeometricField::boundaryField
const Boundary & boundaryField() const
Return const-reference to the boundary field.
Definition: GeometricFieldI.H:62
Foam::average
dimensioned< Type > average(const DimensionedField< Type, GeoMesh > &df)
Definition: DimensionedFieldFunctions.C:328
Foam::cos
dimensionedScalar cos(const dimensionedScalar &ds)
Definition: dimensionedScalar.C:265
Foam::multiphaseMixture::muf
tmp< surfaceScalarField > muf() const
Return the face-interpolated dynamic laminar viscosity.
alphaControls
const dictionary & alphaControls
Definition: alphaControls.H:1