createFields.H
Go to the documentation of this file.
1 Info<< "Reading thermophysical properties\n" << endl;
2 
3 autoPtr<psiuMulticomponentThermo> pThermo
4 (
6 );
7 psiuMulticomponentThermo& thermo = pThermo();
8 thermo.validate(args.executable(), "ha", "ea");
9 
11 (
12  IOobject
13  (
14  "rho",
15  runTime.name(),
16  mesh,
17  IOobject::NO_READ,
18  IOobject::AUTO_WRITE
19  ),
20  thermo.renameRho()
21 );
22 
24 
26 Info<< "min(b) = " << min(b).value() << endl;
27 
28 Info<< "\nReading field U\n" << endl;
30 (
31  IOobject
32  (
33  "U",
34  runTime.name(),
35  mesh,
36  IOobject::MUST_READ,
37  IOobject::AUTO_WRITE
38  ),
39  mesh
40 );
41 
42 #include "compressibleCreatePhi.H"
43 
44 mesh.schemes().setFluxRequired(p.name());
45 
46 Info<< "Creating turbulence model\n" << endl;
47 autoPtr<compressible::RASModel> turbulence
48 (
49  compressible::New<compressible::RASModel>
50  (
51  rho,
52  U,
53  phi,
54  thermo
55  )
56 );
57 
58 Info<< "Creating thermophysical transport model\n" << endl;
59 turbulenceThermophysicalTransportModels::unityLewisEddyDiffusivity
60 <
61  RASThermophysicalTransportModel
62  <
63  ThermophysicalTransportModel
64  <
65  compressibleMomentumTransportModel,
66  fluidThermo
67  >
68  >
70 
71 Info<< "Creating field dpdt\n" << endl;
72 volScalarField dpdt
73 (
74  IOobject
75  (
76  "dpdt",
77  runTime.name(),
78  mesh
79  ),
80  mesh,
81  dimensionedScalar(p.dimensions()/dimTime, 0)
82 );
83 
84 Info<< "Creating field kinetic energy K\n" << endl;
85 volScalarField K("K", 0.5*magSqr(U));
86 
87 
88 Info<< "Creating the unstrained laminar flame speed\n" << endl;
89 autoPtr<laminarFlameSpeed> unstrainedLaminarFlameSpeed
90 (
92 );
93 
94 
95 Info<< "Reading strained laminar flame speed field Su\n" << endl;
97 (
98  IOobject
99  (
100  "Su",
101  runTime.name(),
102  mesh,
103  IOobject::MUST_READ,
104  IOobject::AUTO_WRITE
105  ),
106  mesh
107 );
108 
109 Info<< "Reading field betav\n" << endl;
110 volScalarField betav
111 (
112  IOobject
113  (
114  "betav",
115  mesh.facesInstance(),
116  mesh,
117  IOobject::MUST_READ,
118  IOobject::NO_WRITE
119  ),
120  mesh
121 );
122 
123 Info<< "Reading field Lobs\n" << endl;
124 volScalarField Lobs
125 (
126  IOobject
127  (
128  "Lobs",
129  mesh.facesInstance(),
130  mesh,
131  IOobject::MUST_READ,
132  IOobject::NO_WRITE
133  ),
134  mesh
135 );
136 
137 Info<< "Reading field CT\n" << endl;
139 (
140  IOobject
141  (
142  "CT",
143  mesh.facesInstance(),
144  mesh,
145  IOobject::MUST_READ,
146  IOobject::NO_WRITE
147  ),
148  mesh
149 );
150 
151 Info<< "Reading field Nv\n" << endl;
153 (
154  IOobject
155  (
156  "Nv",
157  mesh.facesInstance(),
158  mesh,
159  IOobject::MUST_READ,
160  IOobject::NO_WRITE
161  ),
162  mesh
163 );
164 
165 Info<< "Reading field nsv\n" << endl;
167 (
168  IOobject
169  (
170  "nsv",
171  mesh.facesInstance(),
172  mesh,
173  IOobject::MUST_READ,
174  IOobject::NO_WRITE
175  ),
176  mesh
177 );
178 
179 IOdictionary PDRProperties
180 (
181  IOobject
182  (
183  "PDRProperties",
184  runTime.constant(),
185  mesh,
186  IOobject::MUST_READ_IF_MODIFIED,
187  IOobject::NO_WRITE
188  )
189 );
190 
191 //- Create the drag model
192 autoPtr<PDRDragModel> drag = PDRDragModel::New
193 (
194  PDRProperties,
195  turbulence,
196  rho,
197  U,
198  phi
199 );
200 
201 //- Create the flame-wrinkling model
202 autoPtr<XiModel> flameWrinkling = XiModel::New
203 (
204  PDRProperties,
205  thermo,
206  turbulence,
207  Su,
208  rho,
209  b,
210  phi
211 );
212 
213 Info<< "Calculating turbulent flame speed field St\n" << endl;
215 (
216  IOobject
217  (
218  "St",
219  runTime.name(),
220  mesh,
221  IOobject::NO_READ,
222  IOobject::AUTO_WRITE
223  ),
224  flameWrinkling->Xi()*Su
225 );
226 
227 
228 multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
229 
230 if (thermo.containsSpecie("ft"))
231 {
232  fields.add(thermo.Y("ft"));
233 }
234 
235 fields.add(b);
236 fields.add(thermo.he());
237 fields.add(thermo.heu());
239 
240 #include "createMRF.H"
241 #include "createFvModels.H"
242 #include "createFvConstraints.H"
const word & executable() const
Name of executable without the path.
Definition: argListI.H:36
Creates and initialises the face-flux field phi.
volScalarField & p
Definition: createFields.H:23
autoPtr< XiModel > flameWrinkling
Create the flame-wrinkling model.
Definition: createFields.H:202
Info<< "Creating field dpdt\n"<< endl;volScalarField dpdt(IOobject("dpdt", runTime.name(), mesh), mesh, dimensionedScalar(p.dimensions()/dimTime, 0));Info<< "Creating field kinetic energy K\n"<< endl;volScalarField K("K", 0.5 *magSqr(U));Info<< "Creating the unstrained laminar flame speed\n"<< endl;autoPtr< laminarFlameSpeed > unstrainedLaminarFlameSpeed(laminarFlameSpeed::New(thermo))
volScalarField & b
Definition: createFields.H:25
Info<< "Reading strained laminar flame speed field Su\n"<< endl;volScalarField Su(IOobject("Su", runTime.name(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE), mesh);Info<< "Reading field betav\n"<< endl;volScalarField betav(IOobject("betav", mesh.facesInstance(), mesh, IOobject::MUST_READ, IOobject::NO_WRITE), mesh);Info<< "Reading field Lobs\n"<< endl;volScalarField Lobs(IOobject("Lobs", mesh.facesInstance(), mesh, IOobject::MUST_READ, IOobject::NO_WRITE), mesh);Info<< "Reading field CT\n"<< endl;volSymmTensorField CT(IOobject("CT", mesh.facesInstance(), mesh, IOobject::MUST_READ, IOobject::NO_WRITE), mesh);Info<< "Reading field Nv\n"<< endl;volScalarField Nv(IOobject("Nv", mesh.facesInstance(), mesh, IOobject::MUST_READ, IOobject::NO_WRITE), mesh);Info<< "Reading field nsv\n"<< endl;volSymmTensorField nsv(IOobject("nsv", mesh.facesInstance(), mesh, IOobject::MUST_READ, IOobject::NO_WRITE), mesh);IOdictionary PDRProperties(IOobject("PDRProperties", runTime.constant(), mesh, IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE));autoPtr< PDRDragModel > drag
Definition: createFields.H:192
Info<< "Creating thermophysical transport model\n"<< endl;turbulenceThermophysicalTransportModels::unityLewisEddyDiffusivity< RASThermophysicalTransportModel< ThermophysicalTransportModel< compressibleMomentumTransportModel, fluidThermo > >> thermophysicalTransport(turbulence(), thermo, true)
Info<< "Calculating turbulent flame speed field St\n"<< endl;volScalarField St(IOobject("St", runTime.name(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE), flameWrinkling->Xi() *Su);multivariateSurfaceInterpolationScheme< scalar >::fieldTable fields
Definition: createFields.H:228
K
Definition: pEqn.H:75
autoPtr< CompressibleMomentumTransportModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const viscosity &viscosity)
tmp< VolField< Type > > Su(const VolField< Type > &su, const VolField< Type > &vf)
Definition: fvcSup.C:44
VolField< vector > volVectorField
Definition: volFieldsFwd.H:65
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:257
messageStream Info
layerAndWeight min(const layerAndWeight &a, const layerAndWeight &b)
const dimensionSet dimTime
VolField< scalar > volScalarField
Definition: volFieldsFwd.H:64
VolField< symmTensor > volSymmTensorField
Definition: volFieldsFwd.H:67
dimensioned< scalar > magSqr(const dimensioned< Type > &)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
Foam::argList args(argc, argv)
autoPtr< incompressible::momentumTransportModel > turbulence(incompressible::momentumTransportModel::New(U, phi, viscosity))
volScalarField rho(IOobject("rho", runTime.name(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE), thermo.renameRho())
volVectorField U(IOobject("U", runTime.name(), mesh, IOobject::NO_READ, IOobject::NO_WRITE), mesh, dimensionedVector(dimVelocity, Zero))
fluidMulticomponentThermo & thermo
Definition: createFields.H:31
Info<< "Reading thermophysical properties\n"<< endl;autoPtr< fluidMulticomponentThermo > pThermo(fluidMulticomponentThermo::New(mesh))