createFields.H
Go to the documentation of this file.
1#include "createRDeltaT.H"
2
3Info<< "Reading thermophysical properties\n" << endl;
4autoPtr<rhoReactionThermo> pThermo(rhoReactionThermo::New(mesh));
5rhoReactionThermo& thermo = pThermo();
6thermo.validate(args.executable(), "h", "e");
7
8SLGThermo slgThermo(mesh, thermo);
9
10basicSpecieMixture& composition = thermo.composition();
11PtrList<volScalarField>& Y = composition.Y();
12
13const word inertSpecie(thermo.get<word>("inertSpecie"));
14if
15(
16 !composition.species().found(inertSpecie)
17 && composition.species().size() > 0
18)
19{
21 << "Inert specie " << inertSpecie << " not found in available species "
22 << composition.species()
23 << exit(FatalIOError);
24}
25
26Info<< "Creating field rho\n" << endl;
28(
29 IOobject
30 (
31 "rho",
32 runTime.timeName(),
33 mesh,
34 IOobject::NO_READ,
35 IOobject::AUTO_WRITE
36 ),
37 thermo.rho()
38);
39
41
42Info<< "\nReading field U\n" << endl;
44(
45 IOobject
46 (
47 "U",
48 runTime.timeName(),
49 mesh,
50 IOobject::MUST_READ,
51 IOobject::AUTO_WRITE
52 ),
53 mesh
54);
55
57
58Info<< "Creating turbulence model\n" << endl;
59autoPtr<compressible::turbulenceModel> turbulence
60(
61 compressible::turbulenceModel::New
62 (
63 rho,
64 U,
65 phi,
66 thermo
67 )
68);
69
70Info<< "Creating combustion model\n" << endl;
71autoPtr<CombustionModel<rhoReactionThermo>> combustion
72(
73 CombustionModel<rhoReactionThermo>::New(thermo, turbulence())
74);
75
76#include "readGravitationalAcceleration.H"
77#include "readhRef.H"
78#include "gh.H"
79
80
81volScalarField p_rgh
82(
83 IOobject
84 (
85 "p_rgh",
86 runTime.timeName(),
87 mesh,
88 IOobject::MUST_READ,
89 IOobject::AUTO_WRITE
90 ),
91 mesh
92);
93
94// Force p_rgh to be consistent with p
96
98
99mesh.setFluxRequired(p_rgh.name());
100
101Info<< "Creating multi-variate interpolation scheme\n" << endl;
102multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
103
105{
106 fields.add(Y[i]);
107}
108fields.add(thermo.he());
109
110volScalarField Qdot
111(
112 IOobject
113 (
114 "Qdot",
115 runTime.timeName(),
116 mesh,
117 IOobject::READ_IF_PRESENT,
118 IOobject::AUTO_WRITE
119 ),
120 mesh,
121 dimensionedScalar(dimEnergy/dimVolume/dimTime, Zero)
122);
123
124#include "createDpdt.H"
125
126#include "createK.H"
127
128#include "createMRF.H"
129#include "createRadiationModel.H"
130#include "createClouds.H"
132#include "createFvOptions.H"
volScalarField & p_rgh
surfaceScalarField & phi
const volScalarField & gh
pimpleControl & pimple
const word & executable() const noexcept
Name of executable without the path.
Definition: argListI.H:51
Basic thermodynamics type based on the use of fitting functions for cp, h, s obtained from the templa...
U
Definition: pEqn.H:72
volScalarField & p
Creates and initialises the face-flux field phi.
dynamicFvMesh & mesh
engineTime & runTime
#define FatalIOErrorIn(functionName, ios)
Report an error message using Foam::FatalIOError.
Definition: error.H:467
const pressureControl & pressureControl
compressible::turbulenceModel & turbulence
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:83
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:82
messageStream Info
Information stream (stdout output on master, null elsewhere)
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:372
Foam::argList args(argc, argv)
scalar Qdot
Definition: solveChemistry.H:2
Info<< "Reading thermophysical properties\n"<< endl;autoPtr< psiReactionThermo > pThermo(psiReactionThermo::New(mesh))
const word inertSpecie(thermo.get< word >("inertSpecie"))
basicSpecieMixture & composition
Definition: createFields.H:8
SLGThermo slgThermo(mesh, thermo)
Info<< "Creating combustion model\n"<< endl;autoPtr< CombustionModel< psiReactionThermo > > combustion(CombustionModel< psiReactionThermo >::New(thermo, turbulence()))
PtrList< volScalarField > & Y
Definition: createFields.H:9
multivariateSurfaceInterpolationScheme< scalar >::fieldTable fields
Definition: createFields.H:97
#define forAll(list, i)
Loop across all elements in list.
Definition: stdFoam.H:333