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