initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / applications / solvers / lagrangian / porousExplicitSourceReactingParcelFoam / hEqn.H
blob6e6b0c763ae85dbde75e0745e8c27b2899598fe3
2     tmp<volScalarField> pWork
3     (
4         new volScalarField
5         (
6             IOobject
7             (
8                 "pWork",
9                 runTime.timeName(),
10                 mesh,
11                 IOobject::NO_READ,
12                 IOobject::NO_WRITE
13             ),
14             mesh,
15             dimensionedScalar("zero", dimensionSet(1, -1, -3, 0, 0), 0.0)
16         )
17     );
19     if (dpdt)
20     {
21         pWork() += fvc::ddt(p);
22     }
23     if (eWork)
24     {
25         pWork() = -p*fvc::div(phi/fvc::interpolate(rho));
26     }
27     if (hWork)
28     {
29         pWork() += fvc::div(phi/fvc::interpolate(rho)*fvc::interpolate(p));
30     }
32     {
33         solve
34         (
35             fvm::ddt(rho, h)
36           + mvConvection->fvmDiv(phi, h)
37           - fvm::laplacian(turbulence->alphaEff(), h)
38          ==
39             pWork()
40           + parcels.Sh()
41           + radiation->Sh(thermo)
42         );
44         thermo.correct();
46         radiation->correct();
48         Info<< "T gas min/max   = " << min(T).value() << ", "
49             << max(T).value() << endl;
50     }