initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / applications / solvers / multiphase / interDyMFoam / correctPhi.H
blob0854a68b8e3ae1b941dbdad26c244017efc04d8e
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)
28         );
30         pcorrEqn.setReference(pRefCell, pRefValue);
31         pcorrEqn.solve();
33         if (nonOrth == nNonOrthCorr)
34         {
35             phi -= pcorrEqn.flux();
36         }
37     }
39     #include "continuityErrs.H"