3 volScalarField rUA = 1.0/UEqn().A();
7 bool closedVolume = false;
11 surfaceScalarField phid
14 fvc::interpolate(psi)*(fvc::interpolate(U) & mesh.Sf())
17 for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
22 - fvm::laplacian(rho*rUA, p)
25 // Relax the pressure equation to ensure diagonal-dominance
26 pEqn.relax(mesh.relaxationFactor("pEqn"));
28 pEqn.setReference(pRefCell, pRefValue);
30 // retain the residual from the first iteration
33 eqnResidual = pEqn.solve().initialResidual();
34 maxResidual = max(eqnResidual, maxResidual);
41 if (nonOrth == nNonOrthCorr)
49 phi = fvc::interpolate(rho)*(fvc::interpolate(U) & mesh.Sf());
50 closedVolume = adjustPhi(phi, U, p);
52 for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
56 fvm::laplacian(rho*rUA, p) == fvc::div(phi)
59 pEqn.setReference(pRefCell, pRefValue);
61 // Retain the residual from the first iteration
64 eqnResidual = pEqn.solve().initialResidual();
65 maxResidual = max(eqnResidual, maxResidual);
72 if (nonOrth == nNonOrthCorr)
80 #include "incompressible/continuityErrs.H"
82 // Explicitly relax pressure for momentum corrector
87 Info<< "rho max/min : " << max(rho).value() << " " << min(rho).value() << endl;
89 U -= rUA*fvc::grad(p);
90 U.correctBoundaryConditions();
94 // For closed-volume cases adjust the pressure and density levels
95 // to obey overall mass continuity
98 p += (initialMass - fvc::domainIntegrate(psi*p))
99 /fvc::domainIntegrate(psi);