createFields.H
Go to the documentation of this file.
1 Info<< "Creating reaction model\n" << endl;
2 
3 autoPtr<combustionModels::psiCombustionModel> reaction
4 (
5  combustionModels::psiCombustionModel::New(mesh)
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 const volScalarField& psi = thermo.psi();
44 const volScalarField& T = thermo.T();
45 
46 #include "compressibleCreatePhi.H"
47 
48 Info << "Creating turbulence model.\n" << nl;
49 autoPtr<compressible::turbulenceModel> turbulence
50 (
51  compressible::turbulenceModel::New
52  (
53  rho,
54  U,
55  phi,
56  thermo
57  )
58 );
59 
60 // Set the turbulence into the reaction model
61 reaction->setTurbulence(turbulence());
62 
63 
64 Info<< "Creating field dpdt\n" << endl;
66 (
67  IOobject
68  (
69  "dpdt",
70  runTime.timeName(),
71  mesh
72  ),
73  mesh,
74  dimensionedScalar("dpdt", p.dimensions()/dimTime, 0)
75 );
76 
77 Info<< "Creating field kinetic energy K\n" << endl;
78 volScalarField K("K", 0.5*magSqr(U));
79 
80 
81 multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
82 
83 forAll(Y, i)
84 {
85  fields.add(Y[i]);
86 }
87 fields.add(thermo.he());
88 
90 (
91  IOobject
92  (
93  "dQ",
94  runTime.timeName(),
95  mesh,
96  IOobject::NO_READ,
97  IOobject::AUTO_WRITE
98  ),
99  mesh,
101 );
Creates and initialises the face-flux field phi.
const word & executable() const
Name of executable without the path.
Definition: argListI.H:30
surfaceScalarField & phi
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<< "Calculating field g.h\n"<< endl;volScalarField gh("gh", g &mesh.C());surfaceScalarField ghf("ghf", g &mesh.Cf());volScalarField p_rgh(IOobject("p_rgh", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE), mesh);p_rgh=p-rho *gh;multivariateSurfaceInterpolationScheme< scalar >::fieldTable fields
Definition: createFields.H:125
volScalarField & dpdt
volScalarField dQ(IOobject("dQ", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE), mesh, dimensionedScalar("dQ", dimEnergy/dimTime, 0.0))
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:248
const word inertSpecie(thermo.lookup("inertSpecie"))
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
autoPtr< compressible::turbulenceModel > turbulence
Definition: createFields.H:23
Scalar magSqr(const Scalar s)
Definition: Scalar.H:153
CGAL::Exact_predicates_exact_constructions_kernel K
volVectorField U(IOobject("U", runTime.timeName(), runTime, IOobject::NO_READ, IOobject::NO_WRITE), mesh, dimensionedVector("zero", dimVelocity, vector::zero), p.boundaryField().types())
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
Definition: dimensionSets.H:51
dynamicFvMesh & mesh
Info<< "Creating reaction model\n"<< endl;autoPtr< combustionModels::psiCombustionModel > reaction(combustionModels::psiCombustionModel::New(mesh))
tmp< GeometricField< Type, PatchField, GeoMesh > > T() const
Return transpose (only if it is a tensor field)
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:55
forAll(Y, i)
Definition: createFields.H:127
messageStream Info
static const char nl
Definition: Ostream.H:257
Foam::argList args(argc, argv)
rho
Definition: createFields.H:77
const dimensionSet dimEnergy
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:52