{
# include "continuityErrs.H"
wordList pcorrTypes
(
p.boundaryField().size(),
zeroGradientFvPatchScalarField::typeName
);
for (label i=0; i<p.boundaryField().size(); i++)
if (p.boundaryField()[i].fixesValue())
pcorrTypes[i] = fixedValueFvPatchScalarField::typeName;
}
volScalarField pcorr
IOobject
"pcorr",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE
),
dimensionedScalar("pcorr", p.dimensions(), 0.0),
pcorrTypes
// Initialise flux with interpolated velocity
phi = fvc::interpolate(U) & mesh.Sf();
adjustPhi(phi, U, pcorr);
mesh.schemesDict().setFluxRequired(pcorr.name());
while (pimple.correctNonOrthogonal())
fvScalarMatrix pcorrEqn
fvm::laplacian(1/aU, pcorr) == fvc::div(phi)
pcorrEqn.setReference(pRefCell, pRefValue);
pcorrEqn.solve();
if (pimple.finalNonOrthogonalIter())
phi -= pcorrEqn.flux();
// Fluxes are corrected to absolute velocity and further corrected
// later. HJ, 6/Feb/2009