OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

PDRFoam.C

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------------*\
00002   =========                 |
00003   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
00004    \\    /   O peration     |
00005     \\  /    A nd           | Copyright (C) 1991-2009 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 the
00013     Free Software Foundation; either version 2 of the License, or (at your
00014     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, write to the Free Software Foundation,
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 \*---------------------------------------------------------------------------*/
00058 
00059 #include "fvCFD.H"
00060 #include "hhuCombustionThermo.H"
00061 #include "RASModel.H"
00062 #include "laminarFlameSpeed.H"
00063 #include "XiModel.H"
00064 #include "PDRDragModel.H"
00065 #include "ignition.H"
00066 #include "Switch.H"
00067 #include "bound.H"
00068 
00069 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00070 
00071 int main(int argc, char *argv[])
00072 {
00073     #include "setRootCase.H"
00074 
00075     #include "createTime.H"
00076     #include "createMesh.H"
00077     #include "readCombustionProperties.H"
00078     #include "readGravitationalAcceleration.H"
00079     #include "createFields.H"
00080     #include "initContinuityErrs.H"
00081     #include "readTimeControls.H"
00082     #include "CourantNo.H"
00083     #include "setInitialDeltaT.H"
00084 
00085     scalar StCoNum = 0.0;
00086 
00087     // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00088 
00089     Info<< "\nStarting time loop\n" << endl;
00090 
00091     while (runTime.run())
00092     {
00093         #include "readTimeControls.H"
00094         #include "readPISOControls.H"
00095         #include "CourantNo.H"
00096         #include "setDeltaT.H"
00097 
00098         runTime++;
00099 
00100         Info<< "\n\nTime = " << runTime.timeName() << endl;
00101 
00102         #include "rhoEqn.H"
00103         #include "UEqn.H"
00104 
00105         // --- PISO loop
00106         for (int corr=1; corr<=nCorr; corr++)
00107         {
00108             #include "bEqn.H"
00109             #include "ftEqn.H"
00110             #include "huEqn.H"
00111             #include "hEqn.H"
00112 
00113             if (!ign.ignited())
00114             {
00115                 hu == h;
00116             }
00117 
00118             #include "pEqn.H"
00119         }
00120 
00121         turbulence->correct();
00122 
00123         runTime.write();
00124 
00125         Info<< "\nExecutionTime = "
00126              << runTime.elapsedCpuTime()
00127              << " s\n" << endl;
00128     }
00129 
00130     Info<< "\n end\n";
00131 
00132     return 0;
00133 }
00134 
00135 
00136 // ************************************************************************* //
Copyright © 2000-2009 OpenCFD Ltd