2 volScalarField rUA("rUA", 1.0/UEqn().A());
3 surfaceScalarField rUAf("(1|A(U))", fvc::interpolate(rUA));
8 phi = fvc::interpolate(U) & mesh.Sf();
11 surfaceScalarField buoyancyPhi =
12 rUAf*fvc::interpolate(rhok)*(g & mesh.Sf());
15 for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
19 fvm::laplacian(rUAf, p) == fvc::div(phi)
22 pEqn.setReference(pRefCell, pRefValue);
24 // retain the residual from the first iteration
27 eqnResidual = pEqn.solve().initialResidual();
28 maxResidual = max(eqnResidual, maxResidual);
35 if (nonOrth == nNonOrthCorr)
37 // Calculate the conservative fluxes
40 // Explicitly relax pressure for momentum corrector
43 // Correct the momentum source with the pressure gradient flux
44 // calculated from the relaxed pressure
45 U += rUA*fvc::reconstruct((buoyancyPhi - pEqn.flux())/rUAf);
46 U.correctBoundaryConditions();
50 #include "continuityErrs.H"