rhoReactingBuoyantFoam.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) 2012-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  rhoReactingBuoyantFoam
26 
27 Group
28  grpCombustionSolvers
29 
30 Description
31  Solver for combustion with chemical reactions using density based
32  thermodynamics package, using enahanced buoyancy treatment.
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #include "fvCFD.H"
37 #include "rhoCombustionModel.H"
39 #include "multivariateScheme.H"
40 #include "pimpleControl.H"
41 #include "fvOptions.H"
43 #include "localEulerDdtScheme.H"
44 #include "fvcSmooth.H"
45 
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 
48 int main(int argc, char *argv[])
49 {
50  #include "setRootCase.H"
51  #include "createTime.H"
52  #include "createMesh.H"
53 
54  pimpleControl pimple(mesh);
55 
56  #include "createTimeControls.H"
57  #include "createRDeltaT.H"
58  #include "initContinuityErrs.H"
59  #include "createFields.H"
60  #include "createMRF.H"
61  #include "createFvOptions.H"
62 
63  turbulence->validate();
64 
65  if (!LTS)
66  {
67  #include "compressibleCourantNo.H"
68  #include "setInitialDeltaT.H"
69  }
70 
71  // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
72 
73  Info<< "\nStarting time loop\n" << endl;
74 
75  while (runTime.run())
76  {
77  #include "readTimeControls.H"
78 
79  if (LTS)
80  {
81  #include "setRDeltaT.H"
82  }
83  else
84  {
85  #include "compressibleCourantNo.H"
86  #include "setDeltaT.H"
87  }
88 
89  runTime++;
90 
91  Info<< "Time = " << runTime.timeName() << nl << endl;
92 
93  #include "rhoEqn.H"
94 
95  // --- Pressure-velocity PIMPLE corrector loop
96  while (pimple.loop())
97  {
98  #include "UEqn.H"
99  #include "YEqn.H"
100  #include "EEqn.H"
101 
102  // --- Pressure corrector loop
103  while (pimple.correct())
104  {
105  #include "pEqn.H"
106  }
107 
108  if (pimple.turbCorr())
109  {
110  turbulence->correct();
111  }
112  }
113 
114  rho = thermo.rho();
115 
116  runTime.write();
117 
118  Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
119  << " ClockTime = " << runTime.elapsedClockTime() << " s"
120  << nl << endl;
121  }
122 
123  Info<< "End\n" << endl;
124 
125  return 0;
126 }
127 
128 
129 // ************************************************************************* //
fvOptions.H
multivariateScheme.H
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
pimpleControl.H
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
LTS
bool LTS
Definition: createRDeltaT.H:1
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:18
rho
rho
Definition: pEqn.H:3
setRootCase.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
pimple
const dictionary & pimple
Definition: readFluidMultiRegionPIMPLEControls.H:1
fixedFluxPressureFvPatchScalarField.H
rhoCombustionModel.H
turbulentFluidThermoModel.H
fvcSmooth.H
Provides functions smooth spread and sweep which use the FaceCellWave algorithm to smooth and redistr...