All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
multiphaseMixture.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) 2011-2021 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 
26 #include "multiphaseMixture.H"
27 #include "alphaContactAngleFvPatchScalarField.H"
28 #include "unitConversion.H"
29 #include "Time.H"
30 #include "subCycle.H"
31 #include "MULES.H"
32 #include "surfaceInterpolate.H"
33 #include "fvcGrad.H"
34 #include "fvcSnGrad.H"
35 #include "fvcDiv.H"
36 #include "fvcFlux.H"
37 
38 
39 // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
40 
41 void Foam::multiphaseMixture::calcAlphas()
42 {
43  scalar level = 0.0;
44  alphas_ == 0.0;
45 
46  forAllIter(PtrDictionary<phase>, phases_, iter)
47  {
48  alphas_ += level*iter();
49  level += 1.0;
50  }
51 }
52 
53 
54 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
55 
57 (
58  const volVectorField& U,
59  const surfaceScalarField& phi
60 )
61 :
63  (
64  IOobject
65  (
66  "transportProperties",
67  U.time().constant(),
68  U.db(),
71  )
72  ),
73 
74  phases_(lookup("phases"), phase::iNew(U, phi)),
75 
76  mesh_(U.mesh()),
77  U_(U),
78  phi_(phi),
79 
80  rhoPhi_
81  (
82  IOobject
83  (
84  "rhoPhi",
85  mesh_.time().timeName(),
86  mesh_,
89  ),
90  mesh_,
92  ),
93 
94  alphas_
95  (
96  IOobject
97  (
98  "alphas",
99  mesh_.time().timeName(),
100  mesh_,
101  IOobject::NO_READ,
103  ),
104  mesh_,
106  ),
107 
108  nu_
109  (
110  IOobject
111  (
112  "nu",
113  mesh_.time().timeName(),
114  mesh_
115  ),
116  mu()/rho()
117  ),
118 
119  sigmas_(lookup("sigmas")),
120  dimSigma_(1, 0, -2, 0, 0),
121  deltaN_
122  (
123  "deltaN",
124  1e-8/pow(average(mesh_.V()), 1.0/3.0)
125  )
126 {
127  calcAlphas();
128  alphas_.write();
129 }
130 
131 
132 // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
133 
136 {
137  PtrDictionary<phase>::const_iterator iter = phases_.begin();
138 
139  tmp<volScalarField> trho = iter()*iter().rho();
140  volScalarField& rho = trho.ref();
141 
142  for (++iter; iter != phases_.end(); ++iter)
143  {
144  rho += iter()*iter().rho();
145  }
146 
147  return trho;
148 }
149 
150 
152 Foam::multiphaseMixture::rho(const label patchi) const
153 {
154  PtrDictionary<phase>::const_iterator iter = phases_.begin();
155 
156  tmp<scalarField> trho = iter().boundaryField()[patchi]*iter().rho().value();
157  scalarField& rho = trho.ref();
158 
159  for (++iter; iter != phases_.end(); ++iter)
160  {
161  rho += iter().boundaryField()[patchi]*iter().rho().value();
162  }
163 
164  return trho;
165 }
166 
167 
170 {
171  PtrDictionary<phase>::const_iterator iter = phases_.begin();
172 
173  tmp<volScalarField> tmu = iter()*iter().rho()*iter().nu();
174  volScalarField& mu = tmu.ref();
175 
176  for (++iter; iter != phases_.end(); ++iter)
177  {
178  mu += iter()*iter().rho()*iter().nu();
179  }
180 
181  return tmu;
182 }
183 
184 
186 Foam::multiphaseMixture::mu(const label patchi) const
187 {
188  PtrDictionary<phase>::const_iterator iter = phases_.begin();
189 
190  tmp<scalarField> tmu =
191  iter().boundaryField()[patchi]
192  *iter().rho().value()
193  *iter().nu(patchi);
194  scalarField& mu = tmu.ref();
195 
196  for (++iter; iter != phases_.end(); ++iter)
197  {
198  mu +=
199  iter().boundaryField()[patchi]
200  *iter().rho().value()
201  *iter().nu(patchi);
202  }
203 
204  return tmu;
205 }
206 
207 
210 {
211  PtrDictionary<phase>::const_iterator iter = phases_.begin();
212 
213  tmp<surfaceScalarField> tmuf =
214  fvc::interpolate(iter())*iter().rho()*fvc::interpolate(iter().nu());
215  surfaceScalarField& muf = tmuf.ref();
216 
217  for (++iter; iter != phases_.end(); ++iter)
218  {
219  muf +=
220  fvc::interpolate(iter())*iter().rho()*fvc::interpolate(iter().nu());
221  }
222 
223  return tmuf;
224 }
225 
226 
229 {
230  return nu_;
231 }
232 
233 
235 Foam::multiphaseMixture::nu(const label patchi) const
236 {
237  return nu_.boundaryField()[patchi];
238 }
239 
240 
243 {
244  return muf()/fvc::interpolate(rho());
245 }
246 
247 
250 {
251  tmp<surfaceScalarField> tstf
252  (
254  (
255  "surfaceTensionForce",
256  mesh_,
257  dimensionedScalar(dimensionSet(1, -2, -2, 0, 0), 0)
258  )
259  );
260 
261  surfaceScalarField& stf = tstf.ref();
262 
263  forAllConstIter(PtrDictionary<phase>, phases_, iter1)
264  {
265  const phase& alpha1 = iter1();
266 
268  ++iter2;
269 
270  for (; iter2 != phases_.end(); ++iter2)
271  {
272  const phase& alpha2 = iter2();
273 
274  sigmaTable::const_iterator sigma =
275  sigmas_.find(interfacePair(alpha1, alpha2));
276 
277  if (sigma == sigmas_.end())
278  {
280  << "Cannot find interface " << interfacePair(alpha1, alpha2)
281  << " in list of sigma values"
282  << exit(FatalError);
283  }
284 
285  stf += dimensionedScalar(dimSigma_, sigma())
286  *fvc::interpolate(K(alpha1, alpha2))*
287  (
288  fvc::interpolate(alpha2)*fvc::snGrad(alpha1)
289  - fvc::interpolate(alpha1)*fvc::snGrad(alpha2)
290  );
291  }
292  }
293 
294  return tstf;
295 }
296 
297 
299 {
300  correct();
301 
302  const Time& runTime = mesh_.time();
303 
304  volScalarField& alpha = phases_.first();
305 
306  const dictionary& alphaControls = mesh_.solverDict("alpha");
307  label nAlphaSubCycles(alphaControls.lookup<label>("nAlphaSubCycles"));
308  scalar cAlpha(alphaControls.lookup<scalar>("cAlpha"));
309 
310  if (nAlphaSubCycles > 1)
311  {
312  surfaceScalarField rhoPhiSum
313  (
314  IOobject
315  (
316  "rhoPhiSum",
317  runTime.timeName(),
318  mesh_
319  ),
320  mesh_,
321  dimensionedScalar(rhoPhi_.dimensions(), 0)
322  );
323 
324  dimensionedScalar totalDeltaT = runTime.deltaT();
325 
326  for
327  (
328  subCycle<volScalarField> alphaSubCycle(alpha, nAlphaSubCycles);
329  !(++alphaSubCycle).end();
330  )
331  {
332  solveAlphas(cAlpha);
333  rhoPhiSum += (runTime.deltaT()/totalDeltaT)*rhoPhi_;
334  }
335 
336  rhoPhi_ = rhoPhiSum;
337  }
338  else
339  {
340  solveAlphas(cAlpha);
341  }
342 
343  // Update the mixture kinematic viscosity
344  nu_ = mu()/rho();
345 }
346 
347 
349 {
350  forAllIter(PtrDictionary<phase>, phases_, iter)
351  {
352  iter().correct();
353  }
354 }
355 
356 
357 Foam::tmp<Foam::surfaceVectorField> Foam::multiphaseMixture::nHatfv
358 (
359  const volScalarField& alpha1,
360  const volScalarField& alpha2
361 ) const
362 {
363  /*
364  // Cell gradient of alpha
365  volVectorField gradAlpha =
366  alpha2*fvc::grad(alpha1) - alpha1*fvc::grad(alpha2);
367 
368  // Interpolated face-gradient of alpha
369  surfaceVectorField gradAlphaf = fvc::interpolate(gradAlpha);
370  */
371 
372  surfaceVectorField gradAlphaf
373  (
375  - fvc::interpolate(alpha1)*fvc::interpolate(fvc::grad(alpha2))
376  );
377 
378  // Face unit interface normal
379  return gradAlphaf/(mag(gradAlphaf) + deltaN_);
380 }
381 
382 
383 Foam::tmp<Foam::surfaceScalarField> Foam::multiphaseMixture::nHatf
384 (
385  const volScalarField& alpha1,
386  const volScalarField& alpha2
387 ) const
388 {
389  // Face unit interface normal flux
390  return nHatfv(alpha1, alpha2) & mesh_.Sf();
391 }
392 
393 
394 void Foam::multiphaseMixture::correctContactAngle
395 (
396  const phase& alpha1,
397  const phase& alpha2,
398  surfaceVectorField::Boundary& nHatb
399 ) const
400 {
401  const volScalarField::Boundary& a1bf = alpha1.boundaryField();
402  const volScalarField::Boundary& a2bf = alpha2.boundaryField();
403 
404  const fvBoundaryMesh& boundary = mesh_.boundary();
405 
406  forAll(boundary, patchi)
407  {
408  if
409  (
410  isA<alphaContactAngleFvPatchScalarField>(a1bf[patchi])
411  || isA<alphaContactAngleFvPatchScalarField>(a2bf[patchi])
412  )
413  {
414  if
415  (
416  isA<alphaContactAngleFvPatchScalarField>(a1bf[patchi])
417  && isA<alphaContactAngleFvPatchScalarField>(a2bf[patchi])
418  )
419  {
421  << "alphaContactAngle boundary condition "
422  "specified on patch " << boundary[patchi].name()
423  << " for both " << alpha1.name() << " and " << alpha2.name()
424  << nl << "which may be inconsistent."
425  << exit(FatalError);
426  }
427 
428  const alphaContactAngleFvPatchScalarField& acap =
429  isA<alphaContactAngleFvPatchScalarField>(a1bf[patchi])
430  ? refCast<const alphaContactAngleFvPatchScalarField>(a1bf[patchi])
431  : refCast<const alphaContactAngleFvPatchScalarField>(a2bf[patchi])
432  ;
433 
434  vectorField& nHatPatch = nHatb[patchi];
435 
436  const vectorField AfHatPatch
437  (
438  mesh_.Sf().boundaryField()[patchi]
439  /mesh_.magSf().boundaryField()[patchi]
440  );
441 
442  alphaContactAngleFvPatchScalarField::thetaPropsTable::
443  const_iterator tp =
444  acap.thetaProps().find(interfacePair(alpha1, alpha2));
445 
446  if (tp == acap.thetaProps().end())
447  {
449  << "Cannot find interface " << interfacePair(alpha1, alpha2)
450  << "\n in table of theta properties for patch "
451  << acap.patch().name()
452  << exit(FatalError);
453  }
454 
455  const bool matched = (tp.key().first() == alpha1.name());
456 
457  const scalar theta0 = degToRad(tp().theta0(matched));
458 
459  scalarField theta(boundary[patchi].size(), theta0);
460 
461  const scalar uTheta = tp().uTheta();
462 
463  // Calculate the dynamic contact angle if required
464  if (uTheta > small)
465  {
466  const scalar thetaA = degToRad(tp().thetaA(matched));
467  const scalar thetaR = degToRad(tp().thetaR(matched));
468 
469  // Calculated the component of the velocity parallel to the wall
470  vectorField Uwall
471  (
472  U_.boundaryField()[patchi].patchInternalField()
473  - U_.boundaryField()[patchi]
474  );
475  Uwall -= (AfHatPatch & Uwall)*AfHatPatch;
476 
477  // Find the direction of the interface parallel to the wall
478  vectorField nWall
479  (
480  nHatPatch - (AfHatPatch & nHatPatch)*AfHatPatch
481  );
482 
483  // Normalise nWall
484  nWall /= (mag(nWall) + small);
485 
486  // Calculate Uwall resolved normal to the interface parallel to
487  // the interface
488  const scalarField uwall(nWall & Uwall);
489 
490  theta += (thetaA - thetaR)*tanh(uwall/uTheta);
491  }
492 
493 
494  // Reset nHatPatch to correspond to the contact angle
495 
496  const scalarField a12(nHatPatch & AfHatPatch);
497 
498  const scalarField b1(cos(theta));
499 
500  scalarField b2(nHatPatch.size());
501 
502  forAll(b2, facei)
503  {
504  b2[facei] = cos(acos(a12[facei]) - theta[facei]);
505  }
506 
507  const scalarField det(1.0 - a12*a12);
508 
509  const scalarField a((b1 - a12*b2)/det);
510  const scalarField b((b2 - a12*b1)/det);
511 
512  nHatPatch = a*AfHatPatch + b*nHatPatch;
513 
514  nHatPatch /= (mag(nHatPatch) + deltaN_.value());
515  }
516  }
517 }
518 
519 
520 Foam::tmp<Foam::volScalarField> Foam::multiphaseMixture::K
521 (
522  const phase& alpha1,
523  const phase& alpha2
524 ) const
525 {
526  tmp<surfaceVectorField> tnHatfv = nHatfv(alpha1, alpha2);
527 
528  correctContactAngle(alpha1, alpha2, tnHatfv.ref().boundaryFieldRef());
529 
530  // Simple expression for curvature
531  return -fvc::div(tnHatfv & mesh_.Sf());
532 }
533 
534 
537 {
538  tmp<volScalarField> tnearInt
539  (
541  (
542  "nearInterface",
543  mesh_,
545  )
546  );
547 
548  forAllConstIter(PtrDictionary<phase>, phases_, iter)
549  {
550  tnearInt.ref() =
551  max(tnearInt(), pos0(iter() - 0.01)*pos0(0.99 - iter()));
552  }
553 
554  return tnearInt;
555 }
556 
557 
558 void Foam::multiphaseMixture::solveAlphas
559 (
560  const scalar cAlpha
561 )
562 {
563  static label nSolves=-1;
564  nSolves++;
565 
566  word alphaScheme("div(phi,alpha)");
567  word alpharScheme("div(phirb,alpha)");
568 
569  surfaceScalarField phic(mag(phi_/mesh_.magSf()));
570  phic = min(cAlpha*phic, max(phic));
571 
572  UPtrList<const volScalarField> alphas(phases_.size());
573  PtrList<surfaceScalarField> alphaPhis(phases_.size());
574  int phasei = 0;
575 
576  forAllIter(PtrDictionary<phase>, phases_, iter)
577  {
578  const phase& alpha = iter();
579 
580  alphas.set(phasei, &alpha);
581 
582  alphaPhis.set
583  (
584  phasei,
586  (
587  "phi" + alpha.name() + "Corr",
588  fvc::flux
589  (
590  phi_,
591  alpha,
593  )
594  )
595  );
596 
597  surfaceScalarField& alphaPhi = alphaPhis[phasei];
598 
599  forAllIter(PtrDictionary<phase>, phases_, iter2)
600  {
601  phase& alpha2 = iter2();
602 
603  if (&alpha2 == &alpha) continue;
604 
605  surfaceScalarField phir(phic*nHatf(alpha, alpha2));
606 
607  alphaPhi += fvc::flux
608  (
609  -fvc::flux(-phir, alpha2, alpharScheme),
610  alpha,
612  );
613  }
614 
615  // Limit alphaPhi for each phase
617  (
618  1.0/mesh_.time().deltaT().value(),
619  geometricOneField(),
620  alpha,
621  phi_,
622  alphaPhi,
623  zeroField(),
624  zeroField(),
625  oneField(),
626  zeroField(),
627  false
628  );
629 
630  phasei++;
631  }
632 
633  MULES::limitSum(alphas, alphaPhis, phi_);
634 
635  rhoPhi_ = dimensionedScalar(dimensionSet(1, 0, -1, 0, 0), 0);
636 
637  volScalarField sumAlpha
638  (
639  IOobject
640  (
641  "sumAlpha",
642  mesh_.time().timeName(),
643  mesh_
644  ),
645  mesh_,
647  );
648 
649  phasei = 0;
650 
651  forAllIter(PtrDictionary<phase>, phases_, iter)
652  {
653  phase& alpha = iter();
654  surfaceScalarField& alphaPhi = alphaPhis[phasei];
655 
657  (
658  geometricOneField(),
659  alpha,
660  alphaPhi
661  );
662 
663  rhoPhi_ += alphaPhi*alpha.rho();
664 
665  Info<< alpha.name() << " volume fraction, min, max = "
666  << alpha.weightedAverage(mesh_.V()).value()
667  << ' ' << min(alpha).value()
668  << ' ' << max(alpha).value()
669  << endl;
670 
671  sumAlpha += alpha;
672 
673  phasei++;
674  }
675 
676  Info<< "Phase-sum volume fraction, min, max = "
677  << sumAlpha.weightedAverage(mesh_.V()).value()
678  << ' ' << min(sumAlpha).value()
679  << ' ' << max(sumAlpha).value()
680  << endl;
681 
682  // Correct the sum of the phase-fractions to avoid 'drift'
683  volScalarField sumCorr(1.0 - sumAlpha);
684  forAllIter(PtrDictionary<phase>, phases_, iter)
685  {
686  phase& alpha = iter();
687  alpha += alpha*sumCorr;
688  }
689 
690  calcAlphas();
691 }
692 
693 
695 {
696  if (regIOobject::read())
697  {
698  bool readOK = true;
699 
700  PtrList<entry> phaseData(lookup("phases"));
701  label phasei = 0;
702 
703  forAllIter(PtrDictionary<phase>, phases_, iter)
704  {
705  readOK &= iter().read(phaseData[phasei++].dict());
706  }
707 
708  lookup("sigmas") >> sigmas_;
709 
710  return readOK;
711  }
712  else
713  {
714  return false;
715  }
716 }
717 
718 
719 // ************************************************************************* //
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)
dimensionedScalar tanh(const dimensionedScalar &ds)
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh >> grad(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
Definition: fvcGrad.C:52
dimensionedScalar acos(const dimensionedScalar &ds)
#define forAll(list, i)
Loop across all elements in list.
Definition: UList.H:434
const surfaceVectorField & Sf() const
Return cell face area vectors.
tmp< surfaceScalarField > muf() const
Return the face-interpolated dynamic laminar viscosity.
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
label phasei
Definition: pEqn.H:27
virtual bool read()
Read object.
error FatalError
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Definition: error.H:323
const Boundary & boundaryField() const
Return const-reference to the boundary field.
tmp< GeometricField< Type, fvPatchField, volMesh > > div(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
Definition: fvcDiv.C:47
Unit conversion functions.
#define forAllIter(Container, container, iter)
Iterate across all elements in the container object of type.
Definition: UList.H:459
To & refCast(From &r)
Reference type cast template function.
Definition: typeInfo.H:106
IOobject(const word &name, const fileName &instance, const objectRegistry &registry, readOption r=NO_READ, writeOption w=NO_WRITE, bool registerObject=true)
Construct from name, instance, registry, io options.
Definition: IOobject.C:167
volScalarField alpha(IOobject("alpha", runTime.timeName(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
static tmp< GeometricField< scalar, fvsPatchField, surfaceMesh > > New(const word &name, const Internal &, const PtrList< fvsPatchField< scalar >> &)
Return a temporary field constructed from name,.
GeometricField< vector, fvsPatchField, surfaceMesh > surfaceVectorField
const dimensionedScalar b
Wien displacement law constant: default SI units: [m K].
Definition: createFields.H:27
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:251
tmp< volScalarField > trho
tmp< volScalarField > nearInterface() const
Indicator of the proximity of the interface.
const dictionary & dict() const
Return populationBalanceCoeffs dictionary.
Calculate the snGrad of the given volField.
surfaceScalarField phir(fvc::flux(UdmModel.Udm()))
static word timeName(const scalar, const int precision=precision_)
Return time name of given scalar time.
Definition: Time.C:636
const dimensionSet dimless
dimensionedScalar det(const dimensionedSphericalTensor &dt)
const Time & time() const
Return the top-level database.
Definition: fvMesh.H:239
const dictionary & solverDict(const word &name) const
Return the solver controls dictionary for the given field.
Definition: solution.C:342
const DimensionedField< scalar, volMesh > & V() const
Return cell volumes.
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:58
T & first()
Return the first element of the list.
Definition: UListI.H:114
CGAL::Exact_predicates_exact_constructions_kernel K
multiphaseMixture(const volVectorField &U, const surfaceScalarField &phi)
Construct from components.
scalar degToRad(const scalar deg)
Conversion from degrees to radians.
tmp< volScalarField > rho() const
Return the mixture density.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:57
const dimensionedScalar sigma
Stefan-Boltzmann constant: default SI units: [W/m^2/K^4].
const dimensionSet dimTime
stressControl lookup("compactNormalStress") >> compactNormalStress
dynamicFvMesh & mesh
dimensionedScalar cos(const dimensionedScalar &ds)
bool read()
Read base transportProperties dictionary.
void limitSum(UPtrList< scalarField > &phiPsiCorrs)
Definition: MULES.C:30
Calculate the gradient of the given field.
phic
Definition: correctPhic.H:2
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
void correct()
Correct the mixture properties.
Calculate the face-flux of the given field.
const Type & value() const
Return const reference to value.
surfaceScalarField alphaPhi(phi.name()+alpha1.name(), fvc::flux(phi, alpha1, alphaScheme))
void correct()
Correct derived quantities.
word timeName
Definition: getTimeIndex.H:3
dimensioned< Type > average(const DimensionedField< Type, GeoMesh > &df)
faceListList boundary(nPatches)
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
Definition: pEqn.H:29
tmp< volScalarField > nu() const
Return the kinematic laminar viscosity.
IOdictionary(const IOobject &io, const word &wantedType)
Construct given an IOobject, supply wanted typeName.
Definition: IOdictionary.C:47
Calculate the divergence of the given field.
const surfaceScalarField & magSf() const
Return cell face area magnitudes.
dimensionedScalar pos0(const dimensionedScalar &ds)
static const char nl
Definition: Ostream.H:260
const dimensionedScalar mu
Atomic mass unit.
tmp< volScalarField > mu() const
Return the dynamic laminar viscosity.
const label nAlphaSubCycles(alphaControls.lookup< label >("nAlphaSubCycles"))
void solve()
Solve for the mixture phase-fractions.
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
const dimensionSet dimMass
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.
Internal & ref()
Return a reference to the dimensioned internal field.
const word alphaScheme(mesh.divScheme(divAlphaName)[1].wordToken())
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
tmp< surfaceScalarField > nuf() const
Return the face-interpolated dynamic laminar viscosity.
label patchi
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
const Time & time() const
Return time.
Definition: IOobject.C:318
const volScalarField & alphas() const
Return total void of phases belonging to this populationBalance.
word alpharScheme("div(phirb,alpha)")
messageStream Info
dimensioned< scalar > mag(const dimensioned< Type > &)
Field< vector > vectorField
Specialisation of Field<T> for vector.
MULES: Multidimensional universal limiter for explicit solution.
const doubleScalar e
Elementary charge.
Definition: doubleScalar.H:105
A class for managing temporary objects.
Definition: PtrList.H:53
tmp< surfaceScalarField > flux(const volVectorField &vvf)
Return the face-flux field obtained from the given volVectorField.
Definition: fvcFlux.C:32
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
const objectRegistry & db() const
Return the local objectRegistry.
Definition: IOobject.C:312
void explicitSolve(const RdeltaTType &rDeltaT, const RhoType &rho, volScalarField &psi, const surfaceScalarField &phiPsi, const SpType &Sp, const SuType &Su)
dimensionedScalar deltaT() const
Return time step.
Definition: TimeStateI.H:53
tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > snGrad(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
Definition: fvcSnGrad.C:45
friend class const_iterator
Definition: LPtrList.H:87
tmp< surfaceScalarField > surfaceTensionForce() const
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
Definition: dictionary.C:844
const fvBoundaryMesh & boundary() const
Return reference to boundary mesh.
Definition: fvMesh.C:540