FreeFOAM The Cross-Platform CFD Toolkit
XiFoam.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) 1991-2010 OpenCFD Ltd.
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  XiFoam
26 
27 Description
28  Solver for compressible premixed/partially-premixed combustion with
29  turbulence modelling.
30 
31  Combusting RANS code using the b-Xi two-equation model.
32  Xi may be obtained by either the solution of the Xi transport
33  equation or from an algebraic exression. Both approaches are
34  based on Gulder's flame speed correlation which has been shown
35  to be appropriate by comparison with the results from the
36  spectral model.
37 
38  Strain effects are encorporated directly into the Xi equation
39  but not in the algebraic approximation. Further work need to be
40  done on this issue, particularly regarding the enhanced removal rate
41  caused by flame compression. Analysis using results of the spectral
42  model will be required.
43 
44  For cases involving very lean Propane flames or other flames which are
45  very strain-sensitive, a transport equation for the laminar flame
46  speed is present. This equation is derived using heuristic arguments
47  involving the strain time scale and the strain-rate at extinction.
48  the transport velocity is the same as that for the Xi equation.
49 
50 Usage
51  - XiFoam [OPTION]
52 
53  @param -case <dir> \n
54  Specify the case directory
55 
56  @param -parallel \n
57  Run the case in parallel
58 
59  @param -help \n
60  Display short usage message
61 
62  @param -doc \n
63  Display Doxygen documentation page
64 
65  @param -srcDoc \n
66  Display source code
67 
68 \*---------------------------------------------------------------------------*/
69 
70 #include <finiteVolume/fvCFD.H>
74 #include <engine/ignition.H>
75 #include <OpenFOAM/Switch.H>
76 
77 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
78 
79 int main(int argc, char *argv[])
80 {
81  #include <OpenFOAM/setRootCase.H>
82 
83  #include <OpenFOAM/createTime.H>
84  #include <OpenFOAM/createMesh.H>
87  #include "createFields.H"
92 
93  // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
94 
95  Info<< "\nStarting time loop\n" << endl;
96 
97  while (runTime.run())
98  {
102  #include <finiteVolume/setDeltaT.H>
103 
104  runTime++;
105  Info<< "Time = " << runTime.timeName() << nl << endl;
106 
107  // --- Pressure-velocity PIMPLE corrector loop
108  for (int oCorr=0; oCorr<nOuterCorr; oCorr++)
109  {
110  #include <finiteVolume/rhoEqn.H>
111  #include "UEqn.H"
112 
113  #include "ftEqn.H"
114  #include "bEqn.H"
115  #include "huEqn.H"
116  #include "hEqn.H"
117 
118  if (!ign.ignited())
119  {
120  hu == h;
121  }
122 
123  // --- PISO loop
124  for (int corr=1; corr<=nCorr; corr++)
125  {
126  #include "pEqn.H"
127  }
128 
129  turbulence->correct();
130  }
131 
132  rho = thermo.rho();
133 
134  runTime.write();
135 
136  Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
137  << " ClockTime = " << runTime.elapsedClockTime() << " s"
138  << nl << endl;
139  }
140 
141  Info<< "End\n" << endl;
142 
143  return 0;
144 }
145 
146 
147 // ************************ vim: set sw=4 sts=4 et: ************************ //