coalChemistryFoam.C
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Application
25  coalChemistryFoam
26 
27 Description
28  Transient solver for:
29  - compressible,
30  - turbulent flow,
31  with
32  - coal and limestone parcel injections,
33  - energy source, and
34  - combustion.
35 
36 \*---------------------------------------------------------------------------*/
37 
38 #include "fvCFD.H"
40 #include "basicThermoCloud.H"
41 #include "coalCloud.H"
42 #include "psiCombustionModel.H"
43 #include "fvIOoptionList.H"
44 #include "radiationModel.H"
45 #include "SLGThermo.H"
46 #include "pimpleControl.H"
47 #include "localEulerDdtScheme.H"
48 #include "fvcSmooth.H"
49 
50 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
51 
52 int main(int argc, char *argv[])
53 {
54  #include "setRootCase.H"
55 
56  #include "createTime.H"
57  #include "createMesh.H"
58 
59  pimpleControl pimple(mesh);
60 
61  #include "createTimeControls.H"
62  #include "createRDeltaT.H"
63  #include "initContinuityErrs.H"
64  #include "readGravitationalAcceleration.H"
65  #include "createFields.H"
66  #include "createMRF.H"
67  #include "createFvOptions.H"
68  #include "createClouds.H"
69  #include "createRadiationModel.H"
70 
71  if (!LTS)
72  {
73  #include "compressibleCourantNo.H"
74  #include "setInitialDeltaT.H"
75  }
76 
77  // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
78 
79  Info<< "\nStarting time loop\n" << endl;
80 
81  while (runTime.run())
82  {
83  #include "readTimeControls.H"
84 
85  if (LTS)
86  {
87  #include "setRDeltaT.H"
88  }
89  else
90  {
91  #include "compressibleCourantNo.H"
92  #include "setDeltaT.H"
93  }
94 
95  runTime++;
96 
97  Info<< "Time = " << runTime.timeName() << nl << endl;
98 
99  rhoEffLagrangian = coalParcels.rhoEff() + limestoneParcels.rhoEff();
100  pDyn = 0.5*rho*magSqr(U);
101 
102  coalParcels.evolve();
103 
104  limestoneParcels.evolve();
105 
106  #include "rhoEqn.H"
107 
108  // --- Pressure-velocity PIMPLE corrector loop
109  while (pimple.loop())
110  {
111  #include "UEqn.H"
112  #include "YEqn.H"
113  #include "EEqn.H"
114 
115  // --- Pressure corrector loop
116  while (pimple.correct())
117  {
118  #include "pEqn.H"
119  }
120 
121  if (pimple.turbCorr())
122  {
123  turbulence->correct();
124  }
125  }
126 
127  rho = thermo.rho();
128 
129  runTime.write();
130 
131  Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
132  << " ClockTime = " << runTime.elapsedClockTime() << " s"
133  << nl << endl;
134  }
135 
136  Info<< "End\n" << endl;
137 
138  return 0;
139 }
140 
141 
142 // ************************************************************************* //
volScalarField rhoEffLagrangian(IOobject( "rhoEffLagrangian", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE ), mesh, dimensionedScalar("zero", dimDensity, 0.0))
volScalarField pDyn(IOobject( "pDyn", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE ), mesh, dimensionedScalar("zero", dimPressure, 0.0))
dimensioned< scalar > magSqr(const dimensioned< Type > &)
bool LTS
Definition: createRDeltaT.H:1
messageStream Info
autoPtr< compressible::turbulenceModel > turbulence
Definition: createFields.H:23
dynamicFvMesh & mesh
const dictionary & pimple
static const char nl
Definition: Ostream.H:260
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:251
Read the control parameters used by setDeltaT.
int main(int argc, char *argv[])
Definition: postCalc.C:54
psiReactionThermo & thermo
Definition: createFields.H:32
Provides functions smooth spread and sweep which use the FaceCellWave algorithm to smooth and redistr...
Read the control parameters used by setDeltaT.
U
Definition: pEqn.H:82