2 rho = max(rho, rhoMin);
3 rho = min(rho, rhoMax);
6 volScalarField rAU(1.0/UEqn().A());
10 bool closedVolume = false;
12 if (simple.transonic())
14 surfaceScalarField phid
17 fvc::interpolate(psi)*(fvc::interpolate(U) & mesh.Sf())
20 for (int nonOrth=0; nonOrth<=simple.nNonOrthCorr(); nonOrth++)
25 - fvm::laplacian(rho*rAU, p)
28 // Relax the pressure equation to ensure diagonal-dominance
29 pEqn.relax(mesh.relaxationFactor("pEqn"));
31 pEqn.setReference(pRefCell, pRefValue);
35 if (nonOrth == simple.nNonOrthCorr())
43 phi = fvc::interpolate(rho)*(fvc::interpolate(U) & mesh.Sf());
44 closedVolume = adjustPhi(phi, U, p);
46 for (int nonOrth=0; nonOrth<=simple.nNonOrthCorr(); nonOrth++)
50 fvm::laplacian(rho*rAU, p) == fvc::div(phi)
53 pEqn.setReference(pRefCell, pRefValue);
57 if (nonOrth == simple.nNonOrthCorr())
65 #include "incompressible/continuityErrs.H"
67 // Explicitly relax pressure for momentum corrector
70 U -= rAU*fvc::grad(p);
71 U.correctBoundaryConditions();
73 // For closed-volume cases adjust the pressure and density levels
74 // to obey overall mass continuity
77 p += (initialMass - fvc::domainIntegrate(psi*p))
78 /fvc::domainIntegrate(psi);
82 rho = max(rho, rhoMin);
83 rho = min(rho, rhoMax);
85 Info<< "rho max/min : " << max(rho).value() << " " << min(rho).value() << endl;