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 
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 );
Foam::dimless
const dimensionSet dimless(0, 0, 0, 0, 0, 0, 0)
Definition: dimensionSets.H:47
pThermo
Info<< "Reading thermophysical properties\n"<< endl;autoPtr< psiThermo > pThermo(psiThermo::New(mesh))
Foam::compressible::New
autoPtr< BasicCompressibleTurbulenceModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const typename BasicCompressibleTurbulenceModel::transportModel &transport, const word &propertiesName)
Definition: turbulentFluidThermoModel.C:36
phi
surfaceScalarField & phi
Definition: createFields.H:13
Foam::MULES::interpolate
tmp< surfaceScalarField > interpolate(const RhoType &rho)
Definition: IMULESTemplates.C:40
thermo
Basic thermodynamics type based on the use of fitting functions for cp, h, s obtained from the templa...
rho
rho
Definition: createFields.H:79
Foam::endl
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:251
inviscid
bool inviscid(true)
turbulence
autoPtr< compressible::turbulenceModel > turbulence
Definition: createFields.H:23
Foam::Info
messageStream Info
psi
const volScalarField & psi
Definition: createFields.H:24
Foam::dimensionedScalar
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
Definition: dimensionedScalarFwd.H:41
Foam::volScalarField
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:52
rhoE
volScalarField & rhoE
Definition: readMechanicalProperties.H:125
p
volScalarField & p
Definition: createFields.H:51
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:18
mu
const volScalarField & mu
Atomic mass unit.
Definition: createFields.H:13
e
volScalarField & e
Elementary charge.
Definition: createFields.H:10
Foam::volVectorField
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:55
Foam::max
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
T
const volScalarField & T
Definition: createFields.H:25
Foam::surfaceScalarField
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
Definition: surfaceFieldsFwd.H:52
U
volVectorField U(IOobject("U", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE), Urel+SRF->U())
Foam::neg
dimensionedScalar neg(const dimensionedScalar &ds)
Definition: dimensionedScalar.C:201
Foam::magSqr
dimensioned< scalar > magSqr(const dimensioned< Type > &)
Foam::pos
dimensionedScalar pos(const dimensionedScalar &ds)
Definition: dimensionedScalar.C:190