33 void Foam::solvers::incompressibleMultiphaseVoF::alphaSolve()
35 const word alphaScheme(
"div(phi,alpha)");
36 const word alpharScheme(
"div(phirb,alpha)");
41 UPtrList<const volScalarField> alphas(
phases.size());
42 PtrList<surfaceScalarField> alphaPhis(
phases.size());
46 const incompressibleVoFphase&
alpha =
phases[phasei];
48 alphas.set(phasei, &
alpha);
55 "phi" +
alpha.name() +
"Corr",
69 incompressibleVoFphase& alpha2 =
phases[phasej];
71 if (&alpha2 == &
alpha)
continue;
130 Info<<
alpha.name() <<
" volume fraction, min, max = "
139 Info<<
"Phase-sum volume fraction, min, max = "
140 << sumAlpha.weightedAverage(
mesh.
V()).value()
141 <<
' ' <<
min(sumAlpha).value()
142 <<
' ' <<
max(sumAlpha).value()
157 const label nAlphaSubCycles = ceil(nAlphaSubCyclesPtr->value(alphaCoNum));
159 if (nAlphaSubCycles > 1)
178 alphas.
set(phasei, &phases[phasei]);
188 !(++alphaSubCycle).end();
192 rhoPhiSum += (runTime.deltaT()/totalDeltaT)*rhoPhi;
MULES: Multidimensional universal limiter for explicit solution.
#define forAll(list, i)
Loop across all elements in list.
Generic GeometricField class.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
IOobject(const word &name, const fileName &instance, const objectRegistry ®istry, readOption r=NO_READ, writeOption w=NO_WRITE, bool registerObject=true)
Construct from name, instance, registry, io options.
dimensionedScalar deltaT() const
Return time step.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
bool set(const label) const
Is element set.
const Type & value() const
Return const reference to value.
const word & name() const
Return const reference to name.
const Time & time() const
Return the top-level database.
const DimensionedField< scalar, volMesh > & V() const
Return cell volumes.
const surfaceScalarField & magSf() const
Return cell face area magnitudes.
tmp< surfaceScalarField > nHatf(const volScalarField &alpha1, const volScalarField &alpha2) const
const fvMesh & mesh
Region mesh.
const surfaceScalarField & phi
Reference to the mass-flux field.
surfaceScalarField rhoPhi
Mass flux field.
virtual void alphaPredictor()
Solve for the phase-fractions.
UPtrListDictionary< incompressibleVoFphase > & phases
Reference to the phases.
incompressibleMultiphaseVoFMixture & mixture
The compressible two-phase mixture.
MULES::control MULEScontrols
MULES controls.
Perform a subCycleTime on a field or list of fields.
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
Calculate the face-flux of the given field.
volScalarField alpha(IOobject("alpha", runTime.name(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
void limitSum(const UPtrList< const volScalarField > &psis, const PtrList< surfaceScalarField > &alphaPhiBDs, UPtrList< surfaceScalarField > &psiPhis, const surfaceScalarField &phi)
void explicitSolve(const RdeltaTType &rDeltaT, const RhoType &rho, volScalarField &psi, const surfaceScalarField &psiPhi, const SpType &Sp, const SuType &Su)
void limit(const control &controls, const RdeltaTType &rDeltaT, const RhoType &rho, const volScalarField &psi, const surfaceScalarField &phi, surfaceScalarField &psiPhi, const SpType &Sp, const SuType &Su, const PsiMaxType &psiMax, const PsiMinType &psiMin, const bool returnCorr)
tmp< SurfaceField< typename innerProduct< vector, Type >::type > > flux(const VolField< Type > &vf)
Return the face-flux field obtained from the given volVectorField.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Ostream & endl(Ostream &os)
Add newline and flush stream.
const dimensionSet dimless
SurfaceField< scalar > surfaceScalarField
void mag(LagrangianPatchField< scalar > &f, const LagrangianPatchField< Type > &f1)
layerAndWeight min(const layerAndWeight &a, const layerAndWeight &b)
VolField< scalar > volScalarField
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.