BUG: UListIO: byteSize overflowing on really big faceLists
[OpenFOAM-2.0.x.git] / applications / solvers / lagrangian / reactingParcelFoam / pEqn.H
blob3bf304ceccf4168d6214eb32d879f01c977542f0
1 rho = thermo.rho();
3 volScalarField rAU(1.0/UEqn.A());
4 U = rAU*UEqn.H();
6 if (pimple.transonic())
8     surfaceScalarField phid
9     (
10         "phid",
11         fvc::interpolate(psi)
12        *(
13             (fvc::interpolate(U) & mesh.Sf())
14           + fvc::ddtPhiCorr(rAU, rho, U, phi)
15         )
16     );
18     for (int nonOrth=0; nonOrth<=pimple.nNonOrthCorr(); nonOrth++)
19     {
20         fvScalarMatrix pEqn
21         (
22             fvm::ddt(psi, p)
23           + fvm::div(phid, p)
24           - fvm::laplacian(rho*rAU, p)
25          ==
26             parcels.Srho()
27         );
29         pEqn.solve
30         (
31             mesh.solver(p.select(pimple.finalInnerIter(corr, nonOrth)))
32         );
34         if (nonOrth == pimple.nNonOrthCorr())
35         {
36             phi == pEqn.flux();
37         }
38     }
40 else
42     phi =
43         fvc::interpolate(rho)
44        *(
45             (fvc::interpolate(U) & mesh.Sf())
46           + fvc::ddtPhiCorr(rAU, rho, U, phi)
47         );
49     for (int nonOrth=0; nonOrth<=pimple.nNonOrthCorr(); nonOrth++)
50     {
51         fvScalarMatrix pEqn
52         (
53             fvm::ddt(psi, p)
54           + fvc::div(phi)
55           - fvm::laplacian(rho*rAU, p)
56          ==
57             parcels.Srho()
58         );
60         pEqn.solve
61         (
62             mesh.solver(p.select(pimple.finalInnerIter(corr, nonOrth)))
63         );
65         if (nonOrth == pimple.nNonOrthCorr())
66         {
67             phi += pEqn.flux();
68         }
69     }
72 #include "rhoEqn.H"
73 #include "compressibleContinuityErrs.H"
75 U -= rAU*fvc::grad(p);
76 U.correctBoundaryConditions();
79 DpDt = fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p);