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 
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 
62 Info<< "Creating field Xi\n" << endl;
64 (
65  IOobject
66  (
67  "Xi",
68  runTime.timeName(),
69  mesh,
70  IOobject::MUST_READ,
71  IOobject::AUTO_WRITE
72  ),
73  mesh
74 );
75 
76 
77 Info<< "Creating the unstrained laminar flame speed\n" << endl;
78 autoPtr<laminarFlameSpeed> unstrainedLaminarFlameSpeed
79 (
81 );
82 
83 
84 Info<< "Reading strained laminar flame speed field Su\n" << endl;
86 (
87  IOobject
88  (
89  "Su",
90  runTime.timeName(),
91  mesh,
92  IOobject::MUST_READ,
93  IOobject::AUTO_WRITE
94  ),
95  mesh
96 );
97 
98 dimensionedScalar SuMin = 0.01*Su.average();
99 dimensionedScalar SuMax = 4*Su.average();
100 
101 Info<< "Calculating turbulent flame speed field St\n" << endl;
103 (
104  IOobject
105  (
106  "St",
107  runTime.timeName(),
108  mesh,
109  IOobject::NO_READ,
110  IOobject::AUTO_WRITE
111  ),
112  Xi*Su
113 );
114 
115 
116 multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
117 
118 if (composition.contains("ft"))
119 {
120  fields.add(composition.Y("ft"));
121 }
122 
123 fields.add(b);
124 fields.add(thermo.he());
125 fields.add(thermo.heu());
126 
127 #include "createDpdt.H"
128 
129 #include "createK.H"
130 
131 #include "createMRF.H"
132 #include "createFvOptions.H"
runTime
engineTime & runTime
Definition: createEngineTime.H:13
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::Info
messageStream Info
Information stream (stdout output on master, null elsewhere)
Foam::dimensionedScalar
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
Definition: dimensionedScalarFwd.H:42
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.
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))