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 
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"
143 #include "createFvOptions.H"
const word & executable() const
Name of executable without the path.
Definition: argListI.H:30
zeroField Su
Definition: alphaSuSp.H:1
surfaceScalarField & phi
Info<< "Creating field dpdt\"<< endl;volScalarField dpdt(IOobject("dpdt", runTime.timeName(), mesh), mesh, dimensionedScalar("dpdt", 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
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-6/applications/solvers/combustion/chemFoam/createFields.H" 2 Info<< "Reading thermophysical properties\"<< endl;autoPtr< rhoReactionThermo > pThermo(rhoReactionThermo::New(mesh))
engineTime & runTime
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:256
volVectorField U(IOobject("U", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE), mesh, dimensionedVector("zero", dimVelocity, Zero))
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
rho
Definition: createFields.H:81
dynamicFvMesh & mesh
dimensioned< scalar > magSqr(const dimensioned< Type > &)
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("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\"<< endl;autoPtr< compressible::turbulenceModel > turbulence(compressible::turbulenceModel::New(rho, U, phi, thermo))
Definition: createFields.H:94
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
Foam::argList args(argc, argv)
Creates and initialises the face-flux field phi.