createFields.H
Go to the documentation of this file.
1#include "readGravitationalAcceleration.H"
2
3
4Info<< "Reading thermophysical properties\n" << endl;
5autoPtr<rhoReactionThermo> pThermo(rhoReactionThermo::New(mesh));
6rhoReactionThermo& thermo = pThermo();
7thermo.validate(args.executable(), "h", "e");
8
9SLGThermo slgThermo(mesh, thermo);
10
11basicSpecieMixture& composition = thermo.composition();
12PtrList<volScalarField>& Y = composition.Y();
13
14const word inertSpecie(thermo.get<word>("inertSpecie"));
15if (!composition.species().found(inertSpecie))
16{
18 << "Inert specie " << inertSpecie << " not found in available species "
19 << composition.species()
20 << exit(FatalIOError);
21}
22
23volScalarField& p = thermo.p();
24
25volScalarField rho
26(
27 IOobject
28 (
29 "rho",
30 runTime.timeName(),
31 mesh,
32 IOobject::NO_READ,
33 IOobject::AUTO_WRITE
34 ),
35 thermo.rho()
36);
37
38Info<< "\nReading field U\n" << endl;
39volVectorField U
40(
41 IOobject
42 (
43 "U",
44 runTime.timeName(),
45 mesh,
46 IOobject::MUST_READ,
47 IOobject::AUTO_WRITE
48 ),
49 mesh
50);
51
53
54mesh.setFluxRequired(p.name());
55
56const dimensionedScalar rhoMax("rhoMax", dimDensity, GREAT, simple.dict());
57const dimensionedScalar rhoMin("rhoMin", dimDensity, Zero, simple.dict());
58
59Info<< "Creating turbulence model\n" << endl;
60autoPtr<compressible::turbulenceModel> turbulence
61(
62 compressible::turbulenceModel::New
63 (
64 rho,
65 U,
66 phi,
67 thermo
68 )
69);
70
71Info<< "Creating reaction model\n" << endl;
72autoPtr<CombustionModel<rhoReactionThermo>> reaction
73(
74 CombustionModel<rhoReactionThermo>::New(thermo, turbulence())
75);
76
77Info<< "Creating multi-variate interpolation scheme\n" << endl;
78multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
79
81{
82 fields.add(Y[i]);
83}
84fields.add(thermo.he());
85
86volScalarField Qdot
87(
88 IOobject
89 (
90 "Qdot",
91 runTime.timeName(),
92 mesh,
93 IOobject::NO_READ,
94 IOobject::AUTO_WRITE
95 ),
96 mesh,
97 dimensionedScalar(dimEnergy/dimVolume/dimTime, Zero)
98);
99
100#include "createMRF.H"
101#include "createRadiationModel.H"
102#include "createClouds.H"
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
const dimensionedScalar rhoMin
const dimensionedScalar rhoMax
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
const dictionary & simple
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)
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