createFields.H
Go to the documentation of this file.
1 Info<< "Creating reaction model\n" << endl;
2 
3 autoPtr<combustionModels::psiCombustionModel> reaction
4 (
6 );
7 
8 psiReactionThermo& 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 #include "compressibleCreatePhi.H"
45 
47 (
48  dimensionedScalar::lookupOrDefault
49  (
50  "rhoMax",
51  pimple.dict(),
52  dimDensity,
53  GREAT
54  )
55 );
56 
58 (
59  dimensionedScalar::lookupOrDefault
60  (
61  "rhoMin",
62  pimple.dict(),
63  dimDensity,
64  0
65  )
66 );
67 
68 mesh.setFluxRequired(p.name());
69 
70 Info << "Creating turbulence model.\n" << nl;
71 autoPtr<compressible::turbulenceModel> turbulence
72 (
74  (
75  rho,
76  U,
77  phi,
78  thermo
79  )
80 );
81 
82 // Set the turbulence into the reaction model
83 reaction->setTurbulence(turbulence());
84 
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
PtrList< dimensionedScalar > rhoMax(fluidRegions.size())
forAll(Y, i)
Definition: createFields.H:99
PtrList< dimensionedScalar > rhoMin(fluidRegions.size())
const dictionary & pimple
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
const dimensionSet dimDensity
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 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.