createFields.H
Go to the documentation of this file.
1 Info<< "Reading thermophysical properties\n" << endl;
2 
3 autoPtr<fluidThermo> pThermo
4 (
6 );
7 fluidThermo& thermo = pThermo();
8 thermo.validate(args.executable(), "h", "e");
9 
12 
14 (
15  IOobject
16  (
17  "rho",
18  runTime.timeName(),
19  mesh,
20  IOobject::READ_IF_PRESENT,
21  IOobject::AUTO_WRITE
22  ),
23  thermo.rho()
24 );
25 
26 Info<< "Reading field U\n" << endl;
28 (
29  IOobject
30  (
31  "U",
32  runTime.timeName(),
33  mesh,
34  IOobject::MUST_READ,
35  IOobject::AUTO_WRITE
36  ),
37  mesh
38 );
39 
40 Info<< "Calculating face flux field phi\n" << endl;
41 
43 (
44  IOobject
45  (
46  "phi",
47  runTime.timeName(),
48  mesh,
49  IOobject::READ_IF_PRESENT,
50  IOobject::AUTO_WRITE
51  ),
53 );
54 
55 Info<< "Calculating face flux field phiByRho\n" << endl;
56 
58 (
59  IOobject
60  (
61  "phiByRho",
62  runTime.timeName(),
63  mesh,
64  IOobject::READ_IF_PRESENT,
65  IOobject::AUTO_WRITE
66  ),
68 );
69 
70 Info<< "Creating turbulence model\n" << endl;
71 autoPtr<compressible::turbulenceModel> turbulence
72 (
74  (
75  rho,
76  U,
77  phi,
78  thermo
79  )
80 );
81 
82 mesh.setFluxRequired(p.name());
83 
84 #include "createMRF.H"
85 
86 Info<< "Creating compressibility field psi\n" << endl;
87 volScalarField psi("psi", 1.0/((thermo.Cp() - thermo.Cv())*T));
88 psi.oldTime() = 1.0/((thermo.Cp() - thermo.Cv())*T.oldTime());
89 psi.oldTime().oldTime() = 1.0/((thermo.Cp()-thermo.Cv())*T.oldTime().oldTime());
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))
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...
rho
rho
Definition: createFields.H:81
Foam::endl
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:369
phiByRho
phiByRho
Definition: pEqn.H:76
Foam::Info
messageStream Info
Information stream (stdout output on master, null elsewhere)
phi
surfaceScalarField & phi
Definition: setRegionFluidFields.H:8
Foam::volScalarField
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:57
p
volScalarField & p
Definition: createFields.H:23
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:6
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::linearInterpolate
tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > linearInterpolate(const GeometricField< Type, fvPatchField, volMesh > &vf)
Definition: linear.H:112
Foam::argList::executable
const word & executable() const noexcept
Name of executable without the path.
Definition: argListI.H:51
Foam::surfaceScalarField
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
Definition: surfaceFieldsFwd.H:54
args
Foam::argList args(argc, argv)
T
volScalarField & T
Definition: createFields.H:11
psi
const volScalarField & psi
Definition: createFields.H:11
pThermo
Info<< "Reading thermophysical properties\n"<< endl;autoPtr< psiReactionThermo > pThermo(psiReactionThermo::New(mesh))