ENH: autoLayerDriver: better layering information message
[OpenFOAM-2.0.x.git] / applications / solvers / incompressible / simpleFoam / pEqn.H
blob699cdcb3cf6589cb6da67d14f2f1aa596824d027
2     p.boundaryField().updateCoeffs();
4     volScalarField rAU(1.0/UEqn().A());
5     U = rAU*UEqn().H();
6     UEqn.clear();
8     phi = fvc::interpolate(U, "interpolate(HbyA)") & mesh.Sf();
9     adjustPhi(phi, U, p);
11     // Non-orthogonal pressure corrector loop
12     for (int nonOrth=0; nonOrth<=simple.nNonOrthCorr(); nonOrth++)
13     {
14         fvScalarMatrix pEqn
15         (
16             fvm::laplacian(rAU, p) == fvc::div(phi)
17         );
19         pEqn.setReference(pRefCell, pRefValue);
21         pEqn.solve();
23         if (nonOrth == simple.nNonOrthCorr())
24         {
25             phi -= pEqn.flux();
26         }
27     }
29     #include "continuityErrs.H"
31     // Explicitly relax pressure for momentum corrector
32     p.relax();
34     // Momentum corrector
35     U -= rAU*fvc::grad(p);
36     U.correctBoundaryConditions();