multiphaseSystem.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 | Copyright (C) 2013-2015 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 "multiphaseSystem.H"
27 #include "alphaContactAngleFvPatchScalarField.H"
28 
29 #include "MULES.H"
30 #include "subCycle.H"
31 
32 #include "fvcDdt.H"
33 #include "fvcDiv.H"
34 #include "fvcSnGrad.H"
35 #include "fvcFlux.H"
36 #include "fvcMeshPhi.H"
37 #include "fvcSup.H"
38 
39 #include "fvmDdt.H"
40 #include "fvmLaplacian.H"
41 #include "fvmSup.H"
42 
43 // * * * * * * * * * * * * * * * Static Member Data * * * * * * * * * * * * //
44 
45 namespace Foam
46 {
47  defineTypeNameAndDebug(multiphaseSystem, 0);
48  defineRunTimeSelectionTable(multiphaseSystem, dictionary);
49 }
50 
51 const Foam::scalar Foam::multiphaseSystem::convertToRad =
53 
54 
55 // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
56 
58 {
59  scalar level = 0.0;
60  alphas_ == 0.0;
61 
62  forAll(phases(), i)
63  {
64  alphas_ += level*phases()[i];
65  level += 1.0;
66  }
67 
69 }
70 
71 
73 {
74  PtrList<surfaceScalarField> alphaPhiCorrs(phases().size());
75  forAll(phases(), phasei)
76  {
77  phaseModel& phase = phases()[phasei];
78  volScalarField& alpha1 = phase;
79 
80  phase.alphaPhi() =
81  dimensionedScalar("0", dimensionSet(0, 3, -1, 0, 0), 0);
82 
83  alphaPhiCorrs.set
84  (
85  phasei,
87  (
88  "phi" + alpha1.name() + "Corr",
89  fvc::flux
90  (
91  phi_,
92  phase,
93  "div(phi," + alpha1.name() + ')'
94  )
95  )
96  );
97 
98  surfaceScalarField& alphaPhiCorr = alphaPhiCorrs[phasei];
99 
100  forAll(phases(), phasej)
101  {
102  phaseModel& phase2 = phases()[phasej];
104 
105  if (&phase2 == &phase) continue;
106 
107  surfaceScalarField phir(phase.phi() - phase2.phi());
108 
109  cAlphaTable::const_iterator cAlpha
110  (
111  cAlphas_.find(phasePairKey(phase.name(), phase2.name()))
112  );
113 
114  if (cAlpha != cAlphas_.end())
115  {
117  (
118  (mag(phi_) + mag(phir))/mesh_.magSf()
119  );
120 
121  phir += min(cAlpha()*phic, max(phic))*nHatf(phase, phase2);
122  }
123 
124  word phirScheme
125  (
126  "div(phir," + alpha2.name() + ',' + alpha1.name() + ')'
127  );
128 
129  alphaPhiCorr += fvc::flux
130  (
131  -fvc::flux(-phir, phase2, phirScheme),
132  phase,
133  phirScheme
134  );
135  }
136 
137  // Ensure that the flux at inflow BCs is preserved
138  forAll(alphaPhiCorr.boundaryField(), patchi)
139  {
140  fvsPatchScalarField& alphaPhiCorrp =
141  alphaPhiCorr.boundaryField()[patchi];
142 
143  if (!alphaPhiCorrp.coupled())
144  {
145  const scalarField& phi1p = phase.phi().boundaryField()[patchi];
146  const scalarField& alpha1p = alpha1.boundaryField()[patchi];
147 
148  forAll(alphaPhiCorrp, facei)
149  {
150  if (phi1p[facei] < 0)
151  {
152  alphaPhiCorrp[facei] = alpha1p[facei]*phi1p[facei];
153  }
154  }
155  }
156  }
157 
158  if (fv::localEulerDdt::enabled(mesh_))
159  {
160  const volScalarField& rDeltaT =
162 
164  (
165  rDeltaT,
166  geometricOneField(),
167  phase,
168  phi_,
169  alphaPhiCorr,
170  zeroField(),
171  zeroField(),
172  phase.alphaMax(),
173  0,
174  true
175  );
176  }
177  else
178  {
179  const scalar rDeltaT = 1.0/mesh_.time().deltaTValue();
180 
182  (
183  rDeltaT,
184  geometricOneField(),
185  phase,
186  phi_,
187  alphaPhiCorr,
188  zeroField(),
189  zeroField(),
190  phase.alphaMax(),
191  0,
192  true
193  );
194  }
195  }
196 
197  MULES::limitSum(alphaPhiCorrs);
198 
199  volScalarField sumAlpha
200  (
201  IOobject
202  (
203  "sumAlpha",
204  mesh_.time().timeName(),
205  mesh_
206  ),
207  mesh_,
208  dimensionedScalar("sumAlpha", dimless, 0)
209  );
210 
211 
212  volScalarField divU(fvc::div(fvc::absolute(phi_, phases().first().U())));
213 
214  forAll(phases(), phasei)
215  {
216  phaseModel& phase = phases()[phasei];
217  volScalarField& alpha = phase;
218 
219  surfaceScalarField& alphaPhic = alphaPhiCorrs[phasei];
220  alphaPhic += upwind<scalar>(mesh_, phi_).flux(phase);
221 
223  (
224  IOobject
225  (
226  "Sp",
227  mesh_.time().timeName(),
228  mesh_
229  ),
230  mesh_,
231  dimensionedScalar("Sp", divU.dimensions(), 0.0)
232  );
233 
235  (
236  IOobject
237  (
238  "Su",
239  mesh_.time().timeName(),
240  mesh_
241  ),
242  // Divergence term is handled explicitly to be
243  // consistent with the explicit transport solution
244  divU*min(alpha, scalar(1))
245  );
246 
247  if (phase.divU().valid())
248  {
249  const scalarField& dgdt = phase.divU()();
250 
251  forAll(dgdt, celli)
252  {
253  if (dgdt[celli] > 0.0)
254  {
255  Sp[celli] -= dgdt[celli];
256  Su[celli] += dgdt[celli];
257  }
258  else if (dgdt[celli] < 0.0)
259  {
260  Sp[celli] +=
261  dgdt[celli]
262  *(1.0 - alpha[celli])/max(alpha[celli], 1e-4);
263  }
264  }
265  }
266 
267  forAll(phases(), phasej)
268  {
269  const phaseModel& phase2 = phases()[phasej];
270  const volScalarField& alpha2 = phase2;
271 
272  if (&phase2 == &phase) continue;
273 
274  if (phase2.divU().valid())
275  {
276  const scalarField& dgdt2 = phase2.divU()();
277 
278  forAll(dgdt2, celli)
279  {
280  if (dgdt2[celli] < 0.0)
281  {
282  Sp[celli] +=
283  dgdt2[celli]
284  *(1.0 - alpha2[celli])/max(alpha2[celli], 1e-4);
285 
286  Su[celli] -=
287  dgdt2[celli]
288  *alpha[celli]/max(alpha2[celli], 1e-4);
289  }
290  else if (dgdt2[celli] > 0.0)
291  {
292  Sp[celli] -= dgdt2[celli];
293  }
294  }
295  }
296  }
297 
299  (
300  geometricOneField(),
301  alpha,
302  alphaPhic,
303  Sp,
304  Su
305  );
306 
307  phase.alphaPhi() += alphaPhic;
308 
309  Info<< phase.name() << " volume fraction, min, max = "
310  << phase.weightedAverage(mesh_.V()).value()
311  << ' ' << min(phase).value()
312  << ' ' << max(phase).value()
313  << endl;
314 
315  sumAlpha += phase;
316  }
317 
318  Info<< "Phase-sum volume fraction, min, max = "
319  << sumAlpha.weightedAverage(mesh_.V()).value()
320  << ' ' << min(sumAlpha).value()
321  << ' ' << max(sumAlpha).value()
322  << endl;
323 }
324 
325 
327 (
328  const volScalarField& alpha1,
329  const volScalarField& alpha2
330 ) const
331 {
332  /*
333  // Cell gradient of alpha
334  volVectorField gradAlpha =
335  alpha2*fvc::grad(alpha1) - alpha1*fvc::grad(alpha2);
336 
337  // Interpolated face-gradient of alpha
338  surfaceVectorField gradAlphaf = fvc::interpolate(gradAlpha);
339  */
340 
341  surfaceVectorField gradAlphaf
342  (
345  );
346 
347  // Face unit interface normal
348  return gradAlphaf/(mag(gradAlphaf) + deltaN_);
349 }
350 
351 
353 (
354  const volScalarField& alpha1,
355  const volScalarField& alpha2
356 ) const
357 {
358  // Face unit interface normal flux
359  return nHatfv(alpha1, alpha2) & mesh_.Sf();
360 }
361 
362 
363 // Correction for the boundary condition on the unit normal nHat on
364 // walls to produce the correct contact angle.
365 
366 // The dynamic contact angle is calculated from the component of the
367 // velocity on the direction of the interface, parallel to the wall.
368 
370 (
371  const phaseModel& phase1,
372  const phaseModel& phase2,
373  surfaceVectorField::GeometricBoundaryField& nHatb
374 ) const
375 {
376  const volScalarField::GeometricBoundaryField& gbf
377  = phase1.boundaryField();
378 
379  const fvBoundaryMesh& boundary = mesh_.boundary();
380 
382  {
383  if (isA<alphaContactAngleFvPatchScalarField>(gbf[patchi]))
384  {
385  const alphaContactAngleFvPatchScalarField& acap =
386  refCast<const alphaContactAngleFvPatchScalarField>(gbf[patchi]);
387 
388  vectorField& nHatPatch = nHatb[patchi];
389 
390  vectorField AfHatPatch
391  (
392  mesh_.Sf().boundaryField()[patchi]
393  /mesh_.magSf().boundaryField()[patchi]
394  );
395 
396  alphaContactAngleFvPatchScalarField::thetaPropsTable::
397  const_iterator tp =
398  acap.thetaProps()
399  .find(phasePairKey(phase1.name(), phase2.name()));
400 
401  if (tp == acap.thetaProps().end())
402  {
404  << "Cannot find interface "
405  << phasePairKey(phase1.name(), phase2.name())
406  << "\n in table of theta properties for patch "
407  << acap.patch().name()
408  << exit(FatalError);
409  }
410 
411  bool matched = (tp.key().first() == phase1.name());
412 
413  scalar theta0 = convertToRad*tp().theta0(matched);
414  scalarField theta(boundary[patchi].size(), theta0);
415 
416  scalar uTheta = tp().uTheta();
417 
418  // Calculate the dynamic contact angle if required
419  if (uTheta > SMALL)
420  {
421  scalar thetaA = convertToRad*tp().thetaA(matched);
422  scalar thetaR = convertToRad*tp().thetaR(matched);
423 
424  // Calculated the component of the velocity parallel to the wall
425  vectorField Uwall
426  (
427  phase1.U()().boundaryField()[patchi].patchInternalField()
428  - phase1.U()().boundaryField()[patchi]
429  );
430  Uwall -= (AfHatPatch & Uwall)*AfHatPatch;
431 
432  // Find the direction of the interface parallel to the wall
433  vectorField nWall
434  (
435  nHatPatch - (AfHatPatch & nHatPatch)*AfHatPatch
436  );
437 
438  // Normalise nWall
439  nWall /= (mag(nWall) + SMALL);
440 
441  // Calculate Uwall resolved normal to the interface parallel to
442  // the interface
443  scalarField uwall(nWall & Uwall);
444 
445  theta += (thetaA - thetaR)*tanh(uwall/uTheta);
446  }
447 
448 
449  // Reset nHatPatch to correspond to the contact angle
450 
451  scalarField a12(nHatPatch & AfHatPatch);
452 
453  scalarField b1(cos(theta));
454 
455  scalarField b2(nHatPatch.size());
456 
457  forAll(b2, facei)
458  {
459  b2[facei] = cos(acos(a12[facei]) - theta[facei]);
460  }
461 
462  scalarField det(1.0 - a12*a12);
463 
464  scalarField a((b1 - a12*b2)/det);
465  scalarField b((b2 - a12*b1)/det);
466 
467  nHatPatch = a*AfHatPatch + b*nHatPatch;
468 
469  nHatPatch /= (mag(nHatPatch) + deltaN_.value());
470  }
471  }
472 }
473 
474 
476 (
477  const phaseModel& phase1,
478  const phaseModel& phase2
479 ) const
480 {
481  tmp<surfaceVectorField> tnHatfv = nHatfv(phase1, phase2);
482 
483  correctContactAngle(phase1, phase2, tnHatfv().boundaryField());
484 
485  // Simple expression for curvature
486  return -fvc::div(tnHatfv & mesh_.Sf());
487 }
488 
489 
490 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
491 
493 (
494  const fvMesh& mesh
495 )
496 :
497  phaseSystem(mesh),
498 
499  alphas_
500  (
501  IOobject
502  (
503  "alphas",
504  mesh_.time().timeName(),
505  mesh,
506  IOobject::NO_READ,
507  IOobject::AUTO_WRITE
508  ),
509  mesh,
510  dimensionedScalar("alphas", dimless, 0.0),
511  zeroGradientFvPatchScalarField::typeName
512  ),
513 
514  cAlphas_(lookup("interfaceCompression")),
515 
516  deltaN_
517  (
518  "deltaN",
519  1e-8/pow(average(mesh_.V()), 1.0/3.0)
520  )
521 {
522  forAll(phases(), phasei)
523  {
524  volScalarField& alphai = phases()[phasei];
525  mesh_.setFluxRequired(alphai.name());
526  }
527 }
528 
529 
530 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
531 
533 {}
534 
535 
536 // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
537 
539 (
540  const phaseModel& phase1
541 ) const
542 {
543  tmp<surfaceScalarField> tSurfaceTension
544  (
546  (
547  IOobject
548  (
549  "surfaceTension",
550  mesh_.time().timeName(),
551  mesh_
552  ),
553  mesh_,
555  (
556  "surfaceTension",
557  dimensionSet(1, -2, -2, 0, 0),
558  0
559  )
560  )
561  );
562 
563  forAll(phases(), phasej)
564  {
565  const phaseModel& phase2 = phases()[phasej];
566 
567  if (&phase2 != &phase1)
568  {
569  phasePairKey key12(phase1.name(), phase2.name());
570 
571  cAlphaTable::const_iterator cAlpha(cAlphas_.find(key12));
572 
573  if (cAlpha != cAlphas_.end())
574  {
575  tSurfaceTension() +=
577  *(
580  );
581  }
582  }
583  }
584 
585  return tSurfaceTension;
586 }
587 
588 
591 {
592  tmp<volScalarField> tnearInt
593  (
594  new volScalarField
595  (
596  IOobject
597  (
598  "nearInterface",
599  mesh_.time().timeName(),
600  mesh_
601  ),
602  mesh_,
603  dimensionedScalar("nearInterface", dimless, 0.0)
604  )
605  );
606 
607  forAll(phases(), phasei)
608  {
609  tnearInt() = max
610  (
611  tnearInt(),
612  pos(phases()[phasei] - 0.01)*pos(0.99 - phases()[phasei])
613  );
614  }
615 
616  return tnearInt;
617 }
618 
619 
621 {
622  const Time& runTime = mesh_.time();
623 
624  const dictionary& alphaControls = mesh_.solverDict("alpha");
625  label nAlphaSubCycles(readLabel(alphaControls.lookup("nAlphaSubCycles")));
626 
627  bool LTS = fv::localEulerDdt::enabled(mesh_);
628 
629  if (nAlphaSubCycles > 1)
630  {
631  tmp<volScalarField> trSubDeltaT;
632 
633  if (LTS)
634  {
635  trSubDeltaT =
637  }
638 
639  dimensionedScalar totalDeltaT = runTime.deltaT();
640 
641  PtrList<volScalarField> alpha0s(phases().size());
642  PtrList<surfaceScalarField> alphaPhiSums(phases().size());
643 
644  forAll(phases(), phasei)
645  {
646  phaseModel& phase = phases()[phasei];
647  volScalarField& alpha = phase;
648 
649  alpha0s.set
650  (
651  phasei,
652  new volScalarField(alpha.oldTime())
653  );
654 
655  alphaPhiSums.set
656  (
657  phasei,
659  (
660  IOobject
661  (
662  "phiSum" + alpha.name(),
663  runTime.timeName(),
664  mesh_
665  ),
666  mesh_,
667  dimensionedScalar("0", dimensionSet(0, 3, -1, 0, 0), 0)
668  )
669  );
670  }
671 
672  for
673  (
674  subCycleTime alphaSubCycle
675  (
676  const_cast<Time&>(runTime),
678  );
679  !(++alphaSubCycle).end();
680  )
681  {
682  solveAlphas();
683 
684  forAll(phases(), phasei)
685  {
686  alphaPhiSums[phasei] += phases()[phasei].alphaPhi();
687  }
688  }
689 
690  forAll(phases(), phasei)
691  {
692  phaseModel& phase = phases()[phasei];
693  volScalarField& alpha = phase;
694 
695  phase.alphaPhi() = alphaPhiSums[phasei]/nAlphaSubCycles;
696 
697  // Correct the time index of the field
698  // to correspond to the global time
699  alpha.timeIndex() = runTime.timeIndex();
700 
701  // Reset the old-time field value
702  alpha.oldTime() = alpha0s[phasei];
703  alpha.oldTime().timeIndex() = runTime.timeIndex();
704  }
705  }
706  else
707  {
708  solveAlphas();
709  }
710 
711  forAll(phases(), phasei)
712  {
713  phaseModel& phase = phases()[phasei];
714  phase.alphaRhoPhi() = fvc::interpolate(phase.rho())*phase.alphaPhi();
715  }
716 
717  calcAlphas();
718 }
719 
720 
721 // ************************************************************************* //
Foam::fvc::snGrad
tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > snGrad(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
Definition: fvcSnGrad.C:45
Foam::scalarField
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
Definition: primitiveFieldsFwd.H:48
Foam::fv::localEulerDdt::localRDeltaT
static const volScalarField & localRDeltaT(const fvMesh &mesh)
Return the reciprocal of the local time-step.
Definition: localEulerDdt.C:45
Foam::dimless
const dimensionSet dimless(0, 0, 0, 0, 0, 0, 0)
Definition: dimensionSets.H:47
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:38
Foam::fvc::grad
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh >> grad(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
Definition: fvcGrad.C:52
Foam::phaseModel::divU
virtual const tmp< volScalarField > & divU() const
Return the phase dilatation rate (d(alpha)/dt + div(alpha*phi))
Foam::multiphaseSystem::solve
void solve()
Solve for the mixture phase-fractions.
Foam::multiphaseSystem::nHatf
tmp< surfaceScalarField > nHatf(const volScalarField &alpha1, const volScalarField &alpha2) const
Foam::fv::localEulerDdt::localRSubDeltaT
static tmp< volScalarField > localRSubDeltaT(const fvMesh &mesh, const label nAlphaSubCycles)
Calculate and return the reciprocal of the local sub-cycling.
Definition: localEulerDdt.C:57
Foam::multiphaseSystem::surfaceTension
tmp< surfaceScalarField > surfaceTension(const phaseModel &phase) const
forAll
#define forAll(list, i)
Loop across all elements in list.
Definition: UList.H:406
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:118
fvcMeshPhi.H
Calculate the mesh motion flux and convert fluxes from absolute to relative and back.
subCycle.H
Foam::defineRunTimeSelectionTable
defineRunTimeSelectionTable(reactionRateFlameArea, dictionary)
Foam::fvsPatchScalarField
fvsPatchField< scalar > fvsPatchScalarField
Definition: fvsPatchFieldsFwd.H:43
Foam::constant::atomic::alpha
const dimensionedScalar alpha
Fine-structure constant: default SI units: [].
Definition: readThermalProperties.H:216
Foam::multiphaseSystem::nearInterface
tmp< volScalarField > nearInterface() const
Indicator of the proximity of the interface.
fvcSnGrad.H
Calculate the snGrad of the given volField.
boundary
faceListList boundary(nPatches)
Foam::fvc::interpolate
tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > interpolate(const GeometricField< Type, fvPatchField, volMesh > &vf, const surfaceScalarField &faceFlux, Istream &schemeData)
Interpolate field onto faces using scheme given by Istream.
Definition: surfaceInterpolate.C:110
fvcDiv.H
Calculate the divergence of the given field.
Foam::dimensioned::name
const word & name() const
Return const reference to name.
Definition: dimensionedType.C:235
Foam::fvc::div
tmp< GeometricField< Type, fvPatchField, volMesh > > div(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
Definition: fvcDiv.C:47
Foam::GeometricField::boundaryField
GeometricBoundaryField & boundaryField()
Return reference to GeometricBoundaryField.
Definition: GeometricField.C:735
tp
volScalarField tp(IOobject("tp", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE), mesh, dimensionedScalar("tp", dimensionSet(0, 0, 1, 0, 0, 0, 0), 0))
Foam::endl
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:251
Foam::dimensioned::value
const Type & value() const
Return const reference to value.
Definition: dimensionedType.C:261
fvcSup.H
Calculate the field for explicit evaluation of implicit and explicit sources.
phir
surfaceScalarField phir(phic *interface.nHatf())
Foam::mag
dimensioned< scalar > mag(const dimensioned< Type > &)
U
U
Definition: pEqn.H:46
Foam::vectorField
Field< vector > vectorField
Specialisation of Field<T> for vector.
Definition: primitiveFieldsFwd.H:49
K
CGAL::Exact_predicates_exact_constructions_kernel K
Definition: CGALTriangulation3DKernel.H:56
Foam::fv::localEulerDdt::enabled
static bool enabled(const fvMesh &mesh)
Return true if LTS is enabled.
Definition: localEulerDdt.C:36
Foam::label
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
Foam::constant::physicoChemical::b
const dimensionedScalar b
Wien displacement law constant: default SI units: [m.K].
Definition: createFields.H:28
Foam::fvc::Su
tmp< GeometricField< Type, fvPatchField, volMesh > > Su(const GeometricField< Type, fvPatchField, volMesh > &su, const GeometricField< Type, fvPatchField, volMesh > &vf)
Definition: fvcSup.C:44
Foam::multiphaseSystem::~multiphaseSystem
virtual ~multiphaseSystem()
Destructor.
Definition: multiphaseSystem.H:238
nAlphaSubCycles
label nAlphaSubCycles(readLabel(alphaControls.lookup("nAlphaSubCycles")))
Foam::tanh
dimensionedScalar tanh(const dimensionedScalar &ds)
Definition: dimensionedScalar.C:263
Foam::multiphaseSystem::nHatfv
tmp< surfaceVectorField > nHatfv(const volScalarField &alpha1, const volScalarField &alpha2) const
Foam::Info
messageStream Info
fvmLaplacian.H
Calculate the matrix for the laplacian of the field.
Foam::MULES::limitSum
void limitSum(UPtrList< scalarField > &phiPsiCorrs)
Definition: MULES.C:51
Foam::dimensionedScalar
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
Definition: dimensionedScalarFwd.H:41
Foam::phaseModel::name
const word & name() const
Definition: phaseModel.H:109
Foam::volScalarField
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:52
Foam::pow
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
Definition: dimensionedScalar.C:73
alpha2
alpha2
Definition: alphaEqn.H:112
Foam::FatalError
error FatalError
Foam::multiphaseSystem::alphas_
volScalarField alphas_
Definition: multiphaseSystem.H:166
LTS
bool LTS
Definition: createRDeltaT.H:1
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:18
boundaryField
cellIbMask *cellIbMaskExt *faceIbMask *cellIbMask boundaryField().evaluateCoupled()
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 scalar psiMax, const scalar psiMin, const bool returnCorr)
Definition: MULESTemplates.C:526
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::e
const double e
Elementary charge.
Definition: doubleFloat.H:94
Foam::multiphaseSystem::calcAlphas
void calcAlphas()
Foam::multiphaseSystem::solveAlphas
void solveAlphas()
phic
phic
Definition: alphaEqnsSubCycle.H:5
Foam::phaseModel::phi
const surfaceScalarField & phi() const
Definition: phaseModel.H:190
alpha1
volScalarField & alpha1
Definition: createFields.H:15
fvmSup.H
Calculate the matrix for implicit and explicit sources.
Foam::exit
errorManipArg< error, int > exit(error &err, const int errNo=1)
Definition: errorManip.H:124
Foam::GeometricField::correctBoundaryConditions
void correctBoundaryConditions()
Correct boundary field.
Definition: GeometricField.C:885
Foam::max
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
FatalErrorInFunction
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Definition: error.H:318
Foam::phaseModel::U
const volVectorField & U() const
Definition: phaseModel.H:170
Foam::multiphaseSystem::correctContactAngle
void correctContactAngle(const phaseModel &alpha1, const phaseModel &alpha2, surfaceVectorField::GeometricBoundaryField &nHatb) const
phasei
label phasei
Definition: pEqn.H:37
Foam::surfaceScalarField
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
Definition: surfaceFieldsFwd.H:52
divU
volScalarField divU(fvc::div(fvc::absolute(phi, U)))
Foam::acos
dimensionedScalar acos(const dimensionedScalar &ds)
Definition: dimensionedScalar.C:259
fvcFlux.H
Calculate the face-flux of the given field.
phases
multiphaseSystem::phaseModelList & phases
Definition: createFields.H:11
patchi
label patchi
Definition: getPatchFieldScalar.H:1
timeName
word timeName
Definition: getTimeIndex.H:3
Foam::readLabel
label readLabel(Istream &is)
Definition: label.H:64
Foam::constant::physicoChemical::sigma
const dimensionedScalar sigma
Stefan-Boltzmann constant: default SI units: [W/m2/K4].
Foam::multiphaseSystem::phases
const PtrDictionary< phaseModel > & phases() const
Return the phases.
Definition: multiphaseSystem.H:245
phase2
phaseModel & phase2
Definition: createFields.H:13
Foam::constant::mathematical::pi
const scalar pi(M_PI)
fvcDdt.H
Calculate the first temporal derivative.
Foam::GeometricField::DimensionedInternalField
DimensionedField< Type, GeoMesh > DimensionedInternalField
Definition: GeometricField.H:100
Foam::det
dimensionedScalar det(const dimensionedSphericalTensor &dt)
Definition: dimensionedSphericalTensor.C:60
Foam::fvc::flux
tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > flux(const surfaceScalarField &phi, const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
Definition: fvcFlux.C:45
Foam::fvc::Sp
tmp< GeometricField< Type, fvPatchField, volMesh > > Sp(const volScalarField &sp, const GeometricField< Type, fvPatchField, volMesh > &vf)
Definition: fvcSup.C:67
Foam::surfaceVectorField
GeometricField< vector, fvsPatchField, surfaceMesh > surfaceVectorField
Definition: surfaceFieldsFwd.H:55
MULES.H
MULES: Multidimensional universal limiter for explicit solution.
Foam::defineTypeNameAndDebug
defineTypeNameAndDebug(combustionModel, 0)
Foam::min
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
Foam::fvc::absolute
tmp< surfaceScalarField > absolute(const tmp< surfaceScalarField > &tphi, const volVectorField &U)
Return the given relative flux in absolute form.
Definition: fvcMeshPhi.C:187
Foam::multiphaseSystem::multiphaseSystem
multiphaseSystem(const volVectorField &U, const surfaceScalarField &phi)
Construct from components.
Foam::multiphaseSystem::convertToRad
static const scalar convertToRad
Conversion factor for degrees into radians.
Definition: multiphaseSystem.H:190
phase1
phaseModel & phase1
Definition: createFields.H:12
Foam::average
dimensioned< Type > average(const DimensionedField< Type, GeoMesh > &df)
Definition: DimensionedFieldFunctions.C:335
fvmDdt.H
Calulate the matrix for the first temporal derivative.
lookup
stressControl lookup("compactNormalStress") >> compactNormalStress
Foam::multiphaseSystem::K
tmp< volScalarField > K(const phaseModel &alpha1, const phaseModel &alpha2) const
Foam::cos
dimensionedScalar cos(const dimensionedScalar &ds)
Definition: dimensionedScalar.C:256
Foam::pos
dimensionedScalar pos(const dimensionedScalar &ds)
Definition: dimensionedScalar.C:190
alphaControls
const dictionary & alphaControls
Definition: alphaControls.H:1