createFields.H
Go to the documentation of this file.
1 Info<< "Creating reaction model\n" << endl;
2 
3 autoPtr<combustionModels::rhoCombustionModel> reaction
4 (
6 );
7 
8 rhoReactionThermo& thermo = reaction->thermo();
9 thermo.validate(args.executable(), "h", "e");
10 
11 basicMultiComponentMixture& composition = thermo.composition();
12 PtrList<volScalarField>& Y = composition.Y();
13 
14 word inertSpecie(thermo.lookup("inertSpecie"));
15 
17 (
18  IOobject
19  (
20  "rho",
21  runTime.timeName(),
22  mesh
23  ),
24  thermo.rho()
25 );
26 
27 Info<< "Reading field U\n" << endl;
29 (
30  IOobject
31  (
32  "U",
33  runTime.timeName(),
34  mesh,
35  IOobject::MUST_READ,
36  IOobject::AUTO_WRITE
37  ),
38  mesh
39 );
40 
41 
42 volScalarField& p = thermo.p();
43 
44 
45 #include "compressibleCreatePhi.H"
46 
47 mesh.setFluxRequired(p.name());
48 
49 Info << "Creating turbulence model.\n" << nl;
50 autoPtr<compressible::turbulenceModel> turbulence
51 (
53  (
54  rho,
55  U,
56  phi,
57  thermo
58  )
59 );
60 
61 // Set the turbulence into the reaction model
62 reaction->setTurbulence(turbulence());
63 
64 
65 #include "readGravitationalAcceleration.H"
66 #include "readhRef.H"
67 #include "gh.H"
68 
69 Info<< "Reading field p_rgh\n" << endl;
71 (
72  IOobject
73  (
74  "p_rgh",
75  runTime.timeName(),
76  mesh,
77  IOobject::MUST_READ,
78  IOobject::AUTO_WRITE
79  ),
80  mesh
81 );
82 
83 // Force p_rgh to be consistent with p
84 p_rgh = p - rho*gh;
85 
86 Info<< "Creating field dpdt\n" << endl;
88 (
89  IOobject
90  (
91  "dpdt",
92  runTime.timeName(),
93  mesh
94  ),
95  mesh,
96  dimensionedScalar("dpdt", p.dimensions()/dimTime, 0)
97 );
98 
99 Info<< "Creating field kinetic energy K\n" << endl;
100 volScalarField K("K", 0.5*magSqr(U));
101 
102 
103 multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
104 
105 forAll(Y, i)
106 {
107  fields.add(Y[i]);
108 }
109 fields.add(thermo.he());
110 
112 (
113  IOobject
114  (
115  "dQ",
116  runTime.timeName(),
117  mesh,
118  IOobject::NO_READ,
119  IOobject::AUTO_WRITE
120  ),
121  mesh,
123 );
124 
125 #include "createMRF.H"
autoPtr< compressible::turbulenceModel > turbulence
Definition: createFields.H:23
surfaceScalarField & phi
forAll(Y, i)
Definition: createFields.H:99
volScalarField p_rgh(IOobject("p_rgh", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE), mesh)
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
volScalarField dQ(IOobject("dQ", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE), mesh, dimensionedScalar("dQ", dimEnergy/dimTime, 0.0))
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 > &)
static const char nl
Definition: Ostream.H:262
const dimensionSet dimEnergy
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
Info<< "Creating reaction model\n"<< endl;autoPtr< combustionModels::psiCombustionModel > reaction(combustionModels::psiCombustionModel::New(mesh))
const volScalarField & gh
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
Definition: dimensionSets.H:51
messageStream Info
Foam::argList args(argc, argv)
const word inertSpecie(thermo.lookup("inertSpecie"))
Creates and initialises the face-flux field phi.