All Classes Namespaces Files Functions Variables Typedefs Friends Macros Groups
createFields.H
Go to the documentation of this file.
1 Info<< "Reading thermophysical properties\n" << endl;
2 
3 autoPtr<psiQGDThermo> pThermo
4 (
5  psiQGDThermo::New(mesh)
6 );
7 psiQGDThermo& thermo = pThermo();
8 thermo.correct();
9 
10 volScalarField& e = thermo.he();
11 
12 volScalarField& p = thermo.p();
13 const volScalarField& T = thermo.T();
14 
15 const surfaceScalarField& tauQGDf = thermo.tauQGDf();
16 const surfaceScalarField& hQGDf = thermo.hQGDf();
17 const volScalarField& gamma = thermo.gamma();
18 const volScalarField& psi = thermo.psi();
19 
20 Info << "Thermo corrected" << endl;
21 
22 autoPtr<compressible::turbulenceModel> turbulence;
23 
24 volVectorField U
25 (
26  IOobject
27  (
28  "U",
29  runTime.timeName(),
30  mesh,
31  IOobject::MUST_READ,
32  IOobject::AUTO_WRITE
33  ),
34  mesh
35 );
36 
37 volScalarField rho
38 (
39  IOobject
40  (
41  "rho",
42  runTime.timeName(),
43  mesh,
44  IOobject::NO_READ,
45  IOobject::AUTO_WRITE
46  ),
47  thermo.rho()
48 );
49 
50 //volScalarField cellNo
51 //(
52 // IOobject
53 // (
54 // "cellNo",
55 // runTime.timeName(),
56 // mesh,
57 // IOobject::MUST_READ,
58 // IOobject::AUTO_WRITE
59 // ),
60 // mesh
61 //);
62 
63 //forAll(cellNo, iCell)
64 //{
65 // cellNo.primitiveFieldRef()[iCell] = scalar(iCell);
66 //}
67 //
68 //cellNo.write();
69 
70 volVectorField rhoU
71 (
72  IOobject
73  (
74  "rhoU",
75  runTime.timeName(),
76  mesh,
77  IOobject::NO_READ,
78  IOobject::NO_WRITE
79  ),
80  rho*U
81 );
82 
83 volScalarField rhoE
84 (
85  IOobject
86  (
87  "rhoE",
88  runTime.timeName(),
89  mesh,
90  IOobject::NO_READ,
91  IOobject::NO_WRITE
92  ),
93  rho*e + rho*0.5*magSqr(U)
94 );
95 
96 surfaceScalarField phi
97 (
98  "phi",
99  linearInterpolate(rho*U) & mesh.Sf()
100 );
101 
102 surfaceScalarField phiRhof
103 (
104  "phiRhof",
105  linearInterpolate(rho)*phi
106 );
107 
108 Switch implicitDiffusion (thermo.implicitDiffusion());
109 
110 Info<< "Creating turbulence model\n" << endl;
111 turbulence.reset
112 (
113  compressible::turbulenceModel::New
114  (
115  rho,
116  U,
117  phiRhof,
118  thermo
119  ).ptr()
120 );
121 
122 #include "createZeroSources.H"
123 
124 //
125 //END-OF-FILE
126 //
127 
const surfaceScalarField & tauQGDf
Definition: createFields.H:55
const surfaceScalarField & hQGDf
Definition: createFields.H:54
volVectorField U(IOobject("U", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE), mesh)
Switch implicitDiffusion(thermo.implicitDiffusion())
volScalarField rhoE(IOobject("rhoE", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE), rho *e+rho *0.5 *magSqr(U))
const volScalarField & gamma
Definition: createFields.H:19
surfaceScalarField phiRhof("phiRhof", linearInterpolate(rho)*phi)
volScalarField & e
Definition: createFields.H:50
rhoQGDThermo & thermo
Definition: createFields.H:47
const volScalarField & psi
Definition: createFields.H:20
Info<< "\nReading gravitationalProperties"<< endl;IOdictionary gravitationalProperties(IOobject("gravitationalProperties", runTime.constant(), mesh, IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE));const dimensionedVector g(gravitationalProperties.lookup("g"));Info<< "Reading thermophysical properties\n"<< endl;autoPtr< rhoQGDThermo > pThermo(rhoQGDThermo::New(mesh))
volScalarField rho(IOobject("rho", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE), thermo.rho())
Info<< "Thermo corrected"<< endl;autoPtr< compressible::turbulenceModel > turbulence
Definition: createFields.H:59
volScalarField & T
Definition: createFields.H:53
volVectorField rhoU(IOobject("rhoU", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE), rho *U)
volScalarField & p
Definition: createFields.H:52