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 );
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