Transferred copyright to the OpenFOAM Foundation
[OpenFOAM-2.0.x.git] / applications / solvers / multiphase / multiphaseInterFoam / pEqn.H
blob78bfc89bb471efbbc2709bb67ab3f3dd8a8b55e9
2     volScalarField rAU(1.0/UEqn.A());
3     surfaceScalarField rAUf(fvc::interpolate(rAU));
5     U = rAU*UEqn.H();
7     surfaceScalarField phiU
8     (
9         "phiU",
10         (fvc::interpolate(U) & mesh.Sf())
11       + fvc::ddtPhiCorr(rAU, rho, U, phi)
12     );
14     adjustPhi(phiU, U, p_rgh);
16     phi = phiU +
17     (
18         mixture.surfaceTensionForce()
19       - ghf*fvc::snGrad(rho)
20     )*rAUf*mesh.magSf();
22     for (int nonOrth=0; nonOrth<=pimple.nNonOrthCorr(); nonOrth++)
23     {
24         fvScalarMatrix p_rghEqn
25         (
26             fvm::laplacian(rAUf, p_rgh) == fvc::div(phi)
27         );
29         p_rghEqn.setReference(pRefCell, getRefCellValue(p_rgh, pRefCell));
31         p_rghEqn.solve
32         (
33             mesh.solver(p_rgh.select(pimple.finalInnerIter(corr, nonOrth)))
34         );
36         if (nonOrth == pimple.nNonOrthCorr())
37         {
38             phi -= p_rghEqn.flux();
39         }
40     }
42     U += rAU*fvc::reconstruct((phi - phiU)/rAUf);
43     U.correctBoundaryConditions();
45     #include "continuityErrs.H"
47     p == p_rgh + rho*gh;
49     if (p_rgh.needReference())
50     {
51         p += dimensionedScalar
52         (
53             "p",
54             p.dimensions(),
55             pRefValue - getRefCellValue(p, pRefCell)
56         );
57         p_rgh = p - rho*gh;
58     }