8 - ((gamma*psiv + (1.0 - gamma)*psil) - psi)*pSat
12 surfaceScalarField rhof = fvc::interpolate(rho, "rhof");
14 volScalarField rUA = 1.0/UEqn.A();
15 surfaceScalarField rUAf("rUAf", rhof*fvc::interpolate(rUA));
16 volVectorField HbyA = rUA*UEqn.H();
18 phiv = (fvc::interpolate(HbyA) & mesh.Sf())
19 + fvc::ddtPhiCorr(rUA, rho, U, phiv);
21 p.boundaryField().updateCoeffs();
23 surfaceScalarField phiGradp = rUAf*mesh.magSf()*fvc::snGrad(p);
25 phiv -= phiGradp/rhof;
27 # include "resetPhivPatches.H"
29 for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
34 - (rhol0 + (psil - psiv)*pSat)*fvc::ddt(gamma) - pSat*fvc::ddt(psi)
37 - fvm::laplacian(rUAf, p)
40 if (corr == nCorr - 1 && nonOrth == nNonOrthCorr)
42 pEqn.solve(mesh.solutionDict().solver(p.name() + "Final"));
46 pEqn.solve(mesh.solutionDict().solver(p.name()));
49 if (nonOrth == nNonOrthCorr)
51 phiv += (phiGradp + pEqn.flux())/rhof;
55 Info<< "Predicted p max-min : " << max(p).value()
56 << " " << min(p).value() << endl;
62 + ((gamma*psiv + (1.0 - gamma)*psil) - psi)*pSat,
66 # include "gammaPsi.H"
72 - ((gamma*psiv + (1.0 - gamma)*psil) - psi)*pSat
75 p.correctBoundaryConditions();
77 Info<< "Phase-change corrected p max-min : " << max(p).value()
78 << " " << min(p).value() << endl;
82 U = HbyA - rUA*fvc::grad(p);
84 // Remove the swirl component of velocity for "wedge" cases
85 if (piso.found("removeSwirl"))
87 label swirlCmpt(readLabel(piso.lookup("removeSwirl")));
89 Info<< "Removing swirl component-" << swirlCmpt << " of U" << endl;
90 U.field().replace(swirlCmpt, 0.0);
93 U.correctBoundaryConditions();
95 Info<< "max(U) " << max(mag(U)).value() << endl;