createFields.H
Go to the documentation of this file.
1 #include "createRDeltaT.H"
2 
3 Info<< "Reading thermophysical properties\n" << endl;
4 autoPtr<rhoReactionThermo> pThermo(rhoReactionThermo::New(mesh));
5 rhoReactionThermo& thermo = pThermo();
6 thermo.validate(args.executable(), "h", "e");
7 
8 SLGThermo slgThermo(mesh, thermo);
9 
10 basicSpecieMixture& composition = thermo.composition();
11 PtrList<volScalarField>& Y = composition.Y();
12 
13 const word inertSpecie(thermo.get<word>("inertSpecie"));
14 if (!composition.species().found(inertSpecie))
15 {
17  << "Inert specie " << inertSpecie << " not found in available species "
18  << composition.species()
19  << exit(FatalIOError);
20 }
21 
22 Info<< "Creating field rho\n" << endl;
24 (
25  IOobject
26  (
27  "rho",
28  runTime.timeName(),
29  mesh,
30  IOobject::NO_READ,
31  IOobject::AUTO_WRITE
32  ),
33  thermo.rho()
34 );
35 
36 volScalarField& p = thermo.p();
37 
38 Info<< "\nReading field U\n" << endl;
40 (
41  IOobject
42  (
43  "U",
44  runTime.timeName(),
45  mesh,
46  IOobject::MUST_READ,
47  IOobject::AUTO_WRITE
48  ),
49  mesh
50 );
51 
52 #include "compressibleCreatePhi.H"
53 
54 Info<< "Creating turbulence model\n" << endl;
55 autoPtr<compressible::turbulenceModel> turbulence
56 (
58  (
59  rho,
60  U,
61  phi,
62  thermo
63  )
64 );
65 
66 Info<< "Creating combustion model\n" << endl;
67 autoPtr<CombustionModel<rhoReactionThermo>> combustion
68 (
70 );
71 
72 #include "readGravitationalAcceleration.H"
73 #include "readhRef.H"
74 #include "gh.H"
75 
76 
78 (
79  IOobject
80  (
81  "p_rgh",
82  runTime.timeName(),
83  mesh,
84  IOobject::MUST_READ,
85  IOobject::AUTO_WRITE
86  ),
87  mesh
88 );
89 
90 // Force p_rgh to be consistent with p
91 p_rgh = p - rho*gh;
92 
93 pressureControl pressureControl(p, rho, pimple.dict(), false);
94 
95 mesh.setFluxRequired(p_rgh.name());
96 
97 Info<< "Creating multi-variate interpolation scheme\n" << endl;
98 multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
99 
101 {
102  fields.add(Y[i]);
103 }
104 fields.add(thermo.he());
105 
107 (
108  IOobject
109  (
110  "Qdot",
111  runTime.timeName(),
112  mesh,
113  IOobject::READ_IF_PRESENT,
114  IOobject::AUTO_WRITE
115  ),
116  mesh,
118 );
119 
120 #include "createDpdt.H"
121 
122 #include "createK.H"
123 
124 #include "createMRF.H"
125 #include "createRadiationModel.H"
126 #include "createClouds.H"
127 #include "createSurfaceFilmModel.H"
128 #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))
p_rgh
p_rgh
Definition: createFields.H:91
forAll
forAll(U.boundaryField(), patchi)
Definition: createFields.H:52
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::dimEnergy
const dimensionSet dimEnergy
thermo
psiReactionThermo & thermo
Definition: createFields.H:28
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::FatalIOError
IOerror FatalIOError
Foam::endl
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:350
createRadiationModel.H
gh
const volScalarField & gh
Definition: setRegionFluidFields.H:17
createFvOptions.H
pimple
pimpleControl & pimple
Definition: setRegionFluidFields.H:56
createSurfaceFilmModel.H
Foam::dimTime
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
Definition: dimensionSets.H:54
Foam::argList::executable
const word & executable() const
Name of executable without the path.
Definition: argListI.H:51
pressureControl
pressureControl pressureControl(p, rho, pimple.dict(), false)
createClouds.H
Qdot
volScalarField Qdot(IOobject("Qdot", runTime.timeName(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), mesh, dimensionedScalar(dimEnergy/dimVolume/dimTime, Zero))
Foam::Info
messageStream Info
Information stream (uses stdout - output is on the master only)
FatalIOErrorIn
#define FatalIOErrorIn(functionName, ios)
Report an error message using Foam::FatalIOError.
Definition: error.H:395
Y
PtrList< volScalarField > & Y
Definition: createFields.H:9
Foam::dimensionedScalar
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
Definition: dimensionedScalarFwd.H:43
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
inertSpecie
const word inertSpecie(thermo.get< word >("inertSpecie"))
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:6
compressibleCreatePhi.H
Creates and initialises the face-flux field phi.
Foam::exit
errorManipArg< error, int > exit(error &err, const int errNo=1)
Definition: errorManip.H:130
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
createDpdt.H
slgThermo
SLGThermo slgThermo(mesh, thermo)
readhRef.H
Foam::dimVolume
const dimensionSet dimVolume(pow3(dimLength))
Definition: dimensionSets.H:61
args
Foam::argList args(argc, argv)
fields
multivariateSurfaceInterpolationScheme< scalar >::fieldTable fields
Definition: createFields.H:97
combustion
Info<< "Creating combustion model\n"<< endl;autoPtr< CombustionModel< psiReactionThermo > > combustion(CombustionModel< psiReactionThermo >::New(thermo, turbulence()))
composition
basicSpecieMixture & composition
Definition: createFields.H:8
pThermo
Info<< "Reading thermophysical properties\n"<< endl;autoPtr< psiReactionThermo > pThermo(psiReactionThermo::New(mesh))