createFields.H
Go to the documentation of this file.
1 #include "readGravitationalAcceleration.H"
2 
3 Info<< "Reading thermophysical properties\n" << endl;
4 autoPtr<psiReactionThermo> pThermo(psiReactionThermo::New(mesh));
5 psiReactionThermo& 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 
23 
25 (
26  IOobject
27  (
28  "rho",
29  runTime.timeName(),
30  mesh,
31  IOobject::READ_IF_PRESENT,
32  IOobject::AUTO_WRITE
33  ),
34  thermo.rho()
35 );
36 
37 Info<< "\nReading field U\n" << endl;
39 (
40  IOobject
41  (
42  "U",
43  runTime.timeName(),
44  mesh,
45  IOobject::MUST_READ,
46  IOobject::AUTO_WRITE
47  ),
48  mesh
49 );
50 
51 #include "compressibleCreatePhi.H"
52 
53 mesh.setFluxRequired(p.name());
54 
55 const dimensionedScalar rhoMax("rhoMax", dimDensity, GREAT, pimple.dict());
56 const dimensionedScalar rhoMin("rhoMin", dimDensity, Zero, pimple.dict());
57 
58 Info<< "Creating turbulence model\n" << endl;
59 autoPtr<compressible::turbulenceModel> turbulence
60 (
62  (
63  rho,
64  U,
65  phi,
66  thermo
67  )
68 );
69 
70 Info<< "Creating combustion model\n" << endl;
71 autoPtr<CombustionModel<psiReactionThermo>> combustion
72 (
74 );
75 
76 multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
77 
78 forAll(Y, i)
79 {
80  fields.add(Y[i]);
81 }
82 fields.add(thermo.he());
83 
85 (
86  IOobject
87  (
88  "Qdot",
89  runTime.timeName(),
90  mesh,
91  IOobject::NO_READ,
92  IOobject::AUTO_WRITE
93  ),
94  mesh,
96 );
97 
98 #include "createDpdt.H"
99 
100 #include "createK.H"
101 
102 #include "createMRF.H"
103 #include "createClouds.H"
104 #include "createRadiationModel.H"
105 #include "createFvOptions.H"
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))
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
Foam::dimDensity
const dimensionSet dimDensity
thermo
psiReactionThermo & thermo
Definition: createFields.H:28
createClouds.H
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::FatalIOError
IOerror FatalIOError
Foam::endl
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:369
createRadiationModel.H
createFvOptions.H
pimple
pimpleControl & pimple
Definition: setRegionFluidFields.H:56
Foam::dimTime
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
Definition: dimensionSets.H:53
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 (stdout output on master, null elsewhere)
FatalIOErrorIn
#define FatalIOErrorIn(functionName, ios)
Report an error message using Foam::FatalIOError.
Definition: error.H:467
Y
PtrList< volScalarField > & Y
Definition: createFields.H:9
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
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.
rhoMin
const dimensionedScalar rhoMin("rhoMin", dimDensity, Zero, pimple.dict())
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)
Foam::argList::executable
const word & executable() const noexcept
Name of executable without the path.
Definition: argListI.H:51
Foam::dimVolume
const dimensionSet dimVolume(pow3(dimLength))
Definition: dimensionSets.H:60
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))