createFields.H
Go to the documentation of this file.
1 #include "readGravitationalAcceleration.H"
2 
3 Info<< "Creating combustion model\n" << endl;
4 
5 autoPtr<combustionModels::rhoCombustionModel> combustion
6 (
8 );
9 
10 rhoReactionThermo& thermo = combustion->thermo();
11 thermo.validate(args.executable(), "h", "e");
12 
13 SLGThermo slgThermo(mesh, thermo);
14 
15 basicSpecieMixture& composition = thermo.composition();
16 PtrList<volScalarField>& Y = composition.Y();
17 
18 const word inertSpecie(thermo.lookup("inertSpecie"));
19 
20 if (!composition.contains(inertSpecie))
21 {
23  << "Specified inert specie '" << inertSpecie << "' not found in "
24  << "species list. Available species:" << composition.species()
25  << exit(FatalError);
26 }
27 
28 volScalarField& p = thermo.p();
29 
31 (
32  IOobject
33  (
34  "rho",
35  runTime.timeName(),
36  mesh,
37  IOobject::NO_READ,
38  IOobject::AUTO_WRITE
39  ),
40  thermo.rho()
41 );
42 
43 Info<< "\nReading field U\n" << endl;
45 (
46  IOobject
47  (
48  "U",
49  runTime.timeName(),
50  mesh,
51  IOobject::MUST_READ,
52  IOobject::AUTO_WRITE
53  ),
54  mesh
55 );
56 
57 #include "compressibleCreatePhi.H"
58 
59 mesh.setFluxRequired(p.name());
60 
62 (
63  dimensionedScalar::lookupOrDefault
64  (
65  "rhoMax",
66  simple.dict(),
67  dimDensity,
68  GREAT
69  )
70 );
71 
73 (
74  dimensionedScalar::lookupOrDefault
75  (
76  "rhoMin",
77  simple.dict(),
78  dimDensity,
79  0
80  )
81 );
82 
83 Info<< "Creating turbulence model\n" << endl;
84 autoPtr<compressible::turbulenceModel> turbulence
85 (
87  (
88  rho,
89  U,
90  phi,
91  thermo
92  )
93 );
94 
95 // Set the turbulence into the combustion model
96 combustion->setTurbulence(turbulence());
97 
98 Info<< "Creating multi-variate interpolation scheme\n" << endl;
99 multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
100 
101 forAll(Y, i)
102 {
103  fields.add(Y[i]);
104 }
105 fields.add(thermo.he());
106 
108 (
109  IOobject
110  (
111  "dQ",
112  runTime.timeName(),
113  mesh,
114  IOobject::NO_READ,
115  IOobject::AUTO_WRITE
116  ),
117  mesh,
119 );
120 
121 #include "createMRF.H"
122 #include "createRadiationModel.H"
123 #include "createClouds.H"
autoPtr< compressible::turbulenceModel > turbulence
Definition: createFields.H:23
surfaceScalarField & phi
PtrList< dimensionedScalar > rhoMax(fluidRegions.size())
forAll(Y, i)
Definition: createFields.H:99
Info<< "Creating combustion model\n"<< endl;autoPtr< combustionModels::psiCombustionModel > combustion(combustionModels::psiCombustionModel::New(mesh))
errorManipArg< error, int > exit(error &err, const int errNo=1)
Definition: errorManip.H:124
error FatalError
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Definition: error.H:319
SLGThermo slgThermo(mesh, thermo)
PtrList< dimensionedScalar > rhoMin(fluidRegions.size())
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:253
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:55
const word & executable() const
Name of executable without the path.
Definition: argListI.H:30
multivariateSurfaceInterpolationScheme< scalar >::fieldTable fields
Definition: createFields.H:97
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions)
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:52
rho
Definition: createFields.H:81
dynamicFvMesh & mesh
volScalarField dQ(IOobject("dQ", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE), mesh, dimensionedScalar("dQ", dimEnergy/dimTime, 0.0))
volVectorField U(IOobject("U", runTime.timeName(), runTime, IOobject::NO_READ, IOobject::NO_WRITE), mesh, dimensionedVector("zero", dimVelocity, Zero))
const dimensionSet dimEnergy
const dimensionSet dimDensity
const dictionary & simple
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
Definition: dimensionSets.H:51
messageStream Info
Foam::argList args(argc, argv)
const word inertSpecie(thermo.lookup("inertSpecie"))
Creates and initialises the face-flux field phi.