db7fac3f24
git-svn-id: https://openfoam-extend.svn.sourceforge.net/svnroot/openfoam-extend/trunk/Core/OpenFOAM-1.5-dev@1731 e4e07f05-0c2f-0410-a05a-b8ba57e0c909
40 lines
826 B
C
40 lines
826 B
C
{
|
|
# include "continuityErrs.H"
|
|
|
|
volScalarField pcorr
|
|
(
|
|
IOobject
|
|
(
|
|
"pcorr",
|
|
runTime.timeName(),
|
|
mesh,
|
|
IOobject::NO_READ,
|
|
IOobject::NO_WRITE
|
|
),
|
|
mesh,
|
|
dimensionedScalar("pcorr", pd.dimensions(), 0.0),
|
|
pcorrTypes
|
|
);
|
|
|
|
dimensionedScalar rAUf("(1|A(U))", dimTime/rho.dimensions(), 1.0);
|
|
|
|
adjustPhi(phi, U, pcorr);
|
|
|
|
for(int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
|
{
|
|
fvScalarMatrix pcorrEqn
|
|
(
|
|
fvm::laplacian(rAUf, pcorr) == fvc::div(phi)
|
|
);
|
|
|
|
pcorrEqn.setReference(pdRefCell, pdRefValue);
|
|
pcorrEqn.solve();
|
|
|
|
if (nonOrth == nNonOrthCorr)
|
|
{
|
|
phi -= pcorrEqn.flux();
|
|
}
|
|
}
|
|
|
|
# include "continuityErrs.H"
|
|
}
|