ENH: autoLayerDriver: better layering information message
[OpenFOAM-2.0.x.git] / applications / solvers / multiphase / settlingFoam / pEqn.H
blob7b62411d2d17344bf88d1014cbc5e2a05b98803c
1 volScalarField rAU(1.0/UEqn.A());
3 surfaceScalarField rAUf
5     "(rho*(1|A(U)))",
6     fvc::interpolate(rho)*fvc::interpolate(rAU)
7 );
9 U = rAU*UEqn.H();
10 phi =
11     fvc::interpolate(rho)
12    *(
13        (fvc::interpolate(U) & mesh.Sf())
14      + fvc::ddtPhiCorr(rAU, rho, U, phi)
15     );
17 surfaceScalarField phiU("phiU", phi);
18 phi -= ghf*fvc::snGrad(rho)*rAUf*mesh.magSf();
20 for (int nonOrth=0; nonOrth<=pimple.nNonOrthCorr(); nonOrth++)
22     fvScalarMatrix p_rghEqn
23     (
24         fvm::laplacian(rAUf, p_rgh) == fvc::ddt(rho) + fvc::div(phi)
25     );
27     p_rghEqn.setReference(pRefCell, getRefCellValue(p_rgh, pRefCell));
28     p_rghEqn.solve();
30     if (nonOrth == pimple.nNonOrthCorr())
31     {
32         phi -= p_rghEqn.flux();
33     }
36 p == p_rgh + rho*gh;
38 if (p_rgh.needReference())
40     p += dimensionedScalar
41     (
42         "p",
43         p.dimensions(),
44         pRefValue - getRefCellValue(p, pRefCell)
45     );
46     p_rgh = p - rho*gh;
49 #include "rhoEqn.H"
50 #include "compressibleContinuityErrs.H"
52 U += rAU*fvc::reconstruct((phi - phiU)/rAUf);
53 U.correctBoundaryConditions();