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())
67 phaseModel& phase =
fluid.movingPhases()[movingPhasei];
68 MRF.correctBoundaryFlux(phase.U(), phase.phiRef());
72 PtrList<surfaceScalarField> phigFs(
phases.size());
92 -
fluid.surfaceTension(phase)*
mesh.magSf()
105 PtrList<volVectorField> HbyAs(
phases.size());
106 PtrList<surfaceScalarField> phiHbyAs(
phases.size());
109 PtrList<surfaceScalarField> ddtCorrByAs(
fluid.ddtCorrByAs(
rAUs));
113 phaseModel& phase =
fluid.movingPhases()[movingPhasei];
121 IOobject::groupName(
"HbyA", phase.name()),
126 HbyAs[phase.index()] =
129 UEqns[phase.index()].H()
132 max(phase.residualAlpha() -
alpha, scalar(0))
143 IOobject::groupName(
"phiHbyA", phase.name()),
145 - phigFs[phase.index()]
146 - ddtCorrByAs[phase.index()]
155 PtrList<volVectorField> KdUByAs(
fluid.KdUByAs(
rAUs));
156 PtrList<surfaceScalarField> phiKdPhis(
fluid.phiKdPhis(
rAUs));
165 if (phiKdPhis.set(
phasei))
215 surfaceScalarField::Boundary phib(
phi.boundaryField());
221 alphafs[
phasei].boundaryField()*phase.phi()().boundaryField();
224 setSnGrad<fixedFluxPressureFvPatchScalarField>
226 p_rgh.boundaryFieldRef(),
229 )/(
mesh.magSf().boundaryField()*rAUf.boundaryField())
234 PtrList<fvScalarMatrix> pEqnComps(
phases.size());
235 PtrList<volScalarField> dmdts(
fluid.dmdts());
246 if (!phase.isochoric() || !phase.pure())
256 if (!phase.incompressible())
262 IOobject::groupName(
"phid", phase.name()),
271 phase.thermo().psi()*
fvm::ddt(p_rgh)
277 pEqnComps[
phasei].relax();
282 (alpha*phase.thermo().psi()/
rho)
288 if (
fvOptions.appliesToField(rho.name()))
304 while (
pimple.correctNonOrthogonal())
319 pEqn += pEqnComps[
phasei];
322 if (
fluid.incompressible())
331 if (
pimple.finalNonOrthogonalIter())
339 phaseModel& phase =
fluid.movingPhases()[movingPhasei];
342 phiHbyAs[phase.index()]
346 phase.divU(-pEqnComps[phase.index()] &
p_rgh);
352 mSfGradp = pEqnIncomp.flux()/
rAUf;
356 phaseModel& phase =
fluid.movingPhases()[movingPhasei];
363 - phigFs[phase.index()]
367 if (partialElimination)
375 phaseModel& phase =
fluid.movingPhases()[movingPhasei];
376 MRF.makeRelative(phase.phiRef());
382 phaseModel& phase =
fluid.movingPhases()[movingPhasei];
384 phase.URef().correctBoundaryConditions();
394 if (p_rgh.needReference() &&
fluid.incompressible())
411 phase.thermoRef().rho() += phase.thermo().psi()*(p_rgh -
p_rgh_0);
417 p_rgh.correctBoundaryConditions();
tmp< fvMatrix< Type > > correction(const fvMatrix< Type > &)
Return the correction form of the given matrix.
fvMatrix< scalar > fvScalarMatrix
Info<< "Constructing momentum equations"<< endl;PtrList< fvVectorMatrix > UEqns(phases.size())
pimpleNoLoopControl & pimple
surfaceScalarField rAUf("rAUf", fvc::interpolate(rAU))
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
PtrList< surfaceScalarField > alphafs(phases.size())
volScalarField p_rgh_0(p_rgh)
tmp< GeometricField< Type, fvPatchField, volMesh > > div(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
GeometricField< vector, fvPatchField, volMesh > volVectorField
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.
tmp< GeometricField< Type, fvPatchField, volMesh > > ddt(const dimensioned< Type > dt, const fvMesh &mesh)
GeometricField< scalar, fvPatchField, volMesh > volScalarField
const dimensionSet dimVolume(pow3(dimLength))
PtrList< surfaceScalarField > phiFs(fluid.phiFs(rAUs))
Info<< "Reading field p_rgh\"<< endl;volScalarField p_rgh(IOobject("p_rgh", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE), mesh);label pRefCell=0;scalar pRefValue=0.0;if(fluid.incompressible()){ p=max(p_rgh+fluid.rho() *gh, pMin);if(p_rgh.needReference()) { setRefCell(p, p_rgh, pimple.dict(), pRefCell, pRefValue);p+=dimensionedScalar("p", p.dimensions(), pRefValue - getRefCellValue(p, pRefCell));p_rgh=p - fluid.rho() *gh;}}mesh.setFluxRequired(p_rgh.name());PtrList< volScalarField > rAUs
PtrList< surfaceScalarField > alpharAUfs(phases.size())
dimensionedScalar pMin("pMin", dimPressure, fluid)
const dimensionSet dimForce
const surfaceScalarField & ghf
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.
const dimensionSet dimDensity
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.
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
phaseSystem::phaseModelList & phases
const volScalarField & gh
dimensioned< scalar > mag(const dimensioned< Type > &)
volScalarField alpha(IOobject("alpha", runTime.timeName(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
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)
const dimensionSet dimArea(sqr(dimLength))
const dimensionSet dimVelocity