initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / tutorials / lagrangian / rhoPisoTwinParcelFoam / rhoPisoTwinParcelFoam / createFields.H
blobcebd44cfd4041042584f6706484083b3a4dad9b0
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::NO_READ,
21             IOobject::AUTO_WRITE
22         ),
23         thermo.rho()
24     );
26     Info<< "\nReading 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     );
41 #   include "compressibleCreatePhi.H"
44     Info<< "Creating turbulence model\n" << endl;
45     autoPtr<compressible::turbulenceModel> turbulence
46     (
47         compressible::turbulenceModel::New
48         (
49             rho,
50             U,
51             phi,
52             thermo
53         )
54     );
57     Info<< "Creating field DpDt\n" << endl;
58     volScalarField DpDt =
59         fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p);