2 if (pimple.nOuterCorr() == 1)
8 - ((gamma*psiv + (1.0 - gamma)*psil) - psi)*pSat
12 surfaceScalarField rhof(fvc::interpolate(rho, "rhof"));
14 volScalarField rAU(1.0/UEqn.A());
15 surfaceScalarField rAUf("rAUf", rhof*fvc::interpolate(rAU));
16 volVectorField HbyA(rAU*UEqn.H());
18 phiv = (fvc::interpolate(HbyA) & mesh.Sf())
19 + fvc::ddtPhiCorr(rAU, rho, U, phiv);
21 p.boundaryField().updateCoeffs();
23 surfaceScalarField phiGradp(rAUf*mesh.magSf()*fvc::snGrad(p));
25 phiv -= phiGradp/rhof;
27 #include "resetPhivPatches.H"
29 for (int nonOrth=0; nonOrth<=pimple.nNonOrthCorr(); nonOrth++)
34 - (rhol0 + (psil - psiv)*pSat)*fvc::ddt(gamma) - pSat*fvc::ddt(psi)
37 - fvm::laplacian(rAUf, p)
42 mesh.solver(p.select(pimple.finalInnerIter(corr, nonOrth)))
45 if (nonOrth == pimple.nNonOrthCorr())
47 phiv += (phiGradp + pEqn.flux())/rhof;
51 Info<< "Predicted p max-min : " << max(p).value()
52 << " " << min(p).value() << endl;
58 + ((gamma*psiv + (1.0 - gamma)*psil) - psi)*pSat,
68 - ((gamma*psiv + (1.0 - gamma)*psil) - psi)*pSat
71 p.correctBoundaryConditions();
73 Info<< "Phase-change corrected p max-min : " << max(p).value()
74 << " " << min(p).value() << endl;
78 U = HbyA - rAU*fvc::grad(p);
80 // Remove the swirl component of velocity for "wedge" cases
81 if (pimple.dict().found("removeSwirl"))
83 label swirlCmpt(readLabel(pimple.dict().lookup("removeSwirl")));
85 Info<< "Removing swirl component-" << swirlCmpt << " of U" << endl;
86 U.field().replace(swirlCmpt, 0.0);
89 U.correctBoundaryConditions();
91 Info<< "max(U) " << max(mag(U)).value() << endl;