initial commit for version 1.5.x patch release
[OpenFOAM-1.5.x.git] / applications / solvers / multiphase / multiphaseInterFoam / pEqn.H
blob3fd1e3e60614032c75793b4b5767387e6ac9ab84
2     volScalarField rUA = 1.0/UEqn.A();
3     surfaceScalarField rUAf = fvc::interpolate(rUA);
5     U = rUA*UEqn.H();
7     surfaceScalarField phiU
8     (
9         "phiU",
10         (fvc::interpolate(U) & mesh.Sf()) + fvc::ddtPhiCorr(rUA, rho, U, phi)
11     );
13     phi = phiU +
14         (
15             mixture.surfaceTensionForce()
16           - ghf*fvc::snGrad(rho)
17         )*rUAf*mesh.magSf();
19     adjustPhi(phi, U, pd);
21     for(int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
22     {
23         fvScalarMatrix pdEqn
24         (
25             fvm::laplacian(rUAf, pd) == fvc::div(phi)
26         );
28         pdEqn.setReference(pdRefCell, pdRefValue);
30         if (corr == nCorr-1)
31         {
32             pdEqn.solve(mesh.solver(pd.name() + "Final"));
33         }
34         else
35         {
36             pdEqn.solve(mesh.solver(pd.name()));
37         }
39         if (nonOrth == nNonOrthCorr)
40         {
41             phi -= pdEqn.flux();
42         }
43     }
45     U += rUA*fvc::reconstruct((phi - phiU)/rUAf);
46     U.correctBoundaryConditions();