1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
7 -------------------------------------------------------------------------------
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
13 the Free Software Foundation, either version 3 of the License, or
14 (at your 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
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/>.
28 Solver for internal combustion engines.
30 Combusting RANS code using the b-Xi two-equation model.
31 Xi may be obtained by either the solution of the Xi transport
32 equation or from an algebraic exression. Both approaches are
33 based on Gulder's flame speed correlation which has been shown
34 to be appropriate by comparison with the results from the
37 Strain effects are encorporated directly into the Xi equation
38 but not in the algebraic approximation. Further work need to be
39 done on this issue, particularly regarding the enhanced removal rate
40 caused by flame compression. Analysis using results of the spectral
41 model will be required.
43 For cases involving very lean Propane flames or other flames which are
44 very strain-sensitive, a transport equation for the laminar flame
45 speed is present. This equation is derived using heuristic arguments
46 involving the strain time scale and the strain-rate at extinction.
47 the transport velocity is the same as that for the Xi equation.
49 \*---------------------------------------------------------------------------*/
52 #include "engineTime.H"
53 #include "engineMesh.H"
54 #include "hhuCombustionThermo.H"
55 #include "turbulenceModel.H"
56 #include "laminarFlameSpeed.H"
60 #include "mathematicalConstants.H"
61 #include "pimpleControl.H"
63 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
65 int main(int argc, char *argv[])
67 #include "setRootCase.H"
69 #include "createEngineTime.H"
70 #include "createEngineMesh.H"
71 #include "readCombustionProperties.H"
72 #include "createFields.H"
73 #include "initContinuityErrs.H"
74 #include "readEngineTimeControls.H"
75 #include "compressibleCourantNo.H"
76 #include "setInitialDeltaT.H"
77 #include "startSummary.H"
79 pimpleControl pimple(mesh);
81 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
83 Info<< "\nStarting time loop\n" << endl;
87 #include "readEngineTimeControls.H"
88 #include "compressibleCourantNo.H"
89 #include "setDeltaT.H"
93 Info<< "Crank angle = " << runTime.theta() << " CA-deg" << endl;
99 // --- Pressure-velocity PIMPLE corrector loop
100 for (pimple.start(); pimple.loop(); pimple++)
115 for (int corr=1; corr<=pimple.nCorr(); corr++)
120 if (pimple.turbCorr())
122 turbulence->correct();
126 #include "logSummary.H"
132 Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
133 << " ClockTime = " << runTime.elapsedClockTime() << " s"
137 Info<< "End\n" << endl;
143 // ************************************************************************* //