1 if (pressureImplicitPorosity)
12 phi = fvc::interpolate(rho*U) & mesh.Sf();
13 bool closedVolume = adjustPhi(phi, U, p);
15 for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
17 tmp<fvScalarMatrix> tpEqn;
19 if (pressureImplicitPorosity)
21 tpEqn = (fvm::laplacian(rho*trTU(), p) == fvc::div(phi));
25 tpEqn = (fvm::laplacian(rho*trAU(), p) == fvc::div(phi));
28 tpEqn().setReference(pRefCell, pRefValue);
29 // retain the residual from the first iteration
32 eqnResidual = tpEqn().solve().initialResidual();
33 maxResidual = max(eqnResidual, maxResidual);
40 if (nonOrth == nNonOrthCorr)
42 phi -= tpEqn().flux();
46 #include "incompressible/continuityErrs.H"
48 // Explicitly relax pressure for momentum corrector
51 if (pressureImplicitPorosity)
53 U -= trTU()&fvc::grad(p);
57 U -= trAU()*fvc::grad(p);
60 U.correctBoundaryConditions();
64 // For closed-volume cases adjust the pressure and density levels
65 // to obey overall mass continuity
68 p += (initialMass - fvc::domainIntegrate(psi*p))
69 /fvc::domainIntegrate(psi);
74 Info<< "rho max/min : " << max(rho).value() << " " << min(rho).value() << endl;