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  Copyright (C) 2021 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
12  This file is part of OpenFOAM.
13 
14  OpenFOAM is free software: you can redistribute it and/or modify it
15  under the terms of the GNU General Public License as published by
16  the Free Software Foundation, either version 3 of the License, or
17  (at your option) any later version.
18 
19  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22  for more details.
23 
24  You should have received a copy of the GNU General Public License
25  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26 
27 \*---------------------------------------------------------------------------*/
28 
29 #include "multiphaseMixture.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 #include "alphaContactAngleFvPatchScalarField.H"
40 
41 // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
42 
43 void Foam::multiphaseMixture::calcAlphas()
44 {
45  scalar level = 0.0;
46  alphas_ == 0.0;
47 
48  for (const phase& ph : phases_)
49  {
50  alphas_ += level * ph;
51  level += 1.0;
52  }
53 }
54 
55 
56 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
57 
59 (
60  const volVectorField& U,
61  const surfaceScalarField& phi
62 )
63 :
64  IOdictionary
65  (
66  IOobject
67  (
68  "transportProperties",
69  U.time().constant(),
70  U.db(),
71  IOobject::MUST_READ_IF_MODIFIED,
72  IOobject::NO_WRITE
73  )
74  ),
75 
76  phases_(lookup("phases"), phase::iNew(U, phi)),
77 
78  mesh_(U.mesh()),
79  U_(U),
80  phi_(phi),
81 
82  rhoPhi_
83  (
84  IOobject
85  (
86  "rhoPhi",
87  mesh_.time().timeName(),
88  mesh_,
89  IOobject::NO_READ,
90  IOobject::NO_WRITE
91  ),
92  mesh_,
94  ),
95 
96  alphas_
97  (
98  IOobject
99  (
100  "alphas",
101  mesh_.time().timeName(),
102  mesh_,
103  IOobject::NO_READ,
104  IOobject::AUTO_WRITE
105  ),
106  mesh_,
108  ),
109 
110  nu_
111  (
112  IOobject
113  (
114  "nu",
115  mesh_.time().timeName(),
116  mesh_
117  ),
118  mu()/rho()
119  ),
120 
121  sigmas_(lookup("sigmas")),
122  dimSigma_(1, 0, -2, 0, 0),
123  deltaN_
124  (
125  "deltaN",
126  1e-8/cbrt(average(mesh_.V()))
127  )
128 {
129  rhoPhi_.setOriented();
130 
131  calcAlphas();
132  alphas_.write();
133 }
134 
135 
136 // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
137 
140 {
141  auto iter = phases_.cbegin();
142 
143  tmp<volScalarField> trho = iter()*iter().rho();
144  volScalarField& rho = trho.ref();
145 
146  for (++iter; iter != phases_.cend(); ++iter)
147  {
148  rho += iter()*iter().rho();
149  }
150 
151  return trho;
152 }
153 
154 
156 Foam::multiphaseMixture::rho(const label patchi) const
157 {
158  auto iter = phases_.cbegin();
159 
160  tmp<scalarField> trho = iter().boundaryField()[patchi]*iter().rho().value();
161  scalarField& rho = trho.ref();
162 
163  for (++iter; iter != phases_.cend(); ++iter)
164  {
165  rho += iter().boundaryField()[patchi]*iter().rho().value();
166  }
167 
168  return trho;
169 }
170 
171 
174 {
175  auto iter = phases_.cbegin();
176 
177  tmp<volScalarField> tmu = iter()*iter().rho()*iter().nu();
178  volScalarField& mu = tmu.ref();
179 
180  for (++iter; iter != phases_.cend(); ++iter)
181  {
182  mu += iter()*iter().rho()*iter().nu();
183  }
184 
185  return tmu;
186 }
187 
188 
190 Foam::multiphaseMixture::mu(const label patchi) const
191 {
192  auto iter = phases_.cbegin();
193 
194  tmp<scalarField> tmu =
195  (
196  iter().boundaryField()[patchi]
197  *iter().rho().value()
198  *iter().nu(patchi)
199  );
200 
201  scalarField& mu = tmu.ref();
202 
203  for (++iter; iter != phases_.cend(); ++iter)
204  {
205  mu +=
206  (
207  iter().boundaryField()[patchi]
208  *iter().rho().value()
209  *iter().nu(patchi)
210  );
211  }
212 
213  return tmu;
214 }
215 
216 
219 {
220  auto iter = phases_.cbegin();
221 
222  tmp<surfaceScalarField> tmuf =
223  fvc::interpolate(iter())*iter().rho()*fvc::interpolate(iter().nu());
224  surfaceScalarField& muf = tmuf.ref();
225 
226  for (++iter; iter != phases_.cend(); ++iter)
227  {
228  muf +=
229  fvc::interpolate(iter())*iter().rho()*fvc::interpolate(iter().nu());
230  }
231 
232  return tmuf;
233 }
234 
235 
238 {
239  return nu_;
240 }
241 
242 
244 Foam::multiphaseMixture::nu(const label patchi) const
245 {
246  return nu_.boundaryField()[patchi];
247 }
248 
249 
252 {
253  return muf()/fvc::interpolate(rho());
254 }
255 
256 
259 {
260  tmp<surfaceScalarField> tstf
261  (
263  (
264  IOobject
265  (
266  "surfaceTensionForce",
267  mesh_.time().timeName(),
268  mesh_
269  ),
270  mesh_,
271  dimensionedScalar(dimensionSet(1, -2, -2, 0, 0), Zero)
272  )
273  );
274 
275  surfaceScalarField& stf = tstf.ref();
276  stf.setOriented();
277 
278  forAllConstIters(phases_, iter1)
279  {
280  const phase& alpha1 = iter1();
281 
282  auto iter2 = iter1;
283 
284  for (++iter2; iter2 != phases_.cend(); ++iter2)
285  {
286  const phase& alpha2 = iter2();
287 
288  auto sigma = sigmas_.cfind(interfacePair(alpha1, alpha2));
289 
290  if (!sigma.found())
291  {
293  << "Cannot find interface " << interfacePair(alpha1, alpha2)
294  << " in list of sigma values"
295  << exit(FatalError);
296  }
297 
298  stf += dimensionedScalar("sigma", dimSigma_, *sigma)
300  (
303  );
304  }
305  }
306 
307  return tstf;
308 }
309 
310 
312 {
313  correct();
314 
315  const Time& runTime = mesh_.time();
316 
317  volScalarField& alpha = phases_.first();
318 
319  const dictionary& alphaControls = mesh_.solverDict("alpha");
320  label nAlphaSubCycles(alphaControls.get<label>("nAlphaSubCycles"));
321  scalar cAlpha(alphaControls.get<scalar>("cAlpha"));
322 
323  if (nAlphaSubCycles > 1)
324  {
325  surfaceScalarField rhoPhiSum
326  (
327  IOobject
328  (
329  "rhoPhiSum",
330  runTime.timeName(),
331  mesh_
332  ),
333  mesh_,
334  dimensionedScalar(rhoPhi_.dimensions(), Zero)
335  );
336 
337  dimensionedScalar totalDeltaT = runTime.deltaT();
338 
339  for
340  (
341  subCycle<volScalarField> alphaSubCycle(alpha, nAlphaSubCycles);
342  !(++alphaSubCycle).end();
343  )
344  {
345  solveAlphas(cAlpha);
346  rhoPhiSum += (runTime.deltaT()/totalDeltaT)*rhoPhi_;
347  }
348 
349  rhoPhi_ = rhoPhiSum;
350  }
351  else
352  {
353  solveAlphas(cAlpha);
354  }
355 
356  // Update the mixture kinematic viscosity
357  nu_ = mu()/rho();
358 }
359 
360 
362 {
363  for (phase& ph : phases_)
364  {
365  ph.correct();
366  }
367 }
368 
369 
370 Foam::tmp<Foam::surfaceVectorField> Foam::multiphaseMixture::nHatfv
371 (
372  const volScalarField& alpha1,
373  const volScalarField& alpha2
374 ) const
375 {
376  /*
377  // Cell gradient of alpha
378  volVectorField gradAlpha =
379  alpha2*fvc::grad(alpha1) - alpha1*fvc::grad(alpha2);
380 
381  // Interpolated face-gradient of alpha
382  surfaceVectorField gradAlphaf = fvc::interpolate(gradAlpha);
383  */
384 
385  surfaceVectorField gradAlphaf
386  (
389  );
390 
391  // Face unit interface normal
392  return gradAlphaf/(mag(gradAlphaf) + deltaN_);
393 }
394 
395 
396 Foam::tmp<Foam::surfaceScalarField> Foam::multiphaseMixture::nHatf
397 (
398  const volScalarField& alpha1,
399  const volScalarField& alpha2
400 ) const
401 {
402  // Face unit interface normal flux
403  return nHatfv(alpha1, alpha2) & mesh_.Sf();
404 }
405 
406 
407 // Correction for the boundary condition on the unit normal nHat on
408 // walls to produce the correct contact angle.
409 
410 // The dynamic contact angle is calculated from the component of the
411 // velocity on the direction of the interface, parallel to the wall.
412 
413 void Foam::multiphaseMixture::correctContactAngle
414 (
415  const phase& alpha1,
416  const phase& alpha2,
417  surfaceVectorField::Boundary& nHatb
418 ) const
419 {
420  const volScalarField::Boundary& gb1f = alpha1.boundaryField();
421  const volScalarField::Boundary& gb2f = alpha2.boundaryField();
422 
423  const fvBoundaryMesh& boundary = mesh_.boundary();
424 
425  forAll(boundary, patchi)
426  {
427  if (isA<alphaContactAngleFvPatchScalarField>(gb1f[patchi]))
428  {
429  const alphaContactAngleFvPatchScalarField& acap =
430  refCast<const alphaContactAngleFvPatchScalarField>(gb1f[patchi]);
431 
432  correctBoundaryContactAngle(acap, patchi, alpha1, alpha2, nHatb);
433  }
434  else if (isA<alphaContactAngleFvPatchScalarField>(gb2f[patchi]))
435  {
436  const alphaContactAngleFvPatchScalarField& acap =
437  refCast<const alphaContactAngleFvPatchScalarField>(gb2f[patchi]);
438 
439  correctBoundaryContactAngle(acap, patchi, alpha2, alpha1, nHatb);
440  }
441  }
442 }
443 
444 
445 void Foam::multiphaseMixture::correctBoundaryContactAngle
446 (
447  const alphaContactAngleFvPatchScalarField& acap,
448  label patchi,
449  const phase& alpha1,
450  const phase& alpha2,
451  surfaceVectorField::Boundary& nHatb
452 ) const
453 {
454  const fvBoundaryMesh& boundary = mesh_.boundary();
455 
456  vectorField& nHatPatch = nHatb[patchi];
457 
458  vectorField AfHatPatch
459  (
460  mesh_.Sf().boundaryField()[patchi]
461  /mesh_.magSf().boundaryField()[patchi]
462  );
463 
464  const auto tp = acap.thetaProps().cfind(interfacePair(alpha1, alpha2));
465 
466  if (!tp.found())
467  {
469  << "Cannot find interface " << interfacePair(alpha1, alpha2)
470  << "\n in table of theta properties for patch "
471  << acap.patch().name()
472  << exit(FatalError);
473  }
474 
475  const bool matched = (tp.key().first() == alpha1.name());
476 
477  const scalar theta0 = degToRad(tp().theta0(matched));
478  scalarField theta(boundary[patchi].size(), theta0);
479 
480  const scalar uTheta = tp().uTheta();
481 
482  // Calculate the dynamic contact angle if required
483  if (uTheta > SMALL)
484  {
485  const scalar thetaA = degToRad(tp().thetaA(matched));
486  const scalar thetaR = degToRad(tp().thetaR(matched));
487 
488  // Calculated the component of the velocity parallel to the wall
489  vectorField Uwall
490  (
491  U_.boundaryField()[patchi].patchInternalField()
492  - U_.boundaryField()[patchi]
493  );
494  Uwall -= (AfHatPatch & Uwall)*AfHatPatch;
495 
496  // Find the direction of the interface parallel to the wall
497  vectorField nWall
498  (
499  nHatPatch - (AfHatPatch & nHatPatch)*AfHatPatch
500  );
501 
502  // Normalise nWall
503  nWall /= (mag(nWall) + SMALL);
504 
505  // Calculate Uwall resolved normal to the interface parallel to
506  // the interface
507  scalarField uwall(nWall & Uwall);
508 
509  theta += (thetaA - thetaR)*tanh(uwall/uTheta);
510  }
511 
512 
513  // Reset nHatPatch to correspond to the contact angle
514 
515  scalarField a12(nHatPatch & AfHatPatch);
516 
517  scalarField b1(cos(theta));
518 
519  scalarField b2(nHatPatch.size());
520 
521  forAll(b2, facei)
522  {
523  b2[facei] = cos(acos(a12[facei]) - theta[facei]);
524  }
525 
526  scalarField det(1.0 - a12*a12);
527 
528  scalarField a((b1 - a12*b2)/det);
529  scalarField b((b2 - a12*b1)/det);
530 
531  nHatPatch = a*AfHatPatch + b*nHatPatch;
532 
533  nHatPatch /= (mag(nHatPatch) + deltaN_.value());
534 }
535 
536 
537 Foam::tmp<Foam::volScalarField> Foam::multiphaseMixture::K
538 (
539  const phase& alpha1,
540  const phase& alpha2
541 ) const
542 {
543  tmp<surfaceVectorField> tnHatfv = nHatfv(alpha1, alpha2);
544 
545  correctContactAngle(alpha1, alpha2, tnHatfv.ref().boundaryFieldRef());
546 
547  // Simple expression for curvature
548  return -fvc::div(tnHatfv & mesh_.Sf());
549 }
550 
551 
554 {
555  tmp<volScalarField> tnearInt
556  (
557  new volScalarField
558  (
559  IOobject
560  (
561  "nearInterface",
562  mesh_.time().timeName(),
563  mesh_
564  ),
565  mesh_,
567  )
568  );
569 
570  for (const phase& ph : phases_)
571  {
572  tnearInt.ref() = max(tnearInt(), pos0(ph - 0.01)*pos0(0.99 - ph));
573  }
574 
575  return tnearInt;
576 }
577 
578 
579 void Foam::multiphaseMixture::solveAlphas
580 (
581  const scalar cAlpha
582 )
583 {
584  static label nSolves(-1);
585  ++nSolves;
586 
587  const word alphaScheme("div(phi,alpha)");
588  const word alpharScheme("div(phirb,alpha)");
589 
590  surfaceScalarField phic(mag(phi_/mesh_.magSf()));
591  phic = min(cAlpha*phic, max(phic));
592 
593  PtrList<surfaceScalarField> alphaPhiCorrs(phases_.size());
594  int phasei = 0;
595 
596  for (phase& alpha : phases_)
597  {
598  alphaPhiCorrs.set
599  (
600  phasei,
602  (
603  "phi" + alpha.name() + "Corr",
604  fvc::flux
605  (
606  phi_,
607  alpha,
608  alphaScheme
609  )
610  )
611  );
612 
613  surfaceScalarField& alphaPhiCorr = alphaPhiCorrs[phasei];
614 
615  for (phase& alpha2 : phases_)
616  {
617  if (&alpha2 == &alpha) continue;
618 
620 
621  alphaPhiCorr += fvc::flux
622  (
624  alpha,
626  );
627  }
628 
630  (
631  1.0/mesh_.time().deltaT().value(),
632  geometricOneField(),
633  alpha,
634  phi_,
635  alphaPhiCorr,
636  zeroField(),
637  zeroField(),
638  oneField(),
639  zeroField(),
640  true
641  );
642 
643  ++phasei;
644  }
645 
646  MULES::limitSum(alphaPhiCorrs);
647 
649 
650  volScalarField sumAlpha
651  (
652  IOobject
653  (
654  "sumAlpha",
655  mesh_.time().timeName(),
656  mesh_
657  ),
658  mesh_,
660  );
661 
662  phasei = 0;
663 
664  for (phase& alpha : phases_)
665  {
666  surfaceScalarField& alphaPhi = alphaPhiCorrs[phasei];
667  alphaPhi += upwind<scalar>(mesh_, phi_).flux(alpha);
668 
670  (
671  geometricOneField(),
672  alpha,
673  alphaPhi
674  );
675 
676  rhoPhi_ += alphaPhi*alpha.rho();
677 
678  Info<< alpha.name() << " volume fraction, min, max = "
679  << alpha.weightedAverage(mesh_.V()).value()
680  << ' ' << min(alpha).value()
681  << ' ' << max(alpha).value()
682  << endl;
683 
684  sumAlpha += alpha;
685 
686  ++phasei;
687  }
688 
689  Info<< "Phase-sum volume fraction, min, max = "
690  << sumAlpha.weightedAverage(mesh_.V()).value()
691  << ' ' << min(sumAlpha).value()
692  << ' ' << max(sumAlpha).value()
693  << endl;
694 
695  // Correct the sum of the phase-fractions to avoid 'drift'
696  volScalarField sumCorr(1.0 - sumAlpha);
697  for (phase& alpha : phases_)
698  {
699  alpha += alpha*sumCorr;
700  }
701 
702  calcAlphas();
703 }
704 
705 
707 {
708  if (transportModel::read())
709  {
710  bool readOK = true;
711 
712  PtrList<entry> phaseData(lookup("phases"));
713  label phasei = 0;
714 
715  for (phase& ph : phases_)
716  {
717  readOK &= ph.read(phaseData[phasei++].dict());
718  }
719 
720  readEntry("sigmas", sigmas_);
721 
722  return readOK;
723  }
724 
725  return false;
726 }
727 
728 
729 // ************************************************************************* //
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::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:55
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:61
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.
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:780
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:369
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:107
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:53
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::DimensionedField::setOriented
void setOriented(const bool oriented=true) noexcept
Set the oriented flag.
Definition: DimensionedFieldI.H:80
Foam::Info
messageStream Info
Information stream (stdout output on master, null elsewhere)
correct
fvOptions correct(rho)
Foam::MULES::limitSum
void limitSum(UPtrList< scalarField > &phiPsiCorrs)
Definition: MULES.C:34
Foam::multiphaseMixture::surfaceTensionForce
tmp< surfaceScalarField > surfaceTensionForce() const
Foam::dimensionedScalar
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
Definition: dimensionedScalarFwd.H:42
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:51
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:62
Time.H
U
U
Definition: pEqn.H:72
FatalErrorInFunction
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Definition: error.H:453
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::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:59
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.
Foam::objectRegistry::time
const Time & time() const noexcept
Return time registry.
Definition: objectRegistry.H:178
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::dimless
const dimensionSet dimless
Dimensionless.
Definition: dimensionSets.C:189
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