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 basicMultiComponentMixture& 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 const volScalarField& psi = thermo.psi();
27 
29 Info<< "min(b) = " << min(b).value() << endl;
30 
31 Info<< "\nReading field U\n" << endl;
33 (
34  IOobject
35  (
36  "U",
37  runTime.timeName(),
38  mesh,
39  IOobject::MUST_READ,
40  IOobject::AUTO_WRITE
41  ),
42  mesh
43 );
44 
45 #include "compressibleCreatePhi.H"
46 
47 mesh.setFluxRequired(p.name());
48 
49 Info<< "Creating turbulence model\n" << endl;
50 autoPtr<compressible::RASModel> turbulence
51 (
52  compressible::New<compressible::RASModel>
53  (
54  rho,
55  U,
56  phi,
57  thermo
58  )
59 );
60 
61 
62 Info<< "Creating field dpdt\n" << endl;
64 (
65  IOobject
66  (
67  "dpdt",
68  runTime.timeName(),
69  mesh
70  ),
71  mesh,
72  dimensionedScalar("dpdt", p.dimensions()/dimTime, 0)
73 );
74 
75 Info<< "Creating field kinetic energy K\n" << endl;
76 volScalarField K("K", 0.5*magSqr(U));
77 
78 
79 Info<< "Creating the unstrained laminar flame speed\n" << endl;
80 autoPtr<laminarFlameSpeed> unstrainedLaminarFlameSpeed
81 (
83 );
84 
85 
86 Info<< "Reading strained laminar flame speed field Su\n" << endl;
88 (
89  IOobject
90  (
91  "Su",
92  runTime.timeName(),
93  mesh,
94  IOobject::MUST_READ,
95  IOobject::AUTO_WRITE
96  ),
97  mesh
98 );
99 
100 Info<< "Reading field betav\n" << endl;
102 (
103  IOobject
104  (
105  "betav",
106  mesh.facesInstance(),
107  mesh,
108  IOobject::MUST_READ,
109  IOobject::NO_WRITE
110  ),
111  mesh
112 );
113 
114 Info<< "Reading field Lobs\n" << endl;
115 volScalarField Lobs
116 (
117  IOobject
118  (
119  "Lobs",
120  mesh.facesInstance(),
121  mesh,
122  IOobject::MUST_READ,
123  IOobject::NO_WRITE
124  ),
125  mesh
126 );
127 
128 Info<< "Reading field CT\n" << endl;
130 (
131  IOobject
132  (
133  "CT",
134  mesh.facesInstance(),
135  mesh,
136  IOobject::MUST_READ,
137  IOobject::NO_WRITE
138  ),
139  mesh
140 );
141 
142 Info<< "Reading field Nv\n" << endl;
144 (
145  IOobject
146  (
147  "Nv",
148  mesh.facesInstance(),
149  mesh,
150  IOobject::MUST_READ,
151  IOobject::NO_WRITE
152  ),
153  mesh
154 );
155 
156 Info<< "Reading field nsv\n" << endl;
158 (
159  IOobject
160  (
161  "nsv",
162  mesh.facesInstance(),
163  mesh,
164  IOobject::MUST_READ,
165  IOobject::NO_WRITE
166  ),
167  mesh
168 );
169 
170 IOdictionary PDRProperties
171 (
172  IOobject
173  (
174  "PDRProperties",
175  runTime.constant(),
176  mesh,
177  IOobject::MUST_READ_IF_MODIFIED,
178  IOobject::NO_WRITE
179  )
180 );
181 
182 //- Create the drag model
183 autoPtr<PDRDragModel> drag = PDRDragModel::New
184 (
185  PDRProperties,
186  turbulence,
187  rho,
188  U,
189  phi
190 );
191 
192 //- Create the flame-wrinkling model
193 autoPtr<XiModel> flameWrinkling = XiModel::New
194 (
195  PDRProperties,
196  thermo,
197  turbulence,
198  Su,
199  rho,
200  b,
201  phi
202 );
203 
204 Info<< "Calculating turbulent flame speed field St\n" << endl;
206 (
207  IOobject
208  (
209  "St",
210  runTime.timeName(),
211  mesh,
212  IOobject::NO_READ,
213  IOobject::AUTO_WRITE
214  ),
215  flameWrinkling->Xi()*Su
216 );
217 
218 
219 multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
220 
221 if (composition.contains("ft"))
222 {
223  fields.add(composition.Y("ft"));
224 }
225 
226 fields.add(b);
227 fields.add(thermo.he());
228 fields.add(thermo.heu());
229 flameWrinkling->addXi(fields);
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:183
pThermo
Info<< "Reading thermophysical properties\n"<< endl;autoPtr< psiThermo > pThermo(psiThermo::New(mesh))
Foam::compressible::New
autoPtr< BasicCompressibleTurbulenceModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const typename BasicCompressibleTurbulenceModel::transportModel &transport, const word &propertiesName)
Definition: turbulentFluidThermoModel.C:36
fields
Info<< "Creating field dpdt\n"<< endl;volScalarField dpdt(IOobject("dpdt", runTime.timeName(), mesh), mesh, dimensionedScalar("dpdt", p.dimensions()/dimTime, 0));Info<< "Creating field kinetic energy K\n"<< endl;volScalarField K("K", 0.5 *magSqr(U));volScalarField p_rgh(IOobject("p_rgh", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE), mesh);p_rgh=p - rho *gh;mesh.setFluxRequired(p_rgh.name());multivariateSurfaceInterpolationScheme< scalar >::fieldTable fields
Definition: createFields.H:127
phi
surfaceScalarField & phi
Definition: createFields.H:13
thermo
Basic thermodynamics type based on the use of fitting functions for cp, h, s obtained from the templa...
rho
rho
Definition: createFields.H:79
Foam::endl
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:251
Foam::dimensioned::value
const Type & value() const
Return const reference to value.
Definition: dimensionedType.C:261
dpdt
volScalarField & dpdt
Definition: setRegionFluidFields.H:12
K
CGAL::Exact_predicates_exact_constructions_kernel K
Definition: CGALTriangulation3DKernel.H:56
Foam::dimTime
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
Definition: dimensionSets.H:51
Foam::argList::executable
const word & executable() const
Name of executable without the path.
Definition: argListI.H:30
Foam::fvc::Su
tmp< GeometricField< Type, fvPatchField, volMesh > > Su(const GeometricField< Type, fvPatchField, volMesh > &su, const GeometricField< Type, fvPatchField, volMesh > &vf)
Definition: fvcSup.C:44
Foam::volSymmTensorField
GeometricField< symmTensor, fvPatchField, volMesh > volSymmTensorField
Definition: volFieldsFwd.H:58
turbulence
autoPtr< compressible::turbulenceModel > turbulence
Definition: createFields.H:23
Foam::Info
messageStream Info
psi
const volScalarField & psi
Definition: createFields.H:24
Foam::dimensionedScalar
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
Definition: dimensionedScalarFwd.H:41
b
volScalarField & b
Wien displacement law constant: default SI units: [m.K].
Definition: createFields.H:28
Foam::volScalarField
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:52
p
volScalarField & p
Definition: createFields.H:51
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:18
compressibleCreatePhi.H
Creates and initialises the face-flux field phi.
flameWrinkling
autoPtr< XiModel > flameWrinkling
Create the flame-wrinkling model.
Definition: createFields.H:193
Foam::volVectorField
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:55
unstrainedLaminarFlameSpeed
Info<< "Creating field dpdt\n"<< endl;volScalarField dpdt(IOobject("dpdt", runTime.timeName(), mesh), mesh, dimensionedScalar("dpdt", 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))
Definition: createFields.H:81
composition
basicMultiComponentMixture & composition
Definition: createFields.H:35
betav
const volScalarField & betav
Definition: setRegionSolidFields.H:30
args
Foam::argList args(argc, argv)
U
volVectorField U(IOobject("U", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE), Urel+SRF->U())
Foam::min
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
Foam::magSqr
dimensioned< scalar > magSqr(const dimensioned< Type > &)