createFields.H
Go to the documentation of this file.
1 Info<< "Reading thermophysical properties\n" << endl;
2 
3 autoPtr<psiThermo> pThermo
4 (
6 );
7 psiThermo& thermo = pThermo();
8 
9 volScalarField& p = thermo.p();
10 volScalarField& e = thermo.he();
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 
36 (
37  IOobject
38  (
39  "rho",
40  runTime.timeName(),
41  mesh,
42  IOobject::NO_READ,
43  IOobject::AUTO_WRITE
44  ),
45  thermo.rho()
46 );
47 
48 volVectorField rhoU
49 (
50  IOobject
51  (
52  "rhoU",
53  runTime.timeName(),
54  mesh,
55  IOobject::NO_READ,
56  IOobject::NO_WRITE
57  ),
58  rho*U
59 );
60 
62 (
63  IOobject
64  (
65  "rhoE",
66  runTime.timeName(),
67  mesh,
68  IOobject::NO_READ,
69  IOobject::NO_WRITE
70  ),
71  rho*(e + 0.5*magSqr(U))
72 );
73 
75 (
76  IOobject
77  (
78  "pos",
79  runTime.timeName(),
80  mesh
81  ),
82  mesh,
83  dimensionedScalar("pos", dimless, 1.0)
84 );
85 
87 (
88  IOobject
89  (
90  "neg",
91  runTime.timeName(),
92  mesh
93  ),
94  mesh,
95  dimensionedScalar("neg", dimless, -1.0)
96 );
97 
98 surfaceScalarField phi("phi", mesh.Sf() & fvc::interpolate(rhoU));
99 
100 Info<< "Creating turbulence model\n" << endl;
101 autoPtr<compressible::turbulenceModel> turbulence
102 (
104  (
105  rho,
106  U,
107  phi,
108  thermo
109  )
110 );
volVectorField U(IOobject( "U", runTime.timeName(), runTime, IOobject::NO_READ, IOobject::NO_WRITE ), mesh, dimensionedVector("zero", dimVelocity, vector::zero), p.boundaryField().types())
surfaceScalarField & phi
Definition: createFields.H:13
dimensionedScalar neg(const dimensionedScalar &ds)
dimensioned< scalar > magSqr(const dimensioned< Type > &)
messageStream Info
tmp< surfaceScalarField > interpolate(const RhoType &rho)
autoPtr< compressible::turbulenceModel > turbulence
Definition: createFields.H:23
dynamicFvMesh & mesh
autoPtr< BasicCompressibleTurbulenceModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const typename BasicCompressibleTurbulenceModel::transportModel &transport, const word &propertiesName)
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:251
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:52
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
rho
Definition: createFields.H:79
tmp< GeometricField< Type, PatchField, GeoMesh > > T() const
Return transpose (only if it is a tensor field)
Info<< "Reading thermophysical properties\n"<< endl;autoPtr< psiThermo > pThermo(psiThermo::New(mesh))
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:55
bool inviscid(true)
const dimensionSet dimless(0, 0, 0, 0, 0, 0, 0)
Definition: dimensionSets.H:47
dimensionedScalar pos(const dimensionedScalar &ds)
volScalarField & rhoE
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.