createFields.H
Go to the documentation of this file.
1#include "readGravitationalAcceleration.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 (!composition.species().found(inertSpecie))
15{
17 << "Inert specie " << inertSpecie << " not found in available species "
18 << composition.species()
19 << exit(FatalIOError);
20}
21
22volScalarField& p = thermo.p();
23
24volScalarField rho
25(
26 IOobject
27 (
28 "rho",
29 runTime.timeName(),
30 mesh,
31 IOobject::NO_READ,
32 IOobject::AUTO_WRITE
33 ),
34 thermo.rho()
35);
36
37Info<< "\nReading field U\n" << endl;
38volVectorField U
39(
40 IOobject
41 (
42 "U",
43 runTime.timeName(),
44 mesh,
45 IOobject::MUST_READ,
46 IOobject::AUTO_WRITE
47 ),
48 mesh
49);
50
52
53mesh.setFluxRequired(p.name());
54
55const dimensionedScalar rhoMax("rhoMax", dimDensity, GREAT, simple.dict());
56const dimensionedScalar rhoMin("rhoMin", dimDensity, Zero, simple.dict());
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
76Info<< "Creating multi-variate interpolation scheme\n" << endl;
77multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
78
80{
81 fields.add(Y[i]);
82}
83fields.add(thermo.he());
84
85volScalarField Qdot
86(
87 IOobject
88 (
89 "Qdot",
90 runTime.timeName(),
91 mesh,
92 IOobject::READ_IF_PRESENT,
93 IOobject::AUTO_WRITE
94 ),
95 mesh,
96 dimensionedScalar(dimEnergy/dimVolume/dimTime, Zero)
97);
98
99#include "createMRF.H"
100#include "createRadiationModel.H"
101#include "createClouds.H"
102#include "createFvOptions.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
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)
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