createFields.H
Go to the documentation of this file.
1 #include "createRDeltaT.H"
2 
3 Info<< "Reading thermophysical properties\n" << endl;
4 
5 autoPtr<psiThermo> pThermo
6 (
8 );
9 psiThermo& thermo = pThermo();
10 
12 
13 Info<< "Reading field U\n" << endl;
15 (
16  IOobject
17  (
18  "U",
19  runTime.timeName(),
20  mesh,
21  IOobject::MUST_READ,
22  IOobject::AUTO_WRITE
23  ),
24  mesh
25 );
26 
28 (
29  IOobject
30  (
31  "rho",
32  runTime.timeName(),
33  mesh,
34  IOobject::NO_READ,
35  IOobject::AUTO_WRITE
36  ),
37  thermo.rho()
38 );
39 
40 volVectorField rhoU
41 (
42  IOobject
43  (
44  "rhoU",
45  runTime.timeName(),
46  mesh,
47  IOobject::NO_READ,
48  IOobject::NO_WRITE
49  ),
50  rho*U
51 );
52 
54 (
55  IOobject
56  (
57  "rhoE",
58  runTime.timeName(),
59  mesh,
60  IOobject::NO_READ,
61  IOobject::NO_WRITE
62  ),
63  rho*(e + 0.5*magSqr(U))
64 );
65 
67 (
68  IOobject
69  (
70  "pos",
71  runTime.timeName(),
72  mesh
73  ),
74  mesh,
75  dimensionedScalar("pos", dimless, 1.0)
76 );
77 
79 (
80  IOobject
81  (
82  "neg",
83  runTime.timeName(),
84  mesh
85  ),
86  mesh,
87  dimensionedScalar("neg", dimless, -1.0)
88 );
89 
90 surfaceScalarField phi("phi", fvc::flux(rhoU));
91 
92 Info<< "Creating turbulence model\n" << endl;
93 autoPtr<compressible::turbulenceModel> turbulence
94 (
96  (
97  rho,
98  U,
99  phi,
100  thermo
101  )
102 );
runTime
engineTime & runTime
Definition: createEngineTime.H:13
U
volVectorField U(IOobject("U", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE), mesh, dimensionedVector(dimVelocity, Zero))
Foam::fvc::flux
tmp< surfaceScalarField > flux(const volVectorField &vvf)
Return the face-flux field obtained from the given volVectorField.
turbulence
Info<< "Reading field U\n"<< endl;volVectorField U(IOobject("U", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE), mesh);volScalarField rho(IOobject("rho", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE), thermo.rho());volVectorField rhoU(IOobject("rhoU", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE), rho *U);volScalarField rhoE(IOobject("rhoE", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE), rho *(e+0.5 *magSqr(U)));surfaceScalarField pos(IOobject("pos", runTime.timeName(), mesh), mesh, dimensionedScalar("pos", dimless, 1.0));surfaceScalarField neg(IOobject("neg", runTime.timeName(), mesh), mesh, dimensionedScalar("neg", dimless, -1.0));surfaceScalarField phi("phi", fvc::flux(rhoU));Info<< "Creating turbulence model\n"<< endl;autoPtr< compressible::turbulenceModel > turbulence(compressible::turbulenceModel::New(rho, U, phi, thermo))
Definition: createFields.H:94
thermo
Basic thermodynamics type based on the use of fitting functions for cp, h, s obtained from the templa...
createRDeltaT.H
rho
rho
Definition: createFields.H:81
Foam::endl
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:369
Foam::magSqr
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)
Foam::Info
messageStream Info
Information stream (stdout output on master, null elsewhere)
Foam::dimensionedScalar
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
Definition: dimensionedScalarFwd.H:42
phi
surfaceScalarField & phi
Definition: setRegionFluidFields.H:8
Foam::volScalarField
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:57
rhoE
volScalarField & rhoE
Definition: readMechanicalProperties.H:123
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:6
e
volScalarField & e
Elementary charge.
Definition: createFields.H:11
Foam::volVectorField
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:62
Foam::New
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions)
Global function forwards to reuseTmpDimensionedField::New.
Definition: DimensionedFieldReuseFunctions.H:105
Foam::surfaceScalarField
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
Definition: surfaceFieldsFwd.H:54
Foam::neg
dimensionedScalar neg(const dimensionedScalar &ds)
Definition: dimensionedScalar.C:199
Foam::dimless
const dimensionSet dimless
Dimensionless.
Definition: dimensionSets.C:189
Foam::pos
dimensionedScalar pos(const dimensionedScalar &ds)
Definition: dimensionedScalar.C:177
pThermo
Info<< "Reading thermophysical properties\n"<< endl;autoPtr< psiReactionThermo > pThermo(psiReactionThermo::New(mesh))