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 Group
28  grpLagrangianSolvers
29 
30 Description
31  Transient PIMPLE solver for compressible, laminar or turbulent flow with
32  coal and thermodynamic parcels, and combustion.
33 
34  Note:
35  - includes run-time selectable finite volume options, e.g. sources,
36  constraints
37 
38 \*---------------------------------------------------------------------------*/
39 
40 #include "fvCFD.H"
42 #include "basicThermoCloud.H"
43 #include "coalCloud.H"
44 #include "psiCombustionModel.H"
45 #include "fvOptions.H"
46 #include "radiationModel.H"
47 #include "SLGThermo.H"
48 #include "pimpleControl.H"
49 #include "localEulerDdtScheme.H"
50 #include "fvcSmooth.H"
51 
52 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
53 
54 int main(int argc, char *argv[])
55 {
56  #include "setRootCase.H"
57 
58  #include "createTime.H"
59  #include "createMesh.H"
60 
61  pimpleControl pimple(mesh);
62 
63  #include "createTimeControls.H"
64  #include "createRDeltaT.H"
65  #include "initContinuityErrs.H"
66  #include "readGravitationalAcceleration.H"
67  #include "createFields.H"
68  #include "createMRF.H"
69  #include "createFvOptions.H"
70  #include "createClouds.H"
71  #include "createRadiationModel.H"
72 
73  turbulence->validate();
74 
75  if (!LTS)
76  {
77  #include "compressibleCourantNo.H"
78  #include "setInitialDeltaT.H"
79  }
80 
81  // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
82 
83  Info<< "\nStarting time loop\n" << endl;
84 
85  while (runTime.run())
86  {
87  #include "readTimeControls.H"
88 
89  if (LTS)
90  {
91  #include "setRDeltaT.H"
92  }
93  else
94  {
95  #include "compressibleCourantNo.H"
96  #include "setDeltaT.H"
97  }
98 
99  runTime++;
100 
101  Info<< "Time = " << runTime.timeName() << nl << endl;
102 
103  rhoEffLagrangian = coalParcels.rhoEff() + limestoneParcels.rhoEff();
104  pDyn = 0.5*rho*magSqr(U);
105 
106  coalParcels.evolve();
107 
108  limestoneParcels.evolve();
109 
110  #include "rhoEqn.H"
111 
112  // --- Pressure-velocity PIMPLE corrector loop
113  while (pimple.loop())
114  {
115  #include "UEqn.H"
116  #include "YEqn.H"
117  #include "EEqn.H"
118 
119  // --- Pressure corrector loop
120  while (pimple.correct())
121  {
122  #include "pEqn.H"
123  }
124 
125  if (pimple.turbCorr())
126  {
127  turbulence->correct();
128  }
129  }
130 
131  rho = thermo.rho();
132 
133  runTime.write();
134 
135  Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
136  << " ClockTime = " << runTime.elapsedClockTime() << " s"
137  << nl << endl;
138  }
139 
140  Info<< "End\n" << endl;
141 
142  return 0;
143 }
144 
145 
146 // ************************************************************************* //
fvOptions.H
rhoEffLagrangian
volScalarField rhoEffLagrangian(IOobject("rhoEffLagrangian", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE), mesh, dimensionedScalar("zero", dimDensity, 0.0))
thermo
Basic thermodynamics type based on the use of fitting functions for cp, h, s obtained from the templa...
createRDeltaT.H
Foam::endl
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:251
createRadiationModel.H
SLGThermo.H
pimpleControl.H
U
U
Definition: pEqn.H:46
createFvOptions.H
localEulerDdtScheme.H
turbulence
autoPtr< compressible::turbulenceModel > turbulence
Definition: createFields.H:23
Foam::nl
static const char nl
Definition: Ostream.H:260
Foam::Info
messageStream Info
main
int main(int argc, char *argv[])
Definition: postCalc.C:54
pDyn
volScalarField pDyn(IOobject("pDyn", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE), mesh, dimensionedScalar("zero", dimPressure, 0.0))
coalCloud.H
LTS
bool LTS
Definition: createRDeltaT.H:1
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:18
rho
rho
Definition: pEqn.H:3
setRootCase.H
basicThermoCloud.H
createTimeControls.H
Read the control parameters used by setDeltaT.
readTimeControls.H
Read the control parameters used by setDeltaT.
createMesh.H
createTime.H
fvCFD.H
psiCombustionModel.H
pimple
const dictionary & pimple
Definition: readFluidMultiRegionPIMPLEControls.H:1
Foam::magSqr
dimensioned< scalar > magSqr(const dimensioned< Type > &)
radiationModel.H
turbulentFluidThermoModel.H
fvcSmooth.H
Provides functions smooth spread and sweep which use the FaceCellWave algorithm to smooth and redistr...