ENH: autoLayerDriver: better layering information message
[OpenFOAM-2.0.x.git] / applications / solvers / compressible / rhoPimpleFoam / createFields.H
blobd1ade4b457277fa1a0c35dfa3dd135c7b6b9917c
1     Info<< "Reading thermophysical properties\n" << endl;
3     autoPtr<basicPsiThermo> pThermo
4     (
5         basicPsiThermo::New(mesh)
6     );
7     basicPsiThermo& thermo = pThermo();
9     volScalarField& p = thermo.p();
10     volScalarField& h = thermo.h();
11     const volScalarField& psi = thermo.psi();
13     volScalarField rho
14     (
15         IOobject
16         (
17             "rho",
18             runTime.timeName(),
19             mesh,
20             IOobject::READ_IF_PRESENT,
21             IOobject::AUTO_WRITE
22         ),
23         thermo.rho()
24     );
26     Info<< "Reading field U\n" << endl;
27     volVectorField U
28     (
29         IOobject
30         (
31             "U",
32             runTime.timeName(),
33             mesh,
34             IOobject::MUST_READ,
35             IOobject::AUTO_WRITE
36         ),
37         mesh
38     );
40     #include "compressibleCreatePhi.H"
42     dimensionedScalar rhoMax
43     (
44         mesh.solutionDict().subDict("PIMPLE").lookup("rhoMax")
45     );
47     dimensionedScalar rhoMin
48     (
49         mesh.solutionDict().subDict("PIMPLE").lookup("rhoMin")
50     );
52     Info<< "Creating turbulence model\n" << endl;
53     autoPtr<compressible::turbulenceModel> turbulence
54     (
55         compressible::turbulenceModel::New
56         (
57             rho,
58             U,
59             phi,
60             thermo
61         )
62     );
64     Info<< "Creating field DpDt\n" << endl;
65     volScalarField DpDt
66     (
67         fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p)
68     );