Removed unneeded lib dependency from mdInitialise
[foam-extend-3.2.git] / applications / solvers / lagrangian / coalChemistryFoam / pEqn.H
blobb31ad45ed4529b30d6d0dbc6c32c1b1e7f5ca6f0
1 rho = thermo.rho();
3 volScalarField rUA = 1.0/UEqn.A();
4 U = rUA*UEqn.H();
6 if (transonic)
8     surfaceScalarField phid
9     (
10         "phid",
11         fvc::interpolate(psi)
12        *(
13             (fvc::interpolate(U) & mesh.Sf())
14           + fvc::ddtPhiCorr(rUA, rho, U, phi)
15         )
16     );
18     for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
19     {
20         fvScalarMatrix pEqn
21         (
22             fvm::ddt(psi, p)
23           + fvm::div(phid, p)
24           - fvm::laplacian(rho*rUA, p)
25          ==
26             coalParcels.Srho()
27         );
29         pEqn.solve();
31         if (nonOrth == nNonOrthCorr)
32         {
33             phi == pEqn.flux();
34         }
35     }
37 else
39     phi =
40         fvc::interpolate(rho)*
41         (
42             (fvc::interpolate(U) & mesh.Sf())
43           + fvc::ddtPhiCorr(rUA, rho, U, phi)
44         );
46     for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
47     {
48         fvScalarMatrix pEqn
49         (
50             fvm::ddt(psi, p)
51           + fvc::div(phi)
52           - fvm::laplacian(rho*rUA, p)
53          ==
54             coalParcels.Srho()
55         );
57         pEqn.solve();
59         if (nonOrth == nNonOrthCorr)
60         {
61             phi += pEqn.flux();
62         }
63     }
66 #include "rhoEqn.H"
67 #include "compressibleContinuityErrs.H"
69 U -= rUA*fvc::grad(p);
70 U.correctBoundaryConditions();
72 DpDt = fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p);