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 basicCombustionMixture& 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::momentumTransportModel> turbulence
51 (
53  (
54  rho,
55  U,
56  phi,
57  thermo
58  )
59 );
60 
61 Info<< "Creating thermophysical transport model\n" << endl;
62 autoPtr<fluidThermophysicalTransportModel> thermophysicalTransport
63 (
65 );
66 
67 Info<< "Creating field dpdt\n" << endl;
69 (
70  IOobject
71  (
72  "dpdt",
73  runTime.timeName(),
74  mesh
75  ),
76  mesh,
77  dimensionedScalar(p.dimensions()/dimTime, 0)
78 );
79 
80 Info<< "Creating field kinetic energy K\n" << endl;
81 volScalarField K("K", 0.5*magSqr(U));
82 
83 Info<< "Creating field Xi\n" << endl;
85 (
86  IOobject
87  (
88  "Xi",
89  runTime.timeName(),
90  mesh,
91  IOobject::MUST_READ,
92  IOobject::AUTO_WRITE
93  ),
94  mesh
95 );
96 
97 
98 Info<< "Creating the unstrained laminar flame speed\n" << endl;
99 autoPtr<laminarFlameSpeed> unstrainedLaminarFlameSpeed
100 (
101  laminarFlameSpeed::New(thermo)
102 );
103 
104 
105 Info<< "Reading strained laminar flame speed field Su\n" << endl;
107 (
108  IOobject
109  (
110  "Su",
111  runTime.timeName(),
112  mesh,
113  IOobject::MUST_READ,
114  IOobject::AUTO_WRITE
115  ),
116  mesh
117 );
118 
119 dimensionedScalar SuMin = 0.01*Su.average();
120 dimensionedScalar SuMax = 4*Su.average();
121 
122 Info<< "Calculating turbulent flame speed field St\n" << endl;
124 (
125  IOobject
126  (
127  "St",
128  runTime.timeName(),
129  mesh,
130  IOobject::NO_READ,
131  IOobject::AUTO_WRITE
132  ),
133  Xi*Su
134 );
135 
136 
137 multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
138 
139 if (composition.contains("ft"))
140 {
141  fields.add(composition.Y("ft"));
142 }
143 
144 fields.add(b);
145 fields.add(thermo.he());
146 fields.add(thermo.heu());
147 
148 #include "createMRF.H"
149 #include "createFvOptions.H"
const word & executable() const
Name of executable without the path.
Definition: argListI.H:36
zeroField Su
Definition: alphaSuSp.H:1
engineTime & runTime
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:251
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:58
CGAL::Exact_predicates_exact_constructions_kernel K
phi
Definition: pEqn.H:104
multivariateSurfaceInterpolationScheme< scalar >::fieldTable fields
Definition: createFields.H:103
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:57
volScalarField & dpdt
Info<< "Creating field dpdt\"<< endl;volScalarField dpdt(IOobject("dpdt", runTime.timeName(), mesh), mesh, dimensionedScalar(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:90
rho
Definition: createFields.H:81
dynamicFvMesh & mesh
autoPtr< BasicCompressibleMomentumTransportModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const typename BasicCompressibleMomentumTransportModel::transportModel &transport)
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(dimless, 1.0));surfaceScalarField neg(IOobject("neg", runTime.timeName(), mesh), mesh, dimensionedScalar(dimless, -1.0));surfaceScalarField phi("phi", fvc::flux(rhoU));Info<< "Creating turbulence model\"<< endl;autoPtr< compressible::momentumTransportModel > turbulence(compressible::momentumTransportModel::New(rho, U, phi, thermo))
Definition: createFields.H:94
Info<< "Reading thermophysical properties\"<< endl;autoPtr< rhoReactionThermo > pThermo(rhoReactionThermo::New(mesh))
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
Info<< "Creating thermophysical transport model\"<< endl;autoPtr< fluidThermophysicalTransportModel > thermophysicalTransport(fluidThermophysicalTransportModel::New(turbulence(), thermo))
volVectorField U(IOobject("U", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE), mesh, dimensionedVector(dimVelocity, Zero))
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.