34 void Foam::solvers::compressibleMultiphaseVoF::alphaSolve
41 const word alphaScheme(
"div(phi,alpha)");
42 const word alpharScheme(
"div(phirb,alpha)");
45 phic =
min(cAlpha*phic,
max(phic));
47 UPtrList<const volScalarField> alphas(
phases.size());
48 PtrList<surfaceScalarField> alphaPhis(
phases.size());
54 alphas.set(phasei, &
alpha);
61 "phi" +
alpha.name() +
"Corr",
75 compressibleVoFphase& alpha2 =
phases[phasej];
77 if (&alpha2 == &
alpha)
continue;
159 if (vDot[celli] < 0.0 &&
alpha[celli] > 0.0)
161 Sp[celli] += vDot[celli]*
alpha[celli];
162 Su[celli] -= vDot[celli]*
alpha[celli];
164 else if (vDot[celli] > 0.0 &&
alpha[celli] < 1.0)
166 Sp[celli] -= vDot[celli]*(1.0 -
alpha[celli]);
174 const compressibleVoFphase& alpha2 =
phases[phasej];
176 if (&alpha2 == &
alpha)
continue;
182 if (vDot2[celli] > 0.0 && alpha2[celli] < 1.0)
184 Sp[celli] -= vDot2[celli]*(1.0 - alpha2[celli]);
185 Su[celli] += vDot2[celli]*
alpha[celli];
187 else if (vDot2[celli] < 0.0 && alpha2[celli] > 0.0)
189 Sp[celli] += vDot2[celli]*alpha2[celli];
205 Info<<
alpha.name() <<
" volume fraction, min, max = "
249 alphaPtrs[phasei] = &phases[phasei];
259 !(++alphaSubCycle).end();
263 rhoPhiSum += (runTime.deltaT()/totalDeltaT)*rhoPhi;
CMULES: Multidimensional universal limiter for explicit corrected implicit solution.
#define forAll(list, i)
Loop across all elements in list.
const label nAlphaSubCycles(alphaControls.lookup< label >("nAlphaSubCycles"))
const dictionary & alphaControls
Generic GeometricField class.
DimensionedField< Type, GeoMesh > Internal
Type of the internal field from which this GeometricField is derived.
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.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
dimensionedScalar deltaT() const
Return time step.
A list of keyword definitions, which are a keyword followed by any number of values (e....
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.
autoPtr< volScalarField > divU
Pointer to the momentum divergence field.
const volVectorField & U
Reference to the velocity field.
UPtrListDictionary< compressibleVoFphase > & phases
Reference to the phases.
virtual void alphaPredictor()
Solve for the phase-fractions.
compressibleMultiphaseVoFMixture & mixture
The compressible two-phase mixture.
Perform a subCycleTime on a field or list of fields.
Calculate the face-flux of the given field.
Calculate the mesh motion flux and convert fluxes from absolute to relative and back.
volScalarField alpha(IOobject("alpha", runTime.name(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
void explicitSolve(const RdeltaTType &rDeltaT, const RhoType &rho, volScalarField &psi, const surfaceScalarField &phiPsi, const SpType &Sp, const SuType &Su)
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)
void limitSum(UPtrList< scalarField > &phiPsiCorrs)
tmp< SurfaceField< typename innerProduct< vector, Type >::type > > flux(const VolField< Type > &vf)
Return the face-flux field obtained from the given volVectorField.
static tmp< SurfaceField< Type > > interpolate(const VolField< Type > &tvf, const surfaceScalarField &faceFlux, Istream &schemeData)
Interpolate field onto faces using scheme given by Istream.
tmp< VolField< Type > > Su(const VolField< Type > &su, const VolField< Type > &vf)
tmp< VolField< Type > > Sp(const volScalarField &sp, const VolField< Type > &vf)
tmp< VolField< Type > > div(const SurfaceField< Type > &ssf)
tmp< surfaceScalarField > absolute(const tmp< surfaceScalarField > &tphi, const volVectorField &U)
Return the given relative flux in absolute form.
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
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
layerAndWeight min(const layerAndWeight &a, const layerAndWeight &b)
VolField< scalar > volScalarField
dimensioned< scalar > mag(const dimensioned< Type > &)
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.