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

reactingParcelFoam.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) 2008-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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
00024 
00025 Application
00026     reactingParcelFoam
00027 
00028 Description
00029     Transient PISO solver for compressible, laminar or turbulent flow with
00030     reacting Lagrangian parcels.
00031 
00032 \*---------------------------------------------------------------------------*/
00033 
00034 #include "fvCFD.H"
00035 #include "hCombustionThermo.H"
00036 #include "turbulenceModel.H"
00037 #include "BasicReactingCloud.H"
00038 #include "psiChemistryModel.H"
00039 #include "chemistrySolver.H"
00040 #include "thermoPhysicsTypes.H"
00041 #include "radiationModel.H"
00042 
00043 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00044 
00045 int main(int argc, char *argv[])
00046 {
00047     #include "setRootCase.H"
00048 
00049     #include "createTime.H"
00050     #include "createMesh.H"
00051     #include "readChemistryProperties.H"
00052     #include "readGravitationalAcceleration.H"
00053     #include "createFields.H"
00054     #include "createClouds.H"
00055     #include "createRadiationModel.H"
00056     #include "initContinuityErrs.H"
00057     #include "readTimeControls.H"
00058     #include "compressibleCourantNo.H"
00059     #include "setInitialDeltaT.H"
00060 
00061     // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00062 
00063     Info<< "\nStarting time loop\n" << endl;
00064 
00065     while (runTime.run())
00066     {
00067         #include "readTimeControls.H"
00068         #include "readPISOControls.H"
00069         #include "compressibleCourantNo.H"
00070         #include "setDeltaT.H"
00071 
00072         runTime++;
00073 
00074         Info<< "Time = " << runTime.timeName() << nl << endl;
00075 
00076         parcels.evolve();
00077 
00078         parcels.info();
00079 
00080         #include "chemistry.H"
00081         #include "rhoEqn.H"
00082 
00083         // --- PIMPLE loop
00084         for (int ocorr=1; ocorr<=nOuterCorr; ocorr++)
00085         {
00086             #include "UEqn.H"
00087             #include "YEqn.H"
00088 
00089             // --- PISO loop
00090             for (int corr=1; corr<=nCorr; corr++)
00091             {
00092                 #include "hEqn.H"
00093                 #include "pEqn.H"
00094             }
00095 
00096             Info<< "T gas min/max   = " << min(T).value() << ", "
00097                 << max(T).value() << endl;
00098         }
00099 
00100         turbulence->correct();
00101 
00102         rho = thermo.rho();
00103 
00104         if (runTime.write())
00105         {
00106             chemistry.dQ()().write();
00107         }
00108 
00109         Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
00110             << "  ClockTime = " << runTime.elapsedClockTime() << " s"
00111             << nl << endl;
00112     }
00113 
00114     Info<< "End\n" << endl;
00115 
00116     return(0);
00117 }
00118 
00119 
00120 // ************************************************************************* //
Copyright © 2000-2009 OpenCFD Ltd