initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / applications / solvers / compressible / sonicFoam / pEqn.H
blob96a500d4c2644a1af8220d012f1888f67a297b2c
1 rho = thermo.rho();
3 volScalarField rUA = 1.0/UEqn.A();
4 U = rUA*UEqn.H();
6 surfaceScalarField phid
8     "phid",
9     fvc::interpolate(psi)
10    *(
11         (fvc::interpolate(U) & mesh.Sf())
12       + fvc::ddtPhiCorr(rUA, rho, U, phi)
13     )
16 for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
18     fvScalarMatrix pEqn
19     (
20         fvm::ddt(psi, p)
21       + fvm::div(phid, p)
22       - fvm::laplacian(rho*rUA, p)
23     );
25     pEqn.solve();
27     if (nonOrth == nNonOrthCorr)
28     {
29         phi = pEqn.flux();
30     }
33 #include "rhoEqn.H"
34 #include "compressibleContinuityErrs.H"
36 U -= rUA*fvc::grad(p);
37 U.correctBoundaryConditions();