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
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
20volScalarField rho
21(
22 IOobject
23 (
24 "rho",
25 runTime.timeName(),
26 mesh
27 ),
28 thermo.rho()
29);
30
31Info<< "Reading field U\n" << endl;
32volVectorField U
33(
34 IOobject
35 (
36 "U",
37 runTime.timeName(),
38 mesh,
39 IOobject::MUST_READ,
40 IOobject::AUTO_WRITE
41 ),
42 mesh
43);
44
45
46volScalarField& p = thermo.p();
47
49
51
52mesh.setFluxRequired(p.name());
53
54
55Info << "Creating turbulence model.\n" << nl;
56autoPtr<compressible::turbulenceModel> turbulence
57(
58 compressible::turbulenceModel::New
59 (
60 rho,
61 U,
62 phi,
63 thermo
64 )
65);
66
67Info<< "Creating reaction model\n" << endl;
68autoPtr<CombustionModel<rhoReactionThermo>> reaction
69(
70 CombustionModel<rhoReactionThermo>::New(thermo, turbulence())
71);
72
73multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
74
76{
77 fields.add(Y[i]);
78}
79fields.add(thermo.he());
80
81volScalarField Qdot
82(
83 IOobject
84 (
85 "Qdot",
86 runTime.timeName(),
87 mesh,
88 IOobject::READ_IF_PRESENT,
89 IOobject::AUTO_WRITE
90 ),
91 mesh,
92 dimensionedScalar(dimEnergy/dimVolume/dimTime, Zero)
93);
94
95#include "createDpdt.H"
96
97#include "createK.H"
98
99#include "createMRF.H"
100
101const dimensionedScalar rhoMax("rhoMax", dimDensity, GREAT, pimple.dict());
102const dimensionedScalar rhoMin("rhoMin", dimDensity, Zero, pimple.dict());
103
104#include "createFvOptions.H"
surfaceScalarField & phi
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 dimensionedScalar rhoMin
const dimensionedScalar rhoMax
const pressureControl & pressureControl
compressible::turbulenceModel & turbulence
CombustionModel< rhoReactionThermo > & reaction
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
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