5 volScalarField rAU(1.0/UEqn().A());
6 surfaceScalarField rhorAUf("(rho*(1|A(U)))", fvc::interpolate(rho*rAU));
11 phi = fvc::interpolate(rho)*(fvc::interpolate(U) & mesh.Sf());
12 bool closedVolume = adjustPhi(phi, U, p_rgh);
14 surfaceScalarField buoyancyPhi(rhorAUf*ghf*fvc::snGrad(rho)*mesh.magSf());
17 for (int nonOrth=0; nonOrth<=simple.nNonOrthCorr(); nonOrth++)
19 fvScalarMatrix p_rghEqn
21 fvm::laplacian(rhorAUf, p_rgh) == fvc::div(phi)
24 p_rghEqn.setReference(pRefCell, getRefCellValue(p_rgh, pRefCell));
27 if (nonOrth == simple.nNonOrthCorr())
29 // Calculate the conservative fluxes
30 phi -= p_rghEqn.flux();
32 // Explicitly relax pressure for momentum corrector
35 // Correct the momentum source with the pressure gradient flux
36 // calculated from the relaxed pressure
37 U -= rAU*fvc::reconstruct((buoyancyPhi + p_rghEqn.flux())/rhorAUf);
38 U.correctBoundaryConditions();
42 #include "continuityErrs.H"
46 // For closed-volume cases adjust the pressure level
47 // to obey overall mass continuity
50 p += (initialMass - fvc::domainIntegrate(psi*p))
51 /fvc::domainIntegrate(psi);
57 Info<< "rho max/min : " << max(rho).value() << " " << min(rho).value()