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 basicSpecieMixture& 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 
61 Info<< "Creating field dpdt\n" << endl;
63 (
64  IOobject
65  (
66  "dpdt",
67  runTime.timeName(),
68  mesh
69  ),
70  mesh,
71  dimensionedScalar(p.dimensions()/dimTime, 0)
72 );
73 
74 Info<< "Creating field kinetic energy K\n" << endl;
75 volScalarField K("K", 0.5*magSqr(U));
76 
77 
78 Info<< "Creating the unstrained laminar flame speed\n" << endl;
79 autoPtr<laminarFlameSpeed> unstrainedLaminarFlameSpeed
80 (
82 );
83 
84 
85 Info<< "Reading strained laminar flame speed field Su\n" << endl;
87 (
88  IOobject
89  (
90  "Su",
91  runTime.timeName(),
92  mesh,
93  IOobject::MUST_READ,
94  IOobject::AUTO_WRITE
95  ),
96  mesh
97 );
98 
99 Info<< "Reading field betav\n" << endl;
101 (
102  IOobject
103  (
104  "betav",
105  mesh.facesInstance(),
106  mesh,
107  IOobject::MUST_READ,
108  IOobject::NO_WRITE
109  ),
110  mesh
111 );
112 
113 Info<< "Reading field Lobs\n" << endl;
114 volScalarField Lobs
115 (
116  IOobject
117  (
118  "Lobs",
119  mesh.facesInstance(),
120  mesh,
121  IOobject::MUST_READ,
122  IOobject::NO_WRITE
123  ),
124  mesh
125 );
126 
127 Info<< "Reading field CT\n" << endl;
129 (
130  IOobject
131  (
132  "CT",
133  mesh.facesInstance(),
134  mesh,
135  IOobject::MUST_READ,
136  IOobject::NO_WRITE
137  ),
138  mesh
139 );
140 
141 Info<< "Reading field Nv\n" << endl;
143 (
144  IOobject
145  (
146  "Nv",
147  mesh.facesInstance(),
148  mesh,
149  IOobject::MUST_READ,
150  IOobject::NO_WRITE
151  ),
152  mesh
153 );
154 
155 Info<< "Reading field nsv\n" << endl;
157 (
158  IOobject
159  (
160  "nsv",
161  mesh.facesInstance(),
162  mesh,
163  IOobject::MUST_READ,
164  IOobject::NO_WRITE
165  ),
166  mesh
167 );
168 
169 IOdictionary PDRProperties
170 (
171  IOobject
172  (
173  "PDRProperties",
174  runTime.constant(),
175  mesh,
176  IOobject::MUST_READ_IF_MODIFIED,
177  IOobject::NO_WRITE
178  )
179 );
180 
181 //- Create the drag model
182 autoPtr<PDRDragModel> drag = PDRDragModel::New
183 (
184  PDRProperties,
185  turbulence,
186  rho,
187  U,
188  phi
189 );
190 
191 //- Create the flame-wrinkling model
192 autoPtr<XiModel> flameWrinkling = XiModel::New
193 (
194  PDRProperties,
195  thermo,
196  turbulence,
197  Su,
198  rho,
199  b,
200  phi
201 );
202 
203 Info<< "Calculating turbulent flame speed field St\n" << endl;
205 (
206  IOobject
207  (
208  "St",
209  runTime.timeName(),
210  mesh,
211  IOobject::NO_READ,
212  IOobject::AUTO_WRITE
213  ),
214  flameWrinkling->Xi()*Su
215 );
216 
217 
218 multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
219 
220 if (composition.contains("ft"))
221 {
222  fields.add(composition.Y("ft"));
223 }
224 
225 fields.add(b);
226 fields.add(thermo.he());
227 fields.add(thermo.heu());
228 flameWrinkling->addXi(fields);
229 
230 #include "createMRF.H"
231 #include "createFvOptions.H"
GeometricField< symmTensor, fvPatchField, volMesh > volSymmTensorField
Definition: volFieldsFwd.H:58
Info<< "Reading initial conditions.\"<< endl;IOdictionary initialConditions(IOobject("initialConditions", runTime.constant(), mesh, IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE));scalar p0=readScalar(initialConditions.lookup("p"));scalar T0=readScalar(initialConditions.lookup("T"));# 24 "/home/ubuntu/OpenFOAM-7/applications/solvers/combustion/chemFoam/createFields.H" 2 Info<< "Reading thermophysical properties\"<< endl;autoPtr< rhoReactionThermo > pThermo(rhoReactionThermo::New(mesh))
const word & executable() const
Name of executable without the path.
Definition: argListI.H:30
zeroField Su
Definition: alphaSuSp.H:1
surfaceScalarField & phi
engineTime & runTime
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:256
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::turbulenceModel > turbulence(compressible::turbulenceModel::New(rho, U, phi, thermo))
Definition: createFields.H:94
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:55
CGAL::Exact_predicates_exact_constructions_kernel K
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
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:80
rho
Definition: createFields.H:81
dynamicFvMesh & mesh
const volScalarField & betav
dimensioned< scalar > magSqr(const dimensioned< Type > &)
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
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.
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
Definition: dimensionSets.H:51
messageStream Info
Foam::argList args(argc, argv)
Creates and initialises the face-flux field phi.