createFields.H
Go to the documentation of this file.
1 Info<< "Reading thermophysical properties\n" << endl;
2 
3 autoPtr<psiuReactionThermo> pThermo
4 (
6 );
7 psiuReactionThermo& thermo = pThermo();
8 thermo.validate(args.executable(), "ha", "ea");
9 
10 basicCombustionMixture& composition = thermo.composition();
11 
13 (
14  IOobject
15  (
16  "rho",
17  runTime.timeName(),
18  mesh,
19  IOobject::NO_READ,
20  IOobject::AUTO_WRITE
21  ),
22  thermo.rho()
23 );
24 
25 volScalarField& p = thermo.p();
26 
27 volScalarField& b = composition.Y("b");
28 Info<< "min(b) = " << min(b).value() << endl;
29 
30 Info<< "\nReading field U\n" << endl;
32 (
33  IOobject
34  (
35  "U",
36  runTime.timeName(),
37  mesh,
38  IOobject::MUST_READ,
39  IOobject::AUTO_WRITE
40  ),
41  mesh
42 );
43 
44 #include "compressibleCreatePhi.H"
45 
46 mesh.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 autoPtr<RASFluidThermophysicalTransportModel>
63 (
65  (
66  turbulence(),
67  thermo
68  )
69 );
70 
71 Info<< "Creating field dpdt\n" << endl;
73 (
74  IOobject
75  (
76  "dpdt",
77  runTime.timeName(),
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.timeName(),
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.timeName(),
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 (composition.contains("ft"))
231 {
232  fields.add(composition.Y("ft"));
233 }
234 
235 fields.add(b);
236 fields.add(thermo.he());
237 fields.add(thermo.heu());
238 flameWrinkling->addXi(fields);
239 
240 #include "createMRF.H"
241 #include "createFvModels.H"
242 #include "createFvConstraints.H"
GeometricField< symmTensor, fvPatchField, volMesh > volSymmTensorField
Definition: volFieldsFwd.H:61
const word & executable() const
Name of executable without the path.
Definition: argListI.H:36
Info<< "Reading thermophysical properties\"<< endl;autoPtr< fluidReactionThermo > pThermo(fluidReactionThermo::New(mesh))
engineTime & runTime
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:251
Info<< "Calculating turbulent flame speed field St\"<< endl;volScalarField St(IOobject("St", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE), flameWrinkling->Xi() *Su);multivariateSurfaceInterpolationScheme< scalar >::fieldTable fields
Definition: createFields.H:228
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:58
CGAL::Exact_predicates_exact_constructions_kernel K
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:57
volScalarField & dpdt
Info<< "Creating field dpdt\"<< endl;volScalarField dpdt(IOobject("dpdt", runTime.timeName(), mesh), mesh, dimensionedScalar(p.dimensions()/dimTime, 0));Info<< "Creating field kinetic energy K\"<< endl;volScalarField K("K", 0.5 *magSqr(U));Info<< "Creating the unstrained laminar flame speed\"<< endl;autoPtr< laminarFlameSpeed > unstrainedLaminarFlameSpeed(laminarFlameSpeed::New(thermo))
Definition: createFields.H:90
rho
Definition: createFields.H:81
const dimensionSet dimTime
dynamicFvMesh & mesh
autoPtr< BasicCompressibleMomentumTransportModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const typename BasicCompressibleMomentumTransportModel::transportModel &transport)
phi
Definition: correctPhi.H:3
dimensioned< scalar > magSqr(const dimensioned< Type > &)
Info<< "Reading field U\"<< endl;volVectorField U(IOobject("U", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE), mesh);volScalarField rho(IOobject("rho", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE), thermo.rho());volVectorField rhoU(IOobject("rhoU", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE), rho *U);volScalarField rhoE(IOobject("rhoE", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE), rho *(e+0.5 *magSqr(U)));surfaceScalarField pos(IOobject("pos", runTime.timeName(), mesh), mesh, dimensionedScalar(dimless, 1.0));surfaceScalarField neg(IOobject("neg", runTime.timeName(), mesh), mesh, dimensionedScalar(dimless, -1.0));surfaceScalarField phi("phi", fvc::flux(rhoU));Info<< "Creating turbulence model\"<< endl;autoPtr< compressible::momentumTransportModel > turbulence(compressible::momentumTransportModel::New(rho, U, phi, thermo))
Definition: createFields.H:94
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
Info<< "Creating thermophysical transport model\"<< endl;autoPtr< fluidThermophysicalTransportModel > thermophysicalTransport(fluidThermophysicalTransportModel::New(turbulence(), thermo))
volVectorField U(IOobject("U", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE), mesh, dimensionedVector(dimVelocity, Zero))
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
messageStream Info
const tmp< volScalarField::Internal > & Su
Definition: alphaSuSp.H:6
Foam::argList args(argc, argv)
Creates and initialises the face-flux field phi.