createFields.H
Go to the documentation of this file.
1 Info<< "Creating combustion model\n" << endl;
2 
3 autoPtr<combustionModels::psiCombustionModel> combustion
4 (
6  (
7  mesh
8  )
9 );
10 
11 Info<< "Reading thermophysical properties\n" << endl;
12 
13 psiReactionThermo& thermo = combustion->thermo();
14 thermo.validate(args.executable(), "h", "e");
15 
16 SLGThermo slgThermo(mesh, thermo);
17 
18 basicMultiComponentMixture& composition = thermo.composition();
19 PtrList<volScalarField>& Y = composition.Y();
20 
21 const word inertSpecie(thermo.lookup("inertSpecie"));
22 
23 Info<< "Creating field rho\n" << endl;
25 (
26  IOobject
27  (
28  "rho",
29  runTime.timeName(),
30  mesh,
31  IOobject::NO_READ,
32  IOobject::AUTO_WRITE
33  ),
34  thermo.rho()
35 );
36 
37 volScalarField& p = thermo.p();
38 const volScalarField& T = thermo.T();
39 const volScalarField& psi = thermo.psi();
40 
41 Info<< "\nReading field U\n" << endl;
43 (
44  IOobject
45  (
46  "U",
47  runTime.timeName(),
48  mesh,
49  IOobject::MUST_READ,
50  IOobject::AUTO_WRITE
51  ),
52  mesh
53 );
54 
55 #include "compressibleCreatePhi.H"
56 
57 Info<< "Creating turbulence model\n" << endl;
58 autoPtr<compressible::turbulenceModel> turbulence
59 (
61  (
62  rho,
63  U,
64  phi,
65  thermo
66  )
67 );
68 
69 // Set the turbulence into the combustion model
70 combustion->setTurbulence(turbulence());
71 
73 (
74  IOobject
75  (
76  "dQ",
77  runTime.timeName(),
78  mesh,
79  IOobject::NO_READ,
80  IOobject::AUTO_WRITE
81  ),
82  mesh,
84 );
85 
86 
87 Info<< "Creating field dpdt\n" << endl;
89 (
90  IOobject
91  (
92  "dpdt",
93  runTime.timeName(),
94  mesh
95  ),
96  mesh,
97  dimensionedScalar("dpdt", p.dimensions()/dimTime, 0)
98 );
99 
100 Info<< "Creating field kinetic energy K\n" << endl;
101 volScalarField K("K", 0.5*magSqr(U));
102 
103 
104 #include "readGravitationalAcceleration.H"
105 #include "readhRef.H"
106 #include "gh.H"
107 
108 
110 (
111  IOobject
112  (
113  "p_rgh",
114  runTime.timeName(),
115  mesh,
116  IOobject::MUST_READ,
117  IOobject::AUTO_WRITE
118  ),
119  mesh
120 );
121 
122 // Force p_rgh to be consistent with p
123 p_rgh = p - rho*gh;
124 
125 mesh.setFluxRequired(p_rgh.name());
126 
127 multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
128 
129 forAll(Y, i)
130 {
131  fields.add(Y[i]);
132 }
133 fields.add(thermo.he());
134 
135 IOdictionary additionalControlsDict
136 (
137  IOobject
138  (
139  "additionalControls",
140  runTime.constant(),
141  mesh,
142  IOobject::MUST_READ_IF_MODIFIED,
143  IOobject::NO_WRITE
144  )
145 );
146 
147 Switch solvePrimaryRegion
148 (
149  additionalControlsDict.lookup("solvePrimaryRegion")
150 );
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 combustion model\n"<< endl;autoPtr< combustionModels::psiCombustionModel > combustion(combustionModels::psiCombustionModel::New( mesh ))
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
volScalarField & p_rgh
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)
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))
IOdictionary additionalControlsDict(IOobject( "additionalControls", runTime.constant(), mesh, IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ))
rho
Definition: createFields.H:79
SLGThermo slgThermo(mesh, thermo)
Switch solvePrimaryRegion(additionalControlsDict.lookup("solvePrimaryRegion"))
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)
forAll(Y, i)
Definition: createFields.H:129
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
const volScalarField & gh