1 bool closedVolume = false;
5 volScalarField rUA = 1.0/UEqn.A();
6 surfaceScalarField rhorUAf("(rho*(1|A(U)))", fvc::interpolate(rho*rUA));
9 surfaceScalarField phiU
13 (fvc::interpolate(U) & mesh.Sf())
14 + fvc::ddtPhiCorr(rUA, rho, U, phi)
18 phi = phiU + rhorUAf*fvc::interpolate(rho)*(g & mesh.Sf());
20 for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
22 surfaceScalarField rhorUAf = fvc::interpolate(rho*rUA);
28 - fvm::laplacian(rhorUAf, p)
31 closedVolume = p.needReference();
33 if (corr == nCorr-1 && nonOrth == nNonOrthCorr)
35 pEqn.solve(mesh.solver(p.name() + "Final"));
39 pEqn.solve(mesh.solver(p.name()));
42 if (nonOrth == nNonOrthCorr)
48 DpDt = fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p);
51 #include "compressibleContinuityErrs.H"
53 U += rUA*fvc::reconstruct((phi - phiU)/rhorUAf);
54 U.correctBoundaryConditions();
56 // For closed-volume cases adjust the pressure and density levels
57 // to obey overall mass continuity
61 (initialMass - fvc::domainIntegrate(thermo.psi()*p))
62 /fvc::domainIntegrate(thermo.psi());