initial commit for version 1.5.x patch release
[OpenFOAM-1.5.x.git] / applications / solvers / combustion / XiFoam / XiFoam.C
blob8ee0f4d14f54eaef5885918ee9648edc5998e44d
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 1991-2008 OpenCFD Ltd.
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
9     This file is part of OpenFOAM.
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 the
13     Free Software Foundation; either version 2 of the License, or (at your
14     option) any later version.
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.
21     You should have received a copy of the GNU General Public License
22     along with OpenFOAM; if not, write to the Free Software Foundation,
23     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25 Application
26     XiFoam
28 Description
29     Compressible premixed/partially-premixed combustion solver with turbulence
30     modelling.
32     Combusting RANS code using the b-Xi two-equation model.
33     Xi may be obtained by either the solution of the Xi transport
34     equation or from an algebraic exression.  Both approaches are
35     based on Gulder's flame speed correlation which has been shown
36     to be appropriate by comparison with the results from the
37     spectral model.
39     Strain effects are encorporated directly into the Xi equation
40     but not in the algebraic approximation.  Further work need to be
41     done on this issue, particularly regarding the enhanced removal rate
42     caused by flame compression.  Analysis using results of the spectral
43     model will be required.
45     For cases involving very lean Propane flames or other flames which are
46     very strain-sensitive, a transport equation for the laminar flame
47     speed is present.  This equation is derived using heuristic arguments
48     involving the strain time scale and the strain-rate at extinction.
49     the transport velocity is the same as that for the Xi equation.
51 \*---------------------------------------------------------------------------*/
53 #include "fvCFD.H"
54 #include "hhuCombustionThermo.H"
55 #include "compressible/RASModel/RASModel.H"
56 #include "laminarFlameSpeed.H"
57 #include "ignition.H"
58 #include "Switch.H"
60 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
62 int main(int argc, char *argv[])
64 #   include "setRootCase.H"
66 #   include "createTime.H"
67 #   include "createMesh.H"
68 #   include "readCombustionProperties.H"
69 #   include "readEnvironmentalProperties.H"
70 #   include "createFields.H"
71 #   include "readPISOControls.H"
72 #   include "initContinuityErrs.H"
73 #   include "readTimeControls.H"
74 #   include "compressibleCourantNo.H"
75 #   include "setInitialDeltaT.H"
77 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
79     Info<< "\nStarting time loop\n" << endl;
81     while (runTime.run())
82     {
83 #       include "readTimeControls.H"
84 #       include "readPISOControls.H"
85 #       include "compressibleCourantNo.H"
86 #       include "setDeltaT.H"
88         runTime++;
89         Info<< "Time = " << runTime.timeName() << nl << endl;
91 #       include "rhoEqn.H"
92 #       include "UEqn.H"
94         // --- PISO loop
95         for (int corr=1; corr<=nCorr; corr++)
96         {
97 #           include "ftEqn.H"
98 #           include "bEqn.H"
99 #           include "huEqn.H"
100 #           include "hEqn.H"
102             if (!ign.ignited())
103             {
104                 hu == h;
105             }
107 #           include "pEqn.H"
108         }
110         turbulence->correct();
112         rho = thermo->rho();
114         runTime.write();
116         Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
117             << "  ClockTime = " << runTime.elapsedClockTime() << " s"
118             << nl << endl;
119     }
121     Info<< "End\n" << endl;
123     return(0);
127 // ************************************************************************* //