3 rho = max(rho, rhoMin[i]);
4 rho = min(rho, rhoMax[i]);
7 volScalarField rAU(1.0/UEqn().A());
8 surfaceScalarField rhorAUf("(rho*(1|A(U)))", fvc::interpolate(rho*rAU));
13 phi = fvc::interpolate(rho)*(fvc::interpolate(U) & mesh.Sf());
14 bool closedVolume = adjustPhi(phi, U, p_rgh);
15 dimensionedScalar compressibility = fvc::domainIntegrate(psi);
16 bool compressible = (compressibility.value() > SMALL);
18 surfaceScalarField buoyancyPhi(rhorAUf*ghf*fvc::snGrad(rho)*mesh.magSf());
22 for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
24 fvScalarMatrix p_rghEqn
26 fvm::laplacian(rhorAUf, p_rgh) == fvc::div(phi)
32 compressible ? getRefCellValue(p_rgh, pRefCell) : pRefValue
37 if (nonOrth == nNonOrthCorr)
39 // Calculate the conservative fluxes
40 phi -= p_rghEqn.flux();
42 // Explicitly relax pressure for momentum corrector
45 // Correct the momentum source with the pressure gradient flux
46 // calculated from the relaxed pressure
47 U -= rAU*fvc::reconstruct((buoyancyPhi + p_rghEqn.flux())/rhorAUf);
48 U.correctBoundaryConditions();
54 #include "continuityErrs.H"
56 // For closed-volume cases adjust the pressure level
57 // to obey overall mass continuity
58 if (closedVolume && compressible)
60 p += (initialMass - fvc::domainIntegrate(thermo.rho()))
66 rho = max(rho, rhoMin[i]);
67 rho = min(rho, rhoMax[i]);
70 Info<< "Min/max rho:" << min(rho).value() << ' '
71 << max(rho).value() << endl;
73 // Update thermal conductivity
74 K = thermo.Cp()*turb.alphaEff();