Removed unnecessary return statement
[foam-extend-3.2.git] / applications / solvers / multiphase / twoLiquidMixingFoam / p_rghEqn.H
blobfb365373016efa1f49755f036ddad518c9c6b889
2     volScalarField rUA = 1.0/UEqn.A();
3     surfaceScalarField rUAf = fvc::interpolate(rUA);
5     U = rUA*UEqn.H();
7     surfaceScalarField phiU
8     (
9         "phiU",
10         (fvc::interpolate(U) & mesh.Sf())
11       + fvc::ddtPhiCorr(rUA, rho, U, phi)
12     );
14     phi = phiU - ghf*fvc::snGrad(rho)*rUAf*mesh.magSf();
16     for(int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
17     {
18         fvScalarMatrix p_rghEqn
19         (
20             fvm::laplacian(rUAf, p_rgh) == fvc::div(phi)
21         );
23         p_rghEqn.setReference(p_rghRefCell, p_rghRefValue);
25         p_rghEqn.solve
26         (
27             mesh.solutionDict().solver
28             (
29                 p_rgh.name()
30               + ((corr == nCorr - 1 && nonOrth == nNonOrthCorr) ? "Final" : "")
31             )
32         );
34         if (nonOrth == nNonOrthCorr)
35         {
36             phi -= p_rghEqn.flux();
37         }
38     }
40     p == p_rgh + rho*gh;
42     if (p_rgh.needReference())
43     {
44         p += dimensionedScalar
45         (
46             "p",
47             p.dimensions(),
48             pRefValue - getRefCellValue(p, p_rghRefCell)
49         );
50     }
52     #include "continuityErrs.H"
54     U += rUA*fvc::reconstruct((phi - phiU)/rUAf);
55     U.correctBoundaryConditions();