Files
openfoam/applications/solvers/multiphase/settlingFoam/pEqn.H
Mark Olesen 909e6b27e4 Apply coding style recommendations:
- space between keyword and bracket in 'for(..)', 'if(..)', 'while(..)'
2009-11-30 08:55:03 +01:00

41 lines
808 B
C

volScalarField rUA = 1.0/UEqn.A();
surfaceScalarField rUAf
(
"(rho*(1|A(U)))",
fvc::interpolate(rho)*fvc::interpolate(rUA)
);
U = rUA*UEqn.H();
phi =
fvc::interpolate(rho)
*(
(fvc::interpolate(U) & mesh.Sf())
+ fvc::ddtPhiCorr(rUA, rho, U, phi)
);
surfaceScalarField phiU("phiU", phi);
phi += fvc::interpolate(rho)*(g & mesh.Sf())*rUAf;
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
{
fvScalarMatrix pEqn
(
fvm::laplacian(rUAf, p) == fvc::ddt(rho) + fvc::div(phi)
);
pEqn.setReference(pRefCell, pRefValue);
pEqn.solve();
if (nonOrth == nNonOrthCorr)
{
phi -= pEqn.flux();
}
}
#include "rhoEqn.H"
#include "compressibleContinuityErrs.H"
U += rUA*fvc::reconstruct((phi - phiU)/rUAf);
U.correctBoundaryConditions();