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 
8 psiReactionThermo& thermo = combustion->thermo();
9 thermo.validate(args.executable(), "h", "e");
10 
11 SLGThermo slgThermo(mesh, thermo);
12 
13 basicSpecieMixture& composition = thermo.composition();
14 PtrList<volScalarField>& Y = composition.Y();
15 
16 const word inertSpecie(thermo.lookup("inertSpecie"));
17 
18 Info<< "Creating field rho\n" << endl;
20 (
21  IOobject
22  (
23  "rho",
24  runTime.timeName(),
25  mesh,
26  IOobject::NO_READ,
27  IOobject::AUTO_WRITE
28  ),
29  thermo.rho()
30 );
31 
32 volScalarField& p = thermo.p();
33 const volScalarField& T = thermo.T();
34 const volScalarField& psi = thermo.psi();
35 
36 Info<< "\nReading field U\n" << endl;
38 (
39  IOobject
40  (
41  "U",
42  runTime.timeName(),
43  mesh,
44  IOobject::MUST_READ,
45  IOobject::AUTO_WRITE
46  ),
47  mesh
48 );
49 
50 #include "compressibleCreatePhi.H"
51 
52 Info<< "Creating turbulence model\n" << endl;
53 autoPtr<compressible::turbulenceModel> turbulence
54 (
56  (
57  rho,
58  U,
59  phi,
60  thermo
61  )
62 );
63 
64 // Set the turbulence into the combustion model
65 combustion->setTurbulence(turbulence());
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 #include "readGravitationalAcceleration.H"
85 #include "readhRef.H"
86 #include "gh.H"
87 
88 
90 (
91  IOobject
92  (
93  "p_rgh",
94  runTime.timeName(),
95  mesh,
96  IOobject::MUST_READ,
97  IOobject::AUTO_WRITE
98  ),
99  mesh
100 );
101 
102 // Force p_rgh to be consistent with p
103 p_rgh = p - rho*gh;
104 
105 mesh.setFluxRequired(p_rgh.name());
106 
107 multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
108 
109 forAll(Y, i)
110 {
111  fields.add(Y[i]);
112 }
113 fields.add(thermo.he());
114 
115 IOdictionary additionalControlsDict
116 (
117  IOobject
118  (
119  "additionalControls",
120  runTime.constant(),
121  mesh,
122  IOobject::MUST_READ_IF_MODIFIED,
123  IOobject::NO_WRITE
124  )
125 );
126 
127 Switch solvePrimaryRegion
128 (
129  additionalControlsDict.lookup("solvePrimaryRegion")
130 );
131 
133 (
134  IOobject
135  (
136  "dQ",
137  runTime.timeName(),
138  mesh,
139  IOobject::NO_READ,
140  IOobject::AUTO_WRITE
141  ),
142  mesh,
144 );
145 
146 #include "createMRF.H"
147 #include "createClouds.H"
148 #include "createRadiationModel.H"
149 #include "createSurfaceFilmModel.H"
autoPtr< compressible::turbulenceModel > turbulence
Definition: createFields.H:23
Switch solvePrimaryRegion(additionalControlsDict.lookup("solvePrimaryRegion"))
surfaceScalarField & phi
forAll(Y, i)
Definition: createFields.H:99
Info<< "Creating combustion model\n"<< endl;autoPtr< combustionModels::psiCombustionModel > combustion(combustionModels::psiCombustionModel::New(mesh))
volScalarField p_rgh(IOobject("p_rgh", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE), mesh)
SLGThermo slgThermo(mesh, thermo)
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:253
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
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 > &)
const dimensionSet dimEnergy
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
const volScalarField & gh
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.
IOdictionary additionalControlsDict(IOobject("additionalControls", runTime.constant(), mesh, IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE))