createFields.H
Go to the documentation of this file.
2 
3 Info<< "Reading thermophysical properties\n" << endl;
4 
5 autoPtr<psiuMulticomponentThermo> pThermo
6 (
8 );
9 psiuMulticomponentThermo& thermo = pThermo();
10 thermo.validate(args.executable(), "ha", "ea");
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  combustionProperties.subDict("laminarFlameSpeed"),
96  thermo
97  )
98 );
99 
100 
101 Info<< "Reading strained laminar flame speed field Su\n" << endl;
103 (
104  IOobject
105  (
106  "Su",
107  runTime.name(),
108  mesh,
109  IOobject::MUST_READ,
110  IOobject::AUTO_WRITE
111  ),
112  mesh
113 );
114 
115 Info<< "Reading field betav\n" << endl;
116 volScalarField betav
117 (
118  IOobject
119  (
120  "betav",
122  mesh,
123  IOobject::MUST_READ,
124  IOobject::NO_WRITE
125  ),
126  mesh
127 );
128 
129 Info<< "Reading field Lobs\n" << endl;
130 volScalarField Lobs
131 (
132  IOobject
133  (
134  "Lobs",
136  mesh,
137  IOobject::MUST_READ,
138  IOobject::NO_WRITE
139  ),
140  mesh
141 );
142 
143 Info<< "Reading field CT\n" << endl;
145 (
146  IOobject
147  (
148  "CT",
150  mesh,
151  IOobject::MUST_READ,
152  IOobject::NO_WRITE
153  ),
154  mesh
155 );
156 
157 Info<< "Reading field Nv\n" << endl;
159 (
160  IOobject
161  (
162  "Nv",
164  mesh,
165  IOobject::MUST_READ,
166  IOobject::NO_WRITE
167  ),
168  mesh
169 );
170 
171 Info<< "Reading field nsv\n" << endl;
173 (
174  IOobject
175  (
176  "nsv",
178  mesh,
179  IOobject::MUST_READ,
180  IOobject::NO_WRITE
181  ),
182  mesh
183 );
184 
185 IOdictionary PDRProperties
186 (
187  IOobject
188  (
189  "PDRProperties",
190  runTime.constant(),
191  mesh,
192  IOobject::MUST_READ_IF_MODIFIED,
193  IOobject::NO_WRITE
194  )
195 );
196 
197 //- Create the drag model
198 autoPtr<PDRDragModel> drag = PDRDragModel::New
199 (
200  PDRProperties,
201  turbulence,
202  rho,
203  U,
204  phi
205 );
206 
207 //- Create the flame-wrinkling model
208 autoPtr<XiModel> flameWrinkling = XiModel::New
209 (
210  PDRProperties,
211  thermo,
212  turbulence,
213  Su,
214  rho,
215  b,
216  phi
217 );
218 
219 Info<< "Calculating turbulent flame speed field St\n" << endl;
221 (
222  IOobject
223  (
224  "St",
225  runTime.name(),
226  mesh,
227  IOobject::NO_READ,
228  IOobject::AUTO_WRITE
229  ),
230  flameWrinkling->Xi()*Su
231 );
232 
233 
234 multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
235 
236 if (thermo.containsSpecie("ft"))
237 {
238  fields.add(thermo.Y("ft"));
239 }
240 
241 fields.add(b);
242 fields.add(thermo.he());
243 fields.add(thermo.heu());
245 
246 #include "createMRF.H"
247 #include "createFvModels.H"
248 #include "createFvConstraints.H"
const word & executable() const
Name of executable without the path.
Definition: argListI.H:36
Base class for Lagrangian drag models.
const fvSchemes & schemes() const
Return the fvSchemes.
Definition: fvMesh.C:1799
void setFluxRequired(const word &name) const
Definition: fvSchemes.C:447
const fileName & facesInstance() const
Return the current instance directory for faces.
Definition: polyMesh.C:994
Creates and initialises the face-flux field phi.
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
volScalarField & p
Definition: createFields.H:25
autoPtr< XiModel > flameWrinkling
Create the flame-wrinkling model.
Definition: createFields.H:208
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(combustionProperties.subDict("laminarFlameSpeed"), thermo))
volScalarField & b
Definition: createFields.H:27
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:234
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:63
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:258
messageStream Info
layerAndWeight min(const layerAndWeight &a, const layerAndWeight &b)
const dimensionSet dimTime
VolField< scalar > volScalarField
Definition: volFieldsFwd.H:62
void magSqr(LagrangianPatchField< scalar > &f, const LagrangianPatchField< Type > &f1)
VolField< symmTensor > volSymmTensorField
Definition: volFieldsFwd.H:65
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))