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 const volScalarField& psi = thermo.psi();
27 
28 volScalarField& b = composition.Y("b");
29 Info<< "min(b) = " << min(b).value() << endl;
30 
31 
32 Info<< "\nReading field U\n" << endl;
34 (
35  IOobject
36  (
37  "U",
38  runTime.timeName(),
39  mesh,
40  IOobject::MUST_READ,
41  IOobject::AUTO_WRITE
42  ),
43  mesh
44 );
45 
46 #include "compressibleCreatePhi.H"
47 
48 mesh.setFluxRequired(p.name());
49 
50 Info<< "Creating turbulence model\n" << endl;
51 autoPtr<compressible::turbulenceModel> turbulence
52 (
54  (
55  rho,
56  U,
57  phi,
58  thermo
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 Info<< "Creating field Xi\n" << endl;
80 (
81  IOobject
82  (
83  "Xi",
84  runTime.timeName(),
85  mesh,
86  IOobject::MUST_READ,
87  IOobject::AUTO_WRITE
88  ),
89  mesh
90 );
91 
92 
93 Info<< "Creating the unstrained laminar flame speed\n" << endl;
94 autoPtr<laminarFlameSpeed> unstrainedLaminarFlameSpeed
95 (
97 );
98 
99 
100 Info<< "Reading strained laminar flame speed field Su\n" << endl;
102 (
103  IOobject
104  (
105  "Su",
106  runTime.timeName(),
107  mesh,
108  IOobject::MUST_READ,
109  IOobject::AUTO_WRITE
110  ),
111  mesh
112 );
113 
114 dimensionedScalar SuMin = 0.01*Su.average();
115 dimensionedScalar SuMax = 4*Su.average();
116 
117 Info<< "Calculating turbulent flame speed field St\n" << endl;
119 (
120  IOobject
121  (
122  "St",
123  runTime.timeName(),
124  mesh,
125  IOobject::NO_READ,
126  IOobject::AUTO_WRITE
127  ),
128  Xi*Su
129 );
130 
131 
132 multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
133 
134 if (composition.contains("ft"))
135 {
136  fields.add(composition.Y("ft"));
137 }
138 
139 fields.add(b);
140 fields.add(thermo.he());
141 fields.add(thermo.heu());
volScalarField & dpdt
volVectorField U(IOobject( "U", runTime.timeName(), runTime, IOobject::NO_READ, IOobject::NO_WRITE ), mesh, dimensionedVector("zero", dimVelocity, vector::zero), p.boundaryField().types())
surfaceScalarField & phi
Definition: createFields.H:13
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
CGAL::Exact_predicates_exact_constructions_kernel K
dimensioned< scalar > magSqr(const dimensioned< Type > &)
Creates and initialises the face-flux field phi.
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
Definition: dimensionSets.H:51
messageStream Info
autoPtr< compressible::turbulenceModel > turbulence
Definition: createFields.H:23
dynamicFvMesh & mesh
autoPtr< BasicCompressibleTurbulenceModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const typename BasicCompressibleTurbulenceModel::transportModel &transport, const word &propertiesName)
tmp< GeometricField< Type, fvPatchField, volMesh > > Su(const GeometricField< Type, fvPatchField, volMesh > &su, const GeometricField< Type, fvPatchField, volMesh > &vf)
Definition: fvcSup.C:44
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:251
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:52
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
rho
Definition: createFields.H:79
Info<< "Reading thermophysical properties\n"<< endl;autoPtr< psiThermo > pThermo(psiThermo::New(mesh))
const word & executable() const
Name of executable without the path.
Definition: argListI.H:30
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:55
Foam::argList args(argc, argv)
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.