32 lines
726 B
C
32 lines
726 B
C
{
|
|
volScalarField pcorr("pcorr", p);
|
|
pcorr *= 0;
|
|
|
|
// 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
|
|
}
|
|
# include "continuityErrs.H"
|
|
}
|
|
|