All Classes Namespaces Files Functions Variables Typedefs Friends Macros Groups
createFields.H
Go to the documentation of this file.
1 volVectorField U
2 (
3  IOobject
4  (
5  "U",
6  runTime.timeName(),
7  mesh,
8  IOobject::MUST_READ,
9  IOobject::AUTO_WRITE
10  ),
11  mesh
12 );
13 
14 surfaceScalarField phi
15 (
16  "phi",
17  linearInterpolate(dimensionedScalar("0",dimensionSet(1,-3,0,0,0),0.0)*U) & mesh.Sf()
18 );
19 
20 Info<< "Reading thermophysical properties\n" << endl;
21 
22 autoPtr<psiQGDReactionThermo> pThermo(psiQGDReactionThermo::New(mesh));
23 psiQGDReactionThermo& thermo = pThermo();
24 thermo.correct();
25 
26 SLGThermo slgThermo(mesh, thermo);
27 
28 basicSpecieMixture& composition = thermo.composition();
29 PtrList<volScalarField>& Y = composition.Y();
30 
31 const word inertSpecie(thermo.get<word>("inertSpecie"));
32 if (!composition.species().found(inertSpecie))
33 {
34  FatalIOErrorIn(args.executable().c_str(), thermo)
35  << "Inert specie " << inertSpecie << " not found in available species "
36  << composition.species()
37  << exit(FatalIOError);
38 }
39 const label inertIndex(composition.species()[inertSpecie]);
40 
41 #include "readScNumbers.H"
42 
43 volScalarField& e = thermo.he();
44 volScalarField& p = thermo.p();
45 const volScalarField& T = thermo.T();
46 
47 const surfaceScalarField& tauQGDf = thermo.tauQGDf();
48 const surfaceScalarField& hQGDf = thermo.hQGDf();
49 const volScalarField& gamma = thermo.gamma();
50 const volScalarField& psi = thermo.psi();
51 
52 autoPtr<compressible::turbulenceModel> turbulence;
53 
54 Info << "Creating density field" << endl;
55 volScalarField rho
56 (
57  IOobject
58  (
59  "rho",
60  runTime.timeName(),
61  mesh,
62  IOobject::NO_READ,
63  IOobject::AUTO_WRITE
64  ),
65  thermo.rho()
66 );
67 
68 volVectorField rhoU
69 (
70  IOobject
71  (
72  "rhoU",
73  runTime.timeName(),
74  mesh,
75  IOobject::NO_READ,
76  IOobject::NO_WRITE
77  ),
78  rho*U
79 );
80 
81 volScalarField rhoE
82 (
83  IOobject
84  (
85  "rhoE",
86  runTime.timeName(),
87  mesh,
88  IOobject::NO_READ,
89  IOobject::NO_WRITE
90  ),
91  rho*e + rho*0.5*magSqr(U)
92 );
93 
94 volScalarField H
95 (
96  IOobject
97  (
98  "Ht",
99  runTime.timeName(),
100  mesh,
101  IOobject::NO_READ,
102  IOobject::NO_WRITE
103  ),
104  (rhoE + p)/rho
105 );
106 
107 #include "createZeroSources.H"
108 
109 
110 Switch implicitDiffusion (thermo.implicitDiffusion());
111 
112 Info<< "Creating turbulence model\n" << endl;
113 turbulence.reset
114 (
115  compressible::turbulenceModel::New
116  (
117  rho,
118  U,
119  phi,
120  thermo
121  ).ptr()
122 );
123 
124 Info<< "\nReading gravitationalProperties" << endl;
125 
126 IOdictionary gravitationalProperties
127 (
128  IOobject
129  (
130  "gravitationalProperties",
131  runTime.constant(),
132  mesh,
133  IOobject::MUST_READ_IF_MODIFIED,
134  IOobject::NO_WRITE
135  )
136 );
137 
138 const dimensionedVector g(gravitationalProperties.lookup("g"));
139 
140 #include "createClouds.H"
141 
142 Info<< "Creating combustion model\n" << endl;
143 autoPtr<CombustionModel<psiQGDReactionThermo>> combustion
144 (
145  CombustionModel<psiQGDReactionThermo>::New(thermo, turbulence())
146 );
147 
148 volScalarField Qdot
149 (
150  IOobject
151  (
152  "Qdot",
153  runTime.timeName(),
154  mesh,
155  IOobject::READ_IF_PRESENT,
156  IOobject::AUTO_WRITE
157  ),
158  mesh,
159  dimensionedScalar(dimEnergy/dimVolume/dimTime, Zero)
160 );
161 
162 
163 //
164 //END-OF-FILE
165 //
166 
const label inertIndex(composition.species()[inertSpecie])
const surfaceScalarField & tauQGDf
Definition: createFields.H:55
const surfaceScalarField & hQGDf
Definition: createFields.H:54
volVectorField U(IOobject("U", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE), mesh)
basicSpecieMixture & composition
Definition: createFields.H:28
Switch implicitDiffusion(thermo.implicitDiffusion())
const word inertSpecie(thermo.get< word >("inertSpecie"))
Qdot
Definition: QGDYEqn.H:33
Info<< "Creating density field"<< endl;volScalarField rho(IOobject("rho", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE), thermo.rho());volVectorField rhoU(IOobject("rhoU", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE), rho *U);volScalarField rhoE(IOobject("rhoE", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE), rho *e+rho *0.5 *magSqr(U));volScalarField H(IOobject("Ht", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE),(rhoE+p)/rho);Switch implicitDiffusion(thermo.implicitDiffusion());Info<< "Creating turbulence model\n"<< endl;turbulence.reset(compressible::turbulenceModel::New(rho, U, phi, thermo).ptr());Info<< "\nReading gravitationalProperties"<< endl;IOdictionary gravitationalProperties(IOobject("gravitationalProperties", runTime.constant(), mesh, IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE));const dimensionedVector g(gravitationalProperties.lookup("g"));#140"/home/jenkins/workspace/experQGDsolver-8doxigen/QGDsolver/reactingLagrangianQGDFoam/createFields.H"2Info<< "Creating combustion model\n"<< endl;autoPtr< CombustionModel< psiQGDReactionThermo > > combustion(CombustionModel< psiQGDReactionThermo >::New(thermo, turbulence()))
volScalarField rhoE(IOobject("rhoE", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE), rho *e+rho *0.5 *magSqr(U))
const volScalarField & gamma
Definition: createFields.H:19
H
Definition: updateFields.H:34
volScalarField & e
Definition: createFields.H:50
SLGThermo slgThermo(mesh, thermo)
PtrList< volScalarField > & Y
Definition: createFields.H:29
rhoQGDThermo & thermo
Definition: createFields.H:47
const volScalarField & psi
Definition: createFields.H:20
Info<< "\nReading gravitationalProperties"<< endl;IOdictionary gravitationalProperties(IOobject("gravitationalProperties", runTime.constant(), mesh, IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE));const dimensionedVector g(gravitationalProperties.lookup("g"));Info<< "Reading thermophysical properties\n"<< endl;autoPtr< rhoQGDThermo > pThermo(rhoQGDThermo::New(mesh))
volScalarField rho(IOobject("rho", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE), thermo.rho())
Info<< "Thermo corrected"<< endl;autoPtr< compressible::turbulenceModel > turbulence
Definition: createFields.H:59
volScalarField & T
Definition: createFields.H:53
volVectorField rhoU(IOobject("rhoU", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE), rho *U)
volScalarField & p
Definition: createFields.H:52