ENH: sixDoFRigidBodyDisplacement. rho field handling and new tutorial.
[OpenFOAM-1.6.x.git] / applications / solvers / lagrangian / porousExplicitSourceReactingParcelFoam / hsEqn.H
blob73c276c2942d857e689c31bfeba9ed9cac565a68
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, hs)
36           + mvConvection->fvmDiv(phi, hs)
37           - fvm::laplacian(turbulence->alphaEff(), hs)
38          ==
39             pWork()
40           + parcels.Sh()
41           + radiation->Shs(thermo)
42           + energySource.Su()
43           + chemistrySh
44         );
46         thermo.correct();
48         radiation->correct();
50         Info<< "T gas min/max   = " << min(T).value() << ", "
51             << max(T).value() << endl;
52     }