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 Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00024 00025 Application 00026 PDRFoam 00027 00028 Description 00029 Solver for compressible premixed/partially-premixed combustion with 00030 turbulence modelling. 00031 00032 Combusting RANS code using the b-Xi two-equation model. 00033 Xi may be obtained by either the solution of the Xi transport 00034 equation or from an algebraic exression. Both approaches are 00035 based on Gulder's flame speed correlation which has been shown 00036 to be appropriate by comparison with the results from the 00037 spectral model. 00038 00039 Strain effects are incorporated directly into the Xi equation 00040 but not in the algebraic approximation. Further work need to be 00041 done on this issue, particularly regarding the enhanced removal rate 00042 caused by flame compression. Analysis using results of the spectral 00043 model will be required. 00044 00045 For cases involving very lean Propane flames or other flames which are 00046 very strain-sensitive, a transport equation for the laminar flame 00047 speed is present. This equation is derived using heuristic arguments 00048 involving the strain time scale and the strain-rate at extinction. 00049 the transport velocity is the same as that for the Xi equation. 00050 00051 For large flames e.g. explosions additional modelling for the flame 00052 wrinkling due to surface instabilities may be applied. 00053 00054 PDR (porosity/distributed resistance) modelling is included to handle 00055 regions containing blockages which cannot be resolved by the mesh. 00056 00057 Usage 00058 - PDRFoam [OPTION] 00059 00060 @param -case <dir> \n 00061 Specify the case directory 00062 00063 @param -parallel \n 00064 Run the case in parallel 00065 00066 @param -help \n 00067 Display short usage message 00068 00069 @param -doc \n 00070 Display Doxygen documentation page 00071 00072 @param -srcDoc \n 00073 Display source code 00074 00075 \*---------------------------------------------------------------------------*/ 00076 00077 #include <finiteVolume/fvCFD.H> 00078 #include <reactionThermophysicalModels/hhuCombustionThermo.H> 00079 #include <compressibleRASModels/RASModel.H> 00080 #include <laminarFlameSpeedModels/laminarFlameSpeed.H> 00081 #include "XiModels/XiModel/XiModel.H" 00082 #include "PDRModels/dragModels/PDRDragModel/PDRDragModel.H" 00083 #include <engine/ignition.H> 00084 #include <OpenFOAM/Switch.H> 00085 #include <finiteVolume/bound.H> 00086 00087 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00088 00089 int main(int argc, char *argv[]) 00090 { 00091 #include <OpenFOAM/setRootCase.H> 00092 00093 #include <OpenFOAM/createTime.H> 00094 #include <OpenFOAM/createMesh.H> 00095 #include "readCombustionProperties.H" 00096 #include <finiteVolume/readGravitationalAcceleration.H> 00097 #include "createFields.H" 00098 #include <finiteVolume/initContinuityErrs.H> 00099 #include <finiteVolume/readTimeControls.H> 00100 #include <finiteVolume/CourantNo.H> 00101 #include <finiteVolume/setInitialDeltaT.H> 00102 00103 scalar StCoNum = 0.0; 00104 00105 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00106 00107 Info<< "\nStarting time loop\n" << endl; 00108 00109 while (runTime.run()) 00110 { 00111 #include <finiteVolume/readTimeControls.H> 00112 #include <finiteVolume/readPISOControls.H> 00113 #include <finiteVolume/CourantNo.H> 00114 #include "setDeltaT.H" 00115 00116 00117 runTime++; 00118 00119 Info<< "\n\nTime = " << runTime.timeName() << endl; 00120 00121 #include "rhoEqn.H" 00122 #include "UEqn.H" 00123 00124 // --- PISO loop 00125 for (int corr=1; corr<=nCorr; corr++) 00126 { 00127 #include "bEqn.H" 00128 #include "ftEqn.H" 00129 #include "huEqn.H" 00130 #include "hEqn.H" 00131 00132 if (!ign.ignited()) 00133 { 00134 hu == h; 00135 } 00136 00137 #include "pEqn.H" 00138 } 00139 00140 turbulence->correct(); 00141 00142 runTime.write(); 00143 00144 Info<< "\nExecutionTime = " 00145 << runTime.elapsedCpuTime() 00146 << " s\n" << endl; 00147 } 00148 00149 Info<< "\n end\n"; 00150 00151 return 0; 00152 } 00153 00154 00155 // ************************ vim: set sw=4 sts=4 et: ************************ //