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 
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.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 the unstrained laminar flame speed\n" << endl;
62 autoPtr<laminarFlameSpeed> unstrainedLaminarFlameSpeed
63 (
65 );
66 
67 
68 Info<< "Reading strained laminar flame speed field Su\n" << endl;
70 (
71  IOobject
72  (
73  "Su",
74  runTime.timeName(),
75  mesh,
76  IOobject::MUST_READ,
77  IOobject::AUTO_WRITE
78  ),
79  mesh
80 );
81 
82 Info<< "Reading field betav\n" << endl;
84 (
85  IOobject
86  (
87  "betav",
88  mesh.facesInstance(),
89  mesh,
90  IOobject::MUST_READ,
91  IOobject::NO_WRITE
92  ),
93  mesh
94 );
95 
96 Info<< "Reading field Lobs\n" << endl;
97 volScalarField Lobs
98 (
99  IOobject
100  (
101  "Lobs",
102  mesh.facesInstance(),
103  mesh,
104  IOobject::MUST_READ,
105  IOobject::NO_WRITE
106  ),
107  mesh
108 );
109 
110 Info<< "Reading field CT\n" << endl;
112 (
113  IOobject
114  (
115  "CT",
116  mesh.facesInstance(),
117  mesh,
118  IOobject::MUST_READ,
119  IOobject::NO_WRITE
120  ),
121  mesh
122 );
123 
124 Info<< "Reading field Nv\n" << endl;
126 (
127  IOobject
128  (
129  "Nv",
130  mesh.facesInstance(),
131  mesh,
132  IOobject::MUST_READ,
133  IOobject::NO_WRITE
134  ),
135  mesh
136 );
137 
138 Info<< "Reading field nsv\n" << endl;
140 (
141  IOobject
142  (
143  "nsv",
144  mesh.facesInstance(),
145  mesh,
146  IOobject::MUST_READ,
147  IOobject::NO_WRITE
148  ),
149  mesh
150 );
151 
152 IOdictionary PDRProperties
153 (
154  IOobject
155  (
156  "PDRProperties",
157  runTime.constant(),
158  mesh,
159  IOobject::MUST_READ_IF_MODIFIED,
160  IOobject::NO_WRITE
161  )
162 );
163 
164 //- Create the drag model
165 autoPtr<PDRDragModel> drag = PDRDragModel::New
166 (
167  PDRProperties,
168  *turbulence,
169  rho,
170  U,
171  phi
172 );
173 
174 //- Create the flame-wrinkling model
175 autoPtr<XiModel> flameWrinkling = XiModel::New
176 (
177  PDRProperties,
178  thermo,
179  *turbulence,
180  Su,
181  rho,
182  b,
183  phi
184 );
185 
186 Info<< "Calculating turbulent flame speed field St\n" << endl;
188 (
189  IOobject
190  (
191  "St",
192  runTime.timeName(),
193  mesh,
194  IOobject::NO_READ,
195  IOobject::AUTO_WRITE
196  ),
197  flameWrinkling->Xi()*Su
198 );
199 
200 
201 multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
202 
203 if (composition.contains("ft"))
204 {
205  fields.add(composition.Y("ft"));
206 }
207 
208 fields.add(b);
209 fields.add(thermo.he());
210 fields.add(thermo.heu());
211 flameWrinkling->addXi(fields);
212 
213 #include "createDpdt.H"
214 
215 #include "createK.H"
216 
217 #include "createMRF.H"
218 #include "createFvOptions.H"
runTime
engineTime & runTime
Definition: createEngineTime.H:13
drag
Info<< "Reading strained laminar flame speed field Su\n"<< endl;volScalarField Su(IOobject("Su", runTime.timeName(), 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:165
U
volVectorField U(IOobject("U", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE), mesh, dimensionedVector(dimVelocity, Zero))
turbulence
Info<< "Reading field U\n"<< 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("pos", dimless, 1.0));surfaceScalarField neg(IOobject("neg", runTime.timeName(), mesh), mesh, dimensionedScalar("neg", dimless, -1.0));surfaceScalarField phi("phi", fvc::flux(rhoU));Info<< "Creating turbulence model\n"<< endl;autoPtr< compressible::turbulenceModel > turbulence(compressible::turbulenceModel::New(rho, U, phi, thermo))
Definition: createFields.H:94
thermo
Basic thermodynamics type based on the use of fitting functions for cp, h, s obtained from the templa...
rho
rho
Definition: createFields.H:81
Foam::endl
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:369
Foam::min
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
Definition: hashSets.C:33
createFvOptions.H
Su
zeroField Su
Definition: alphaSuSp.H:1
Foam::volSymmTensorField
GeometricField< symmTensor, fvPatchField, volMesh > volSymmTensorField
Definition: volFieldsFwd.H:65
Foam::Info
messageStream Info
Information stream (stdout output on master, null elsewhere)
phi
surfaceScalarField & phi
Definition: setRegionFluidFields.H:8
b
volScalarField & b
Wien displacement law constant: default SI units: [m.K].
Definition: createFields.H:27
Foam::volScalarField
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:57
createK.H
p
volScalarField & p
Definition: createFields.H:23
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:6
compressibleCreatePhi.H
Creates and initialises the face-flux field phi.
betav
const volScalarField & betav
Definition: setRegionSolidFields.H:35
flameWrinkling
autoPtr< XiModel > flameWrinkling
Create the flame-wrinkling model.
Definition: createFields.H:175
Foam::volVectorField
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:62
Foam::New
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions)
Global function forwards to reuseTmpDimensionedField::New.
Definition: DimensionedFieldReuseFunctions.H:105
createDpdt.H
Foam::argList::executable
const word & executable() const noexcept
Name of executable without the path.
Definition: argListI.H:51
unstrainedLaminarFlameSpeed
Info<< "Creating the unstrained laminar flame speed\n"<< endl;autoPtr< laminarFlameSpeed > unstrainedLaminarFlameSpeed(laminarFlameSpeed::New(thermo))
args
Foam::argList args(argc, argv)
fields
multivariateSurfaceInterpolationScheme< scalar >::fieldTable fields
Definition: createFields.H:97
composition
basicSpecieMixture & composition
Definition: createFields.H:8
pThermo
Info<< "Reading thermophysical properties\n"<< endl;autoPtr< psiReactionThermo > pThermo(psiReactionThermo::New(mesh))