00001 /*---------------------------------------------------------------------------*\ 00002 ========= | 00003 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox 00004 \\ / O peration | 00005 \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. 00006 \\/ M anipulation | 00007 ------------------------------------------------------------------------------- 00008 License 00009 This file is part of OpenFOAM. 00010 00011 OpenFOAM is free software: you can redistribute it and/or modify it 00012 under the terms of the GNU General Public License as published by 00013 the Free Software Foundation, either version 3 of the License, or 00014 (at your option) any later version. 00015 00016 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT 00017 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00018 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 00019 for more details. 00020 00021 You should have received a copy of the GNU General Public License 00022 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. 00023 00024 Application 00025 XiFoam 00026 00027 Description 00028 Solver for compressible premixed/partially-premixed combustion with 00029 turbulence modelling. 00030 00031 Combusting RANS code using the b-Xi two-equation model. 00032 Xi may be obtained by either the solution of the Xi transport 00033 equation or from an algebraic exression. Both approaches are 00034 based on Gulder's flame speed correlation which has been shown 00035 to be appropriate by comparison with the results from the 00036 spectral model. 00037 00038 Strain effects are encorporated directly into the Xi equation 00039 but not in the algebraic approximation. Further work need to be 00040 done on this issue, particularly regarding the enhanced removal rate 00041 caused by flame compression. Analysis using results of the spectral 00042 model will be required. 00043 00044 For cases involving very lean Propane flames or other flames which are 00045 very strain-sensitive, a transport equation for the laminar flame 00046 speed is present. This equation is derived using heuristic arguments 00047 involving the strain time scale and the strain-rate at extinction. 00048 the transport velocity is the same as that for the Xi equation. 00049 00050 Usage 00051 - XiFoam [OPTION] 00052 00053 @param -case <dir> \n 00054 Specify the case directory 00055 00056 @param -parallel \n 00057 Run the case in parallel 00058 00059 @param -help \n 00060 Display short usage message 00061 00062 @param -doc \n 00063 Display Doxygen documentation page 00064 00065 @param -srcDoc \n 00066 Display source code 00067 00068 \*---------------------------------------------------------------------------*/ 00069 00070 #include <finiteVolume/fvCFD.H> 00071 #include <reactionThermophysicalModels/hhuCombustionThermo.H> 00072 #include <compressibleTurbulenceModel/turbulenceModel.H> 00073 #include <laminarFlameSpeedModels/laminarFlameSpeed.H> 00074 #include <engine/ignition.H> 00075 #include <OpenFOAM/Switch.H> 00076 00077 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00078 00079 int main(int argc, char *argv[]) 00080 { 00081 #include <OpenFOAM/setRootCase.H> 00082 00083 #include <OpenFOAM/createTime.H> 00084 #include <OpenFOAM/createMesh.H> 00085 #include "readCombustionProperties.H" 00086 #include <finiteVolume/readGravitationalAcceleration.H> 00087 #include "createFields.H" 00088 #include <finiteVolume/initContinuityErrs.H> 00089 #include <finiteVolume/readTimeControls.H> 00090 #include <finiteVolume/compressibleCourantNo.H> 00091 #include <finiteVolume/setInitialDeltaT.H> 00092 00093 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00094 00095 Info<< "\nStarting time loop\n" << endl; 00096 00097 while (runTime.run()) 00098 { 00099 #include <finiteVolume/readTimeControls.H> 00100 #include <finiteVolume/readPISOControls.H> 00101 #include <finiteVolume/compressibleCourantNo.H> 00102 #include <finiteVolume/setDeltaT.H> 00103 00104 runTime++; 00105 Info<< "Time = " << runTime.timeName() << nl << endl; 00106 00107 // --- Pressure-velocity PIMPLE corrector loop 00108 for (int oCorr=0; oCorr<nOuterCorr; oCorr++) 00109 { 00110 #include <finiteVolume/rhoEqn.H> 00111 #include "UEqn.H" 00112 00113 #include "ftEqn.H" 00114 #include "bEqn.H" 00115 #include "huEqn.H" 00116 #include "hEqn.H" 00117 00118 if (!ign.ignited()) 00119 { 00120 hu == h; 00121 } 00122 00123 // --- PISO loop 00124 for (int corr=1; corr<=nCorr; corr++) 00125 { 00126 #include "pEqn.H" 00127 } 00128 00129 turbulence->correct(); 00130 } 00131 00132 rho = thermo.rho(); 00133 00134 runTime.write(); 00135 00136 Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" 00137 << " ClockTime = " << runTime.elapsedClockTime() << " s" 00138 << nl << endl; 00139 } 00140 00141 Info<< "End\n" << endl; 00142 00143 return 0; 00144 } 00145 00146 00147 // ************************ vim: set sw=4 sts=4 et: ************************ //