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 const volScalarField& psi = thermo.psi();
44 const volScalarField& T = thermo.T();
45 
46 #include "compressibleCreatePhi.H"
47 
48 mesh.setFluxRequired(p.name());
49 
50 
51 Info << "Creating turbulence model.\n" << nl;
52 autoPtr<compressible::turbulenceModel> turbulence
53 (
55  (
56  rho,
57  U,
58  phi,
59  thermo
60  )
61 );
62 
63 // Set the turbulence into the reaction model
64 reaction->setTurbulence(turbulence());
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("dpdt", 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 
84 multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
85 
86 forAll(Y, i)
87 {
88  fields.add(Y[i]);
89 }
90 fields.add(thermo.he());
91 
93 (
94  IOobject
95  (
96  "dQ",
97  runTime.timeName(),
98  mesh,
99  IOobject::NO_READ,
100  IOobject::AUTO_WRITE
101  ),
102  mesh,
104 );
volScalarField & dpdt
volVectorField U(IOobject( "U", runTime.timeName(), runTime, IOobject::NO_READ, IOobject::NO_WRITE ), mesh, dimensionedVector("zero", dimVelocity, vector::zero), p.boundaryField().types())
surfaceScalarField & phi
Definition: createFields.H:13
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));volScalarField p_rgh(IOobject("p_rgh", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE), mesh);p_rgh=p-rho *gh;mesh.setFluxRequired(p_rgh.name());multivariateSurfaceInterpolationScheme< scalar >::fieldTable fields
Definition: createFields.H:127
CGAL::Exact_predicates_exact_constructions_kernel K
const word inertSpecie(thermo.lookup("inertSpecie"))
dimensioned< scalar > magSqr(const dimensioned< Type > &)
Creates and initialises the face-flux field phi.
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
Definition: dimensionSets.H:51
const dimensionSet dimEnergy
messageStream Info
autoPtr< compressible::turbulenceModel > turbulence
Definition: createFields.H:23
dynamicFvMesh & mesh
autoPtr< BasicCompressibleTurbulenceModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const typename BasicCompressibleTurbulenceModel::transportModel &transport, const word &propertiesName)
static const char nl
Definition: Ostream.H:260
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:251
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:52
volScalarField dQ(IOobject( "dQ", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE ), mesh, dimensionedScalar("dQ", dimEnergy/dimTime, 0.0))
rho
Definition: createFields.H:79
tmp< GeometricField< Type, PatchField, GeoMesh > > T() const
Return transpose (only if it is a tensor field)
const word & executable() const
Name of executable without the path.
Definition: argListI.H:30
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:55
Foam::argList args(argc, argv)
Info<< "Creating reaction model\n"<< endl;autoPtr< combustionModels::psiCombustionModel > reaction(combustionModels::psiCombustionModel::New(mesh))
forAll(Y, i)
Definition: createFields.H:129
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.