16 phaseModel& phase =
fluid.movingPhases()[movingPhasei];
24 IOobject::groupName(
"rAU", phase.name()),
27 UEqns[phase.index()].A()
28 +
byDt(
max(phase.residualAlpha() -
alpha, scalar(0))*phase.rho())
65 phaseModel& phase =
fluid.movingPhases()[movingPhasei];
66 MRF.correctBoundaryFlux(phase.U(), phase.phiRef());
70 PtrList<surfaceScalarField> phigFs(
phases.size());
90 -
fluid.surfaceTension(phase)*
mesh.magSf()
107 PtrList<surfaceScalarField> ddtCorrByAs(
fluid.ddtCorrByAs(
rAUs));
111 phaseModel& phase =
fluid.movingPhases()[movingPhasei];
119 IOobject::groupName(
"HbyA", phase.name()),
124 HbyAs[phase.index()] =
127 UEqns[phase.index()].H()
130 max(phase.residualAlpha() -
alpha, scalar(0))
141 IOobject::groupName(
"phiHbyA", phase.name()),
143 - phigFs[phase.index()]
144 - ddtCorrByAs[phase.index()]
153 if (!partialElimination)
155 PtrList<volVectorField> KdUByAs(
fluid.KdUByAs(
rAUs));
156 PtrList<surfaceScalarField> phiKdPhis(
fluid.phiKdPhis(
rAUs));
164 if (phiKdPhis.set(
phasei))
192 if (partialElimination)
194 PtrList<surfaceScalarField> phiKdPhis(
fluid.phiKdPhis(
rAUs));
198 if (phiKdPhis.set(
phasei))
229 surfaceScalarField::Boundary
phib(
phi.boundaryField());
235 alphafs[
phasei].boundaryField()*phase.phi()().boundaryField();
240 p_rgh.boundaryFieldRef(),
243 )/(
mesh.magSf().boundaryField()*
rAUf.boundaryField())
248 PtrList<fvScalarMatrix> pEqnComps(
phases.size());
249 PtrList<volScalarField> dmdts(
fluid.dmdts());
256 if (phase.compressible())
262 IOobject::groupName(
"phid", phase.name()),
290 pEqnComps[
phasei].relax();
317 if (pEqnComps.set(
phasei))
334 if (pEqnComps.set(
phasei))
353 while (
pimple.correctNonOrthogonal())
367 if (pEqnComps.set(
phasei))
369 pEqn += pEqnComps[
phasei];
377 if (
pimple.finalNonOrthogonalIter())
385 phaseModel& phase =
fluid.movingPhases()[movingPhasei];
392 if (pEqnComps.set(phase.index()))
394 phase.divU(-pEqnComps[phase.index()] &
p_rgh);
401 mSfGradp = pEqnIncomp.flux()/
rAUf;
405 phaseModel& phase =
fluid.movingPhases()[movingPhasei];
412 - phigFs[phase.index()]
416 if (partialElimination)
423 phaseModel& phase =
fluid.movingPhases()[movingPhasei];
425 phase.URef().correctBoundaryConditions();
441 phase.thermoRef().rho() += phase.thermo().psi()*(
p_rgh -
p_rgh_0);
447 p_rgh.correctBoundaryConditions();
tmp< fvMatrix< Type > > correction(const fvMatrix< Type > &)
Return the correction form of the given matrix by subtracting the matrix multiplied by the current fi...
fvMatrix< scalar > fvScalarMatrix
multiphaseSystem::phaseModelList & phases
Info<< "Creating field kinetic energy K\"<< endl;volScalarField K("K", 0.5 *magSqr(U));if(U.nOldTimes()){ volVectorField *Uold=&U.oldTime();volScalarField *Kold=&K.oldTime();*Kold==0.5 *magSqr(*Uold);while(Uold->nOldTimes()) { Uold=&Uold-> oldTime()
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
const dimensionedScalar & pMin
tmp< surfaceScalarField > flux(const volVectorField &vvf)
Return the face-flux field obtained from the given volVectorField.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
forAll(U.boundaryField(), patchi)
tmp< GeometricField< Type, faPatchField, areaMesh > > div(const GeometricField< Type, faePatchField, edgeMesh > &ssf)
tmp< GeometricField< Type, faPatchField, areaMesh > > ddt(const dimensioned< Type > dt, const faMesh &mesh)
GeometricField< vector, fvPatchField, volMesh > volVectorField
PtrList< surfaceScalarField > alpharAUfs(phases.size())
surfaceScalarField phid("phid", fvc::interpolate(psi) *(fvc::flux(HbyA)+MRF.zeroFilter(rhorAUf *fvc::ddtCorr(rho, U, phi)/fvc::interpolate(rho))))
const surfaceScalarField & ghf
GeometricField< scalar, fvPatchField, volMesh > volScalarField
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
tmp< GeometricField< Type, faPatchField, areaMesh > > laplacian(const GeometricField< Type, faPatchField, areaMesh > &vf, const word &name)
PtrList< surfaceScalarField > phiFs(fluid.phiFs(rAUs))
tmp< volScalarField > byDt(const volScalarField &vf)
const uniformDimensionedVectorField & g
const dimensionSet dimForce
const dimensionSet dimDensity
PtrList< volVectorField > HbyAs(fluid.phases().size())
surfaceScalarField rAUf("rAUf", fvc::interpolate(rAU))
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh >> reconstruct(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
PtrList< volScalarField > rAUs
surfaceScalarField ghSnGradRho(ghf *fvc::snGrad(rho) *mesh.magSf())
PtrList< fvVectorMatrix > UEqns(fluid.phases().size())
PtrList< surfaceScalarField > alphafs(phases.size())
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
setSnGrad< fixedFluxPressureFvPatchScalarField >(p_rgh.boundaryFieldRef(),(phiHbyA.boundaryField() - MRF.relative(phib))/(mesh.magSf().boundaryField() *rAUf.boundaryField()))
const volScalarField & gh
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
volScalarField p_rgh_0(p_rgh)
PtrList< surfaceScalarField > phiHbyAs(fluid.phases().size())
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
const dimensionedScalar alpha
Fine-structure constant: default SI units: [].
tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > snGrad(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
const dimensionSet dimArea(sqr(dimLength))
static constexpr const zero Zero
Global zero (0)
const dimensionSet dimVelocity