createFields.H
Go to the documentation of this file.
1 Info<< "Creating combustion model\n" << endl;
2 
3 autoPtr<combustionModels::psiCombustionModel> combustion
4 (
6  (
7  mesh
8  )
9 );
10 
11 Info<< "Reading thermophysical properties\n" << endl;
12 
13 psiReactionThermo& thermo = combustion->thermo();
14 thermo.validate(args.executable(), "h", "e");
15 
16 SLGThermo slgThermo(mesh, thermo);
17 
18 basicMultiComponentMixture& composition = thermo.composition();
19 PtrList<volScalarField>& Y = composition.Y();
20 
21 const word inertSpecie(thermo.lookup("inertSpecie"));
22 
23 Info<< "Creating field rho\n" << endl;
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 
37 volScalarField& p = thermo.p();
38 
39 Info<< "\nReading field U\n" << endl;
41 (
42  IOobject
43  (
44  "U",
45  runTime.timeName(),
46  mesh,
47  IOobject::MUST_READ,
48  IOobject::AUTO_WRITE
49  ),
50  mesh
51 );
52 
53 #include "compressibleCreatePhi.H"
54 
55 #include "createMRF.H"
56 
57 
58 Info<< "Creating turbulence model\n" << endl;
59 autoPtr<compressible::turbulenceModel> turbulence
60 (
62  (
63  rho,
64  U,
65  phi,
66  thermo
67  )
68 );
69 
70 // Set the turbulence into the combustion model
71 combustion->setTurbulence(turbulence());
72 
73 
74 #include "readGravitationalAcceleration.H"
75 #include "readhRef.H"
76 #include "gh.H"
77 #include "readpRef.H"
78 
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 
92 mesh.setFluxRequired(p_rgh.name());
93 
94 #include "phrghEqn.H"
95 
96 
97 multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
98 
99 forAll(Y, i)
100 {
101  fields.add(Y[i]);
102 }
103 fields.add(thermo.he());
104 
105 IOdictionary additionalControlsDict
106 (
107  IOobject
108  (
109  "additionalControls",
110  runTime.constant(),
111  mesh,
112  IOobject::MUST_READ_IF_MODIFIED,
113  IOobject::NO_WRITE
114  )
115 );
116 
117 Switch solvePrimaryRegion
118 (
119  additionalControlsDict.lookup("solvePrimaryRegion")
120 );
121 
123 (
124  additionalControlsDict.lookupOrDefault<bool>("solvePyrolysisRegion", true)
125 );
126 
128 (
129  IOobject
130  (
131  "dQ",
132  runTime.timeName(),
133  mesh,
134  IOobject::NO_READ,
135  IOobject::AUTO_WRITE
136  ),
137  mesh,
139 );
140 
141 
142 Info<< "Creating field dpdt\n" << endl;
144 (
145  IOobject
146  (
147  "dpdt",
148  runTime.timeName(),
149  mesh
150  ),
151  mesh,
152  dimensionedScalar("dpdt", p.dimensions()/dimTime, 0)
153 );
154 
155 Info<< "Creating field kinetic energy K\n" << endl;
156 volScalarField K("K", 0.5*magSqr(U));
157 
158 #include "createClouds.H"
159 #include "createSurfaceFilmModel.H"
160 #include "createPyrolysisModel.H"
161 #include "createRadiationModel.H"
autoPtr< compressible::turbulenceModel > turbulence
Definition: createFields.H:23
Switch solvePrimaryRegion(additionalControlsDict.lookup("solvePrimaryRegion"))
surfaceScalarField & phi
forAll(Y, i)
Definition: createFields.H:99
Info<< "Creating combustion model\n"<< endl;autoPtr< combustionModels::psiCombustionModel > combustion(combustionModels::psiCombustionModel::New(mesh))
volScalarField p_rgh(IOobject("p_rgh", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE), mesh)
SLGThermo slgThermo(mesh, thermo)
Switch solvePyrolysisRegion(additionalControlsDict.lookupOrDefault< bool >("solvePyrolysisRegion", true))
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:253
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:55
CGAL::Exact_predicates_exact_constructions_kernel K
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))
volScalarField & dpdt
dimensioned< scalar > magSqr(const dimensioned< Type > &)
const dimensionSet dimEnergy
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.
IOdictionary additionalControlsDict(IOobject("additionalControls", runTime.constant(), mesh, IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE))