createFields.H
Go to the documentation of this file.
1 #include "createRDeltaT.H"
2 
3 Info<< "Reading thermophysical properties\n" << endl;
4 
5 autoPtr<rhoThermo> pThermo(rhoThermo::New(mesh));
6 rhoThermo& thermo = pThermo();
7 thermo.validate(args.executable(), "h", "e");
8 
10 (
11  IOobject
12  (
13  "rho",
14  runTime.timeName(),
15  mesh,
16  IOobject::NO_READ,
17  IOobject::NO_WRITE
18  ),
19  thermo.rho()
20 );
21 
23 
24 Info<< "Reading field U\n" << endl;
26 (
27  IOobject
28  (
29  "U",
30  runTime.timeName(),
31  mesh,
32  IOobject::MUST_READ,
33  IOobject::AUTO_WRITE
34  ),
35  mesh
36 );
37 
38 #include "compressibleCreatePhi.H"
39 
40 pressureControl pressureControl(p, rho, pimple.dict(), false);
41 
42 Info<< "Creating turbulence model\n" << endl;
43 autoPtr<compressible::turbulenceModel> turbulence
44 (
46  (
47  rho,
48  U,
49  phi,
50  thermo
51  )
52 );
53 
54 
55 #include "readGravitationalAcceleration.H"
56 #include "readhRef.H"
57 #include "gh.H"
58 
59 
60 Info<< "Reading field p_rgh\n" << endl;
62 (
63  IOobject
64  (
65  "p_rgh",
66  runTime.timeName(),
67  mesh,
68  IOobject::MUST_READ,
69  IOobject::AUTO_WRITE
70  ),
71  mesh
72 );
73 
74 // Force p_rgh to be consistent with p
75 p_rgh = p - rho*gh;
76 
77 mesh.setFluxRequired(p_rgh.name());
78 
79 label pRefCell = 0;
80 scalar pRefValue = 0.0;
81 
82 if (p_rgh.needReference())
83 {
85  (
86  p,
87  p_rgh,
88  pimple.dict(),
89  pRefCell,
90  pRefValue
91  );
92 
94  (
95  "p",
96  p.dimensions(),
98  );
99 }
100 
102 
103 #include "createDpdt.H"
104 
105 #include "createK.H"
106 
107 #include "createMRF.H"
108 #include "createRadiationModel.H"
109 #include "createFvOptions.H"
110 
111 
112 const dimensionedScalar rhoMax("rhoMax", dimDensity, GREAT, pimple.dict());
113 const dimensionedScalar rhoMin("rhoMin", dimDensity, Zero, pimple.dict());
runTime
engineTime & runTime
Definition: createEngineTime.H:13
gh.H
U
volVectorField U(IOobject("U", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE), mesh, dimensionedVector(dimVelocity, Zero))
p_rgh
p_rgh
Definition: createFields.H:95
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
Foam::Zero
static constexpr const zero Zero
Global zero (0)
Definition: zero.H:131
Foam::dimDensity
const dimensionSet dimDensity
Foam::fvc::domainIntegrate
dimensioned< Type > domainIntegrate(const GeometricField< Type, fvPatchField, volMesh > &vf)
Definition: fvcVolumeIntegrate.C:88
rhoMax
const dimensionedScalar rhoMax("rhoMax", dimDensity, GREAT, pimple.dict())
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
setRefCell
setRefCell(p, pimple.dict(), pRefCell, pRefValue)
createRadiationModel.H
gh
const volScalarField & gh
Definition: setRegionFluidFields.H:17
createFvOptions.H
pimple
pimpleControl & pimple
Definition: setRegionFluidFields.H:56
pressureControl
pressureControl pressureControl(p, rho, pimple.dict(), false)
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
createK.H
p
volScalarField & p
Definition: createFields.H:23
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:6
compressibleCreatePhi.H
Creates and initialises the face-flux field phi.
rhoMin
const dimensionedScalar rhoMin("rhoMin", dimDensity, Zero, pimple.dict())
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::getRefCellValue
scalar getRefCellValue(const volScalarField &field, const label refCelli)
Return the current value of field in the reference cell.
Definition: findRefCell.C:134
createDpdt.H
Foam::argList::executable
const word & executable() const noexcept
Name of executable without the path.
Definition: argListI.H:51
readhRef.H
pRefCell
label pRefCell
Definition: createFields.H:75
pRefValue
scalar pRefValue
Definition: createFields.H:76
initialMass
dimensionedScalar initialMass
Definition: createFields.H:57
args
Foam::argList args(argc, argv)
pThermo
Info<< "Reading thermophysical properties\n"<< endl;autoPtr< psiReactionThermo > pThermo(psiReactionThermo::New(mesh))