Removed unnecessary return statement
[foam-extend-3.2.git] / applications / solvers / incompressible / pimpleFoam / pEqn.H
blob3a750deb8675a9cdea67cefa71e7ebeb40f1459a
1 U = rUA*UEqn().H();
3 if (nCorr <= 1)
5     UEqn.clear();
8 phi = (fvc::interpolate(U) & mesh.Sf())
9     + fvc::ddtPhiCorr(rUA, U, phi);
11 adjustPhi(phi, U, p);
13 // Non-orthogonal pressure corrector loop
14 for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
16     // Pressure corrector
17     fvScalarMatrix pEqn
18     (
19         fvm::laplacian(rUA, p) == fvc::div(phi)
20     );
22     pEqn.setReference(pRefCell, pRefValue);
24     if
25     (
26         oCorr == nOuterCorr - 1
27      && corr == nCorr - 1
28      && nonOrth == nNonOrthCorr
29     )
30     {
31         pEqn.solve(mesh.solutionDict().solver("pFinal"));
32     }
33     else
34     {
35         pEqn.solve();
36     }
38     if (nonOrth == nNonOrthCorr)
39     {
40         phi -= pEqn.flux();
41     }
44 #include "continuityErrs.H"
46 // Explicitly relax pressure for momentum corrector except for last corrector
47 if (oCorr != nOuterCorr-1)
49     p.relax();
52 U -= rUA*fvc::grad(p);
53 U.correctBoundaryConditions();