createFields.H
Go to the documentation of this file.
1 Info<< "Reading thermophysical properties\n" << endl;
2 
3 autoPtr<rhoThermo> pThermo(rhoThermo::New(mesh));
4 rhoThermo& thermo = pThermo();
5 thermo.validate(args.executable(), "h", "e");
6 
8 (
9  IOobject
10  (
11  "rho",
12  runTime.timeName(),
13  mesh,
14  IOobject::NO_READ,
15  IOobject::NO_WRITE
16  ),
17  thermo.rho()
18 );
19 
21 
22 Info<< "Reading field U\n" << endl;
24 (
25  IOobject
26  (
27  "U",
28  runTime.timeName(),
29  mesh,
30  IOobject::MUST_READ,
31  IOobject::AUTO_WRITE
32  ),
33  mesh
34 );
35 
36 #include "compressibleCreatePhi.H"
37 
38 Info<< "Creating turbulence model\n" << endl;
39 autoPtr<compressible::turbulenceModel> turbulence
40 (
42  (
43  rho,
44  U,
45  phi,
46  thermo
47  )
48 );
49 
50 
51 #include "readGravitationalAcceleration.H"
52 #include "readhRef.H"
53 #include "gh.H"
54 
55 
56 Info<< "Reading field p_rgh\n" << endl;
58 (
59  IOobject
60  (
61  "p_rgh",
62  runTime.timeName(),
63  mesh,
64  IOobject::MUST_READ,
65  IOobject::AUTO_WRITE
66  ),
67  mesh
68 );
69 
70 // Force p_rgh to be consistent with p
71 p_rgh = p - rho*gh;
72 
73 label pRefCell = 0;
74 scalar pRefValue = 0.0;
76 (
77  p,
78  p_rgh,
79  simple.dict(),
80  pRefCell,
81  pRefValue
82 );
83 
84 mesh.setFluxRequired(p_rgh.name());
85 
87 dimensionedScalar totalVolume = sum(mesh.V());
88 
89 #include "createMRF.H"
90 #include "createRadiationModel.H"
91 
92 const dimensionedScalar rhoMax("rhoMax", dimDensity, GREAT, simple.dict());
93 const dimensionedScalar rhoMin("rhoMin", dimDensity, Zero, simple.dict());
94 
95 #include "createFvOptions.H"
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))
simple
const dictionary & simple
Definition: readFluidMultiRegionSIMPLEControls.H:1
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
Definition: zero.H:131
Foam::dimDensity
const dimensionSet dimDensity
Foam::fvc::domainIntegrate
dimensioned< Type > domainIntegrate(const GeometricField< Type, fvPatchField, volMesh > &vf)
Definition: fvcVolumeIntegrate.C:81
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...
rho
rho
Definition: createFields.H:81
Foam::endl
Ostream & endl(Ostream &os)
Definition: Ostream.H:381
setRefCell
setRefCell(p, pimple.dict(), pRefCell, pRefValue)
createRadiationModel.H
gh
const volScalarField & gh
Definition: setRegionFluidFields.H:17
createFvOptions.H
Foam::Info
messageStream Info
Foam::dimensionedScalar
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
Definition: dimensionedScalarFwd.H:36
phi
surfaceScalarField & phi
Definition: setRegionFluidFields.H:8
Foam::volScalarField
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:53
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:58
Foam::New
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions)
Definition: DimensionedFieldReuseFunctions.H:100
Foam::argList::executable
const word & executable() const noexcept
Definition: argListI.H:44
readhRef.H
pRefCell
label pRefCell
Definition: createFields.H:75
Foam::sum
dimensioned< Type > sum(const DimensionedField< Type, GeoMesh > &df)
Definition: DimensionedFieldFunctions.C:320
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))