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 #include "compressibleCreatePhi.H"
45 
46 mesh.setFluxRequired(p.name());
47 
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 Info<< "Creating field dpdt\n" << endl;
67 (
68  IOobject
69  (
70  "dpdt",
71  runTime.timeName(),
72  mesh
73  ),
74  mesh,
75  dimensionedScalar("dpdt", p.dimensions()/dimTime, 0)
76 );
77 
78 Info<< "Creating field kinetic energy K\n" << endl;
79 volScalarField K("K", 0.5*magSqr(U));
80 
81 
82 multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
83 
84 forAll(Y, i)
85 {
86  fields.add(Y[i]);
87 }
88 fields.add(thermo.he());
89 
91 (
92  IOobject
93  (
94  "dQ",
95  runTime.timeName(),
96  mesh,
97  IOobject::NO_READ,
98  IOobject::AUTO_WRITE
99  ),
100  mesh,
102 );
103 
104 #include "createMRF.H"
autoPtr< compressible::turbulenceModel > turbulence
Definition: createFields.H:23
surfaceScalarField & phi
forAll(Y, i)
Definition: createFields.H:99
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 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.