Updated steadyCompressible*Foam solvers & steadyCompressibleFoam tutorials
[foam-extend-3.2.git] / applications / solvers / compressible / steadyCompressibleFoam / createFields.H
blob9bf40b3a65f98cb72d7983ff14d1b9918d4cd1c8
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& T = thermo.T();
12     volScalarField psis("psi", thermo.psi()/thermo.Cp()*thermo.Cv());
13     psis.oldTime();
15     volScalarField rho
16     (
17         IOobject
18         (
19             "rho",
20             runTime.timeName(),
21             mesh,
22             IOobject::NO_READ,
23             IOobject::AUTO_WRITE
24         ),
25         thermo.rho()
26     );
27     rho.oldTime();
29     Info<< "\nReading field U\n" << endl;
30     volVectorField U
31     (
32         IOobject
33         (
34             "U",
35             runTime.timeName(),
36             mesh,
37             IOobject::MUST_READ,
38             IOobject::AUTO_WRITE
39         ),
40         mesh
41     );
43 #   include "compressibleCreatePhi.H"
45     Info<< "Creating turbulence model\n" << endl;
46     autoPtr<compressible::RASModel> turbulence
47     (
48         compressible::RASModel::New
49         (
50             rho,
51             U,
52             phi,
53             thermo
54         )
55     );