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