initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / applications / solvers / multiphase / compressibleInterDyMFoam / correctPhi.H
blobd82a03edb59a2d419420700638404e6f90b197c8
2     #include "continuityErrs.H"
4     volScalarField pcorr
5     (
6         IOobject
7         (
8             "pcorr",
9             runTime.timeName(),
10             mesh,
11             IOobject::NO_READ,
12             IOobject::NO_WRITE
13         ),
14         mesh,
15         dimensionedScalar("pcorr", p.dimensions(), 0.0),
16         pcorrTypes
17     );
19     dimensionedScalar rAUf("(1|A(U))", dimTime/rho.dimensions(), 1.0);
21     adjustPhi(phi, U, pcorr);
23     for(int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
24     {
25         fvScalarMatrix pcorrEqn
26         (
27             fvm::laplacian(rAUf, pcorr) == fvc::div(phi) - divU
28         );
30         pcorrEqn.solve();
32         if (nonOrth == nNonOrthCorr)
33         {
34             phi -= pcorrEqn.flux();
35         }
36     }
38     #include "continuityErrs.H"