34 lines
772 B
C
34 lines
772 B
C
{
|
|
volScalarField rUA("rUA", 1.0/UEqn.A());
|
|
surfaceScalarField rUAf("(1|A(U))", fvc::interpolate(rUA));
|
|
|
|
U = rUA*UEqn.H();
|
|
|
|
surfaceScalarField phiU
|
|
(
|
|
(fvc::interpolate(U) & mesh.Sf())
|
|
+ fvc::ddtPhiCorr(rUA, U, phi)
|
|
);
|
|
|
|
phi = phiU + rUAf*fvc::interpolate(rhok)*(g & mesh.Sf());
|
|
|
|
while (piso.correctNonOrthogonal())
|
|
{
|
|
fvScalarMatrix pEqn
|
|
(
|
|
fvm::laplacian(rUAf, p) == fvc::div(phi)
|
|
);
|
|
|
|
pEqn.solve(mesh.solutionDict().solver(p.select(piso.finalInnerIter())));
|
|
|
|
if (piso.finalNonOrthogonalIter())
|
|
{
|
|
phi -= pEqn.flux();
|
|
}
|
|
}
|
|
|
|
U += rUA*fvc::reconstruct((phi - phiU)/rUAf);
|
|
U.correctBoundaryConditions();
|
|
|
|
#include "continuityErrs.H"
|
|
}
|