FreeFOAM The Cross-Platform CFD Toolkit
createFields.H
Go to the documentation of this file.
1 Info<< "Reading thermophysical properties\n" << endl;
2 
3 autoPtr<basicPsiThermo> pThermo
4 (
5  basicPsiThermo::New(mesh)
6 );
7 basicPsiThermo& thermo = pThermo();
8 
9 volScalarField& p = thermo.p();
10 volScalarField& e = thermo.e();
11 const volScalarField& T = thermo.T();
12 const volScalarField& psi = thermo.psi();
13 const volScalarField& mu = thermo.mu();
14 
15 bool inviscid(true);
16 if (max(mu.internalField()) > 0.0)
17 {
18  inviscid = false;
19 }
20 
21 Info<< "Reading field U\n" << endl;
23 (
24  IOobject
25  (
26  "U",
27  runTime.timeName(),
28  mesh,
29  IOobject::MUST_READ,
30  IOobject::AUTO_WRITE
31  ),
32  mesh
33 );
34 
35 #include "rhoBoundaryTypes.H"
37 (
38  IOobject
39  (
40  "rho",
41  runTime.timeName(),
42  mesh,
43  IOobject::NO_READ,
44  IOobject::AUTO_WRITE
45  ),
46  thermo.rho(),
48 );
49 
50 volVectorField rhoU
51 (
52  IOobject
53  (
54  "rhoU",
55  runTime.timeName(),
56  mesh,
57  IOobject::NO_READ,
58  IOobject::NO_WRITE
59  ),
60  rho*U
61 );
62 
63 volScalarField rhoE
64 (
65  IOobject
66  (
67  "rhoE",
68  runTime.timeName(),
69  mesh,
70  IOobject::NO_READ,
71  IOobject::NO_WRITE
72  ),
73  rho*(e + 0.5*magSqr(U))
74 );
75 
77 (
78  IOobject
79  (
80  "pos",
81  runTime.timeName(),
82  mesh
83  ),
84  mesh,
85  dimensionedScalar("pos", dimless, 1.0)
86 );
87 
89 (
90  IOobject
91  (
92  "neg",
93  runTime.timeName(),
94  mesh
95  ),
96  mesh,
97  dimensionedScalar("neg", dimless, -1.0)
98 );
99 
100 // ************************ vim: set sw=4 sts=4 et: ************************ //