initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / applications / solvers / heatTransfer / buoyantBoussinesqPisoFoam / pEqn.H
blobff0c26f05893f6e625e7a8a5193c2f6a08882bc5
2     volScalarField rUA("rUA", 1.0/UEqn.A());
3     surfaceScalarField rUAf("(1|A(U))", fvc::interpolate(rUA));
5     U = rUA*UEqn.H();
7     surfaceScalarField phiU
8     (
9         (fvc::interpolate(U) & mesh.Sf())
10       + fvc::ddtPhiCorr(rUA, U, phi)
11     );
13     phi = phiU + rUAf*fvc::interpolate(rhok)*(g & mesh.Sf());
15     for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
16     {
17         fvScalarMatrix pEqn
18         (
19             fvm::laplacian(rUAf, p) == fvc::div(phi)
20         );
22         if (corr == nCorr-1 && nonOrth == nNonOrthCorr)
23         {
24             pEqn.solve(mesh.solver(p.name() + "Final"));
25         }
26         else
27         {
28             pEqn.solve(mesh.solver(p.name()));
29         }
31         if (nonOrth == nNonOrthCorr)
32         {
33             phi -= pEqn.flux();
34         }
35     }
37     U += rUA*fvc::reconstruct((phi - phiU)/rUAf);
38     U.correctBoundaryConditions();
40     #include "continuityErrs.H"