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 
25 volScalarField& p = thermo.p();
26 
27 volScalarField& b = composition.Y("b");
28 Info<< "min(b) = " << min(b).value() << endl;
29 
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::turbulenceModel> turbulence
51 (
53  (
54  rho,
55  U,
56  phi,
57  thermo
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("dpdt", 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 Info<< "Creating field Xi\n" << endl;
79 (
80  IOobject
81  (
82  "Xi",
83  runTime.timeName(),
84  mesh,
85  IOobject::MUST_READ,
86  IOobject::AUTO_WRITE
87  ),
88  mesh
89 );
90 
91 
92 Info<< "Creating the unstrained laminar flame speed\n" << endl;
93 autoPtr<laminarFlameSpeed> unstrainedLaminarFlameSpeed
94 (
96 );
97 
98 
99 Info<< "Reading strained laminar flame speed field Su\n" << endl;
101 (
102  IOobject
103  (
104  "Su",
105  runTime.timeName(),
106  mesh,
107  IOobject::MUST_READ,
108  IOobject::AUTO_WRITE
109  ),
110  mesh
111 );
112 
113 dimensionedScalar SuMin = 0.01*Su.average();
114 dimensionedScalar SuMax = 4*Su.average();
115 
116 Info<< "Calculating turbulent flame speed field St\n" << endl;
118 (
119  IOobject
120  (
121  "St",
122  runTime.timeName(),
123  mesh,
124  IOobject::NO_READ,
125  IOobject::AUTO_WRITE
126  ),
127  Xi*Su
128 );
129 
130 
131 multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
132 
133 if (composition.contains("ft"))
134 {
135  fields.add(composition.Y("ft"));
136 }
137 
138 fields.add(b);
139 fields.add(thermo.he());
140 fields.add(thermo.heu());
141 
142 #include "createMRF.H"
autoPtr< compressible::turbulenceModel > turbulence
Definition: createFields.H:23
surfaceScalarField & phi
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:80
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:253
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:55
CGAL::Exact_predicates_exact_constructions_kernel K
const word & executable() const
Name of executable without the path.
Definition: argListI.H:30
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
rho
Definition: createFields.H:81
dynamicFvMesh & mesh
volVectorField U(IOobject("U", runTime.timeName(), runTime, IOobject::NO_READ, IOobject::NO_WRITE), mesh, dimensionedVector("zero", dimVelocity, Zero))
volScalarField & dpdt
dimensioned< scalar > magSqr(const dimensioned< Type > &)
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
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
Info<< "Reading thermophysical properties\n"<< endl;autoPtr< psiThermo > pThermo(psiThermo::New(mesh))
tmp< GeometricField< Type, fvPatchField, volMesh > > Su(const GeometricField< Type, fvPatchField, volMesh > &su, const GeometricField< Type, fvPatchField, volMesh > &vf)
Definition: fvcSup.C:44
Foam::argList args(argc, argv)
Creates and initialises the face-flux field phi.