18 phaseModel& phase =
fluid.movingPhases()[movingPhasei];
26 IOobject::groupName(
"rAU", phase.name()),
29 UEqns[phase.index()].A()
30 +
byDt(
max(phase.residualAlpha() -
alpha, scalar(0))*phase.rho())
65 fluid.correctBoundaryFlux();
68 PtrList<surfaceScalarField> phigFs(
phases.size());
88 -
fluid.surfaceTension(phase)*
mesh.magSf()
101 PtrList<volVectorField> HbyAs(
phases.size());
102 PtrList<surfaceScalarField> phiHbyAs(
phases.size());
105 PtrList<surfaceScalarField> ddtCorrByAs(
fluid.ddtCorrByAs(
rAUs));
109 phaseModel& phase =
fluid.movingPhases()[movingPhasei];
119 UEqns[phase.index()].H()
122 max(phase.residualAlpha() -
alpha, scalar(0))
137 IOobject::groupName(
"phiHbyA", phase.name()),
139 - phigFs[phase.index()]
140 - ddtCorrByAs[phase.index()]
149 PtrList<volVectorField> KdUByAs(
fluid.KdUByAs(
rAUs));
150 PtrList<surfaceScalarField> phiKdPhis(
fluid.phiKdPhis(
rAUs));
159 if (phiKdPhis.set(
phasei))
210 surfaceScalarField::Boundary phib
212 surfaceScalarField::Internal::null(),
221 alphafs[
phasei].boundaryField()*phase.phi()().boundaryField();
224 setSnGrad<fixedFluxPressureFvPatchScalarField>
226 p_rgh.boundaryFieldRef(),
229 )/(
mesh.magSf().boundaryField()*rAUf.boundaryField())
240 while (
pimple.correctNonOrthogonal())
258 if (
fluid.incompressible())
271 if (
pimple.finalNonOrthogonalIter())
279 phaseModel& phase =
fluid.movingPhases()[movingPhasei];
282 phiHbyAs[phase.index()]
292 mSfGradp = pEqnIncomp.flux()/
rAUf;
296 phaseModel& phase =
fluid.movingPhases()[movingPhasei];
303 - phigFs[phase.index()]
307 if (partialElimination)
315 phaseModel& phase =
fluid.movingPhases()[movingPhasei];
317 MRF.makeRelative(phase.phiRef());
324 phaseModel& phase =
fluid.movingPhases()[movingPhasei];
326 phase.URef().correctBoundaryConditions();
338 if (p_rgh.needReference() &&
fluid.incompressible())
356 phase.thermoRef().rho() += phase.thermo().psi()*(p_rgh -
p_rgh_0);
362 p_rgh.correctBoundaryConditions();
pressureReference & pressureReference
fvMatrix< scalar > fvScalarMatrix
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
pimpleNoLoopControl & pimple
mixture MRF().makeRelative(phiHbyA)
PtrList< surfaceScalarField > alphafs(phases.size())
tmp< GeometricField< Type, fvPatchField, volMesh > > div(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
volScalarField alpha(IOobject("alpha", runTime.timeName(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
MRF makeRelative(fvc::interpolate(rho), phiHbyA)
tmp< GeometricField< Type, fvPatchField, volMesh > > laplacian(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
scalar getRefCellValue(const volScalarField &field, const label refCelli)
Return the current value of field in the reference cell.
PtrList< fvScalarMatrix > pEqnComps(phases.size())
GeometricField< scalar, fvPatchField, volMesh > volScalarField
const dimensionSet dimTime
PtrList< surfaceScalarField > phiFs(fluid.phiFs(rAUs))
Foam::fvConstraints & fvConstraints
volScalarField p_rgh_0(p_rgh)
Info<< "Reading field p_rgh\"<< endl;volScalarField p_rgh(IOobject("p_rgh", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE), mesh);if(fluid.found("pMin")){ IOWarningInFunction(fluid)<< "Pressure limits, pMin and pMax, are now read from "<< pimple.dict().name()<< endl;}pressureReference pressureReference(p, p_rgh, pimple.dict(), fluid.incompressible());if(fluid.incompressible()){ p=p_rgh+fluid.rho() *gh;}if(p_rgh.needReference() &&fluid.incompressible()){ p+=dimensionedScalar("p", p.dimensions(), pressureReference.refValue() - getRefCellValue(p, pressureReference.refCell()));}p_rgh=p - fluid.rho() *gh;mesh.schemes().setFluxRequired(p_rgh.name());PtrList< volScalarField > rAUs
const dimensionSet dimFlux
const dimensionSet dimDensity
tmp< volVectorField > constrainHbyA(const tmp< volVectorField > &tHbyA, const volVectorField &U, const volScalarField &p)
const dimensionSet dimForce
PtrList< surfaceScalarField > alpharAUfs(phases.size())
const surfaceScalarField & ghf
const dimensionSet dimVelocity
word name(const complex &)
Return a string representation of a complex.
tmp< volScalarField > byDt(const volScalarField &vf)
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.
bool constrain(fvMatrix< Type > &eqn) const
Apply constraints to an equation.
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh >> reconstruct(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
phaseSystem::phaseModelList & phases
const volScalarField & gh
dimensioned< scalar > mag(const dimensioned< Type > &)
surfaceScalarField rAUf("rAUf", fvc::interpolate(rAU))
tmp< surfaceScalarField > flux(const volVectorField &vvf)
Return the face-flux field obtained from the given volVectorField.
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
const dimensionedVector & g
tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > snGrad(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)