4 // Thermodynamic density needs to be updated by psi*d(p) after the
5 // pressure solution - done in 2 parts. Part 1:
6 thermo.rho() -= psi*p_rgh;
8 volScalarField rAU(1.0/UEqn.A());
9 surfaceScalarField rhorAUf("(rho*(1|A(U)))", fvc::interpolate(rho*rAU));
13 phi = fvc::interpolate(rho)*
15 (fvc::interpolate(U) & mesh.Sf())
16 + fvc::ddtPhiCorr(rAU, rho, U, phi)
19 surfaceScalarField buoyancyPhi(-rhorAUf*ghf*fvc::snGrad(rho)*mesh.magSf());
22 fvScalarMatrix p_rghDDtEqn
24 fvc::ddt(rho) + psi*correction(fvm::ddt(p_rgh))
28 for (int nonOrth=0; nonOrth<=pimple.nNonOrthCorr(); nonOrth++)
30 fvScalarMatrix p_rghEqn
33 - fvm::laplacian(rhorAUf, p_rgh)
38 mesh.solver(p_rgh.select(pimple.finalInnerIter(corr, nonOrth)))
41 if (nonOrth == pimple.nNonOrthCorr())
43 // Calculate the conservative fluxes
44 phi += p_rghEqn.flux();
46 // Explicitly relax pressure for momentum corrector
49 // Correct the momentum source with the pressure gradient flux
50 // calculated from the relaxed pressure
51 U += rAU*fvc::reconstruct((buoyancyPhi + p_rghEqn.flux())/rhorAUf);
52 U.correctBoundaryConditions();
58 // Second part of thermodynamic density update
59 thermo.rho() += psi*p_rgh;
61 DpDt = fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p);
64 #include "compressibleContinuityErrs.H"