createFields.H
Go to the documentation of this file.
1Info<< "Reading thermophysical properties\n" << endl;
2autoPtr<psiReactionThermo> pThermo(psiReactionThermo::New(mesh));
3psiReactionThermo& thermo = pThermo();
4thermo.validate(args.executable(), "h", "e");
5
6SLGThermo slgThermo(mesh, thermo);
7
8basicSpecieMixture& composition = thermo.composition();
9PtrList<volScalarField>& Y = composition.Y();
10
11const word inertSpecie(thermo.get<word>("inertSpecie"));
12if (!composition.species().found(inertSpecie))
13{
15 << "Inert specie " << inertSpecie << " not found in available species "
16 << composition.species()
17 << exit(FatalIOError);
18}
19
20Info<< "Creating field rho\n" << endl;
22(
23 IOobject
24 (
25 "rho",
26 runTime.timeName(),
27 mesh,
28 IOobject::NO_READ,
29 IOobject::AUTO_WRITE
30 ),
31 thermo.rho()
32);
33
35
36Info<< "\nReading field U\n" << endl;
38(
39 IOobject
40 (
41 "U",
42 runTime.timeName(),
43 mesh,
44 IOobject::MUST_READ,
45 IOobject::AUTO_WRITE
46 ),
47 mesh
48);
49
51
52#include "createMRF.H"
53
54
55Info<< "Creating turbulence model\n" << endl;
56autoPtr<compressible::turbulenceModel> turbulence
57(
58 compressible::turbulenceModel::New
59 (
60 rho,
61 U,
62 phi,
63 thermo
64 )
65);
66
67Info<< "Creating combustion model\n" << endl;
68autoPtr<CombustionModel<psiReactionThermo>> combustion
69(
70 CombustionModel<psiReactionThermo>::New(thermo, turbulence())
71);
72
73
74#include "readGravitationalAcceleration.H"
75#include "readhRef.H"
76#include "gh.H"
77#include "readpRef.H"
78
79volScalarField p_rgh
80(
81 IOobject
82 (
83 "p_rgh",
84 runTime.timeName(),
85 mesh,
86 IOobject::MUST_READ,
87 IOobject::AUTO_WRITE
88 ),
89 mesh
90);
91
92mesh.setFluxRequired(p_rgh.name());
93
94#include "phrghEqn.H"
95
96
97multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
98
100{
101 fields.add(Y[i]);
102}
103fields.add(thermo.he());
104
105volScalarField Qdot
106(
107 IOobject
108 (
109 "Qdot",
110 runTime.timeName(),
111 mesh,
112 IOobject::READ_IF_PRESENT,
113 IOobject::AUTO_WRITE
114 ),
115 mesh,
116 dimensionedScalar(dimEnergy/dimVolume/dimTime, Zero)
117);
118
119#include "createDpdt.H"
120
121#include "createK.H"
122
123#include "createClouds.H"
125#include "createPyrolysisModel.H"
126#include "createRadiationModel.H"
127#include "createFvOptions.H"
volScalarField & p_rgh
surfaceScalarField & phi
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
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