Fixing indentation in applications/solvers/solidMechanics
[foam-extend-3.2.git] / applications / solvers / multiphase / settlingFoam / pEqn.H
blob65b954c6da84e1fe6b98ee5a99f295f7a14ff324
1 volScalarField rUA = 1.0/UEqn.A();
3 surfaceScalarField rUAf
5     "(rho*(1|A(U)))",
6     fvc::interpolate(rho)*fvc::interpolate(rUA)
7 );
9 U = rUA*UEqn.H();
10 phi =
11     fvc::interpolate(rho)
12    *(
13        (fvc::interpolate(U) & mesh.Sf())
14      + fvc::ddtPhiCorr(rUA, rho, U, phi)
15     );
17 surfaceScalarField phiU("phiU", phi);
18 phi -= ghf*fvc::snGrad(rho)*rUAf*mesh.magSf();
20 for(int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
22     fvScalarMatrix pEqn
23     (
24         fvm::laplacian(rUAf, p) == fvc::ddt(rho) + fvc::div(phi)
25     );
27     pEqn.setReference(pRefCell, pRefValue);
28     pEqn.solve();
30     if (nonOrth == nNonOrthCorr)
31     {
32         phi -= pEqn.flux();
33     }
36 #include "rhoEqn.H"
37 #include "compressibleContinuityErrs.H"
39 U += rUA*fvc::reconstruct((phi - phiU)/rUAf);
40 U.correctBoundaryConditions();