initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / applications / solvers / compressible / sonicDyMFoam / createFields.H
blob4344a4f5e49451f647a322eb45b08bd07bf062b5
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& e = thermo.e();
11     const volScalarField& psi = thermo.psi();
13     volScalarField rho
14     (
15         IOobject
16         (
17             "rho",
18             runTime.timeName(),
19             mesh
20         ),
21         thermo.rho()
22     );
24     Info<< "Reading field U\n" << endl;
25     volVectorField U
26     (
27         IOobject
28         (
29             "U",
30             runTime.timeName(),
31             mesh,
32             IOobject::MUST_READ,
33             IOobject::AUTO_WRITE
34         ),
35         mesh
36     );
38 #   include "compressibleCreatePhi.H"
41     Info<< "Creating turbulence model\n" << endl;
42     autoPtr<compressible::turbulenceModel> turbulence
43     (
44         compressible::turbulenceModel::New
45         (
46             rho,
47             U,
48             phi,
49             thermo
50         )
51     );
53     Info<< "Creating field DpDt\n" << endl;
54     volScalarField DpDt =
55         fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p);