Removed unneeded lib dependency from mdInitialise
[foam-extend-3.2.git] / applications / solvers / multiphase / multiphaseInterFoam / pEqn.H
blob92148f9fc3c8bb06575d5cc0288aa73382ee44d7
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.solutionDict().solver(pd.name() + "Final"));
33         }
34         else
35         {
36             pdEqn.solve(mesh.solutionDict().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();