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

porousExplicitSourceReactingParcelFoam.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     porousExplicitSourceReactingParcelFoam
00027 
00028 Description
00029     Transient PISO solver for compressible, laminar or turbulent flow with
00030     reacting Lagrangian parcels for porous media, including explicit sources
00031 
00032     The solver includes:
00033     - reacting parcel cloud
00034     - porous media
00035     - point mass sources
00036     - polynomial based, incompressible thermodynamics (f(T))
00037 
00038     Note: ddtPhiCorr not used here when porous zones are active
00039     - not well defined for porous calculations
00040 
00041 \*---------------------------------------------------------------------------*/
00042 
00043 #include "fvCFD.H"
00044 #include "hReactionThermo.H"
00045 #include "turbulenceModel.H"
00046 #include "BasicReactingCloud.H"
00047 #include "rhoChemistryModel.H"
00048 #include "chemistrySolver.H"
00049 #include "thermoPhysicsTypes.H"
00050 #include "radiationModel.H"
00051 #include "porousZones.H"
00052 #include "timeActivatedExplicitMulticomponentPointSource.H"
00053 
00054 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00055 
00056 int main(int argc, char *argv[])
00057 {
00058     #include "setRootCase.H"
00059 
00060     #include "createTime.H"
00061     #include "createMesh.H"
00062     #include "readChemistryProperties.H"
00063     #include "readGravitationalAcceleration.H"
00064     #include "createFields.H"
00065     #include "createRadiationModel.H"
00066     #include "createClouds.H"
00067     #include "createMulticomponentPointSources.H"
00068     #include "createPorousZones.H"
00069     #include "initContinuityErrs.H"
00070     #include "readTimeControls.H"
00071     #include "compressibleCourantNo.H"
00072     #include "setInitialDeltaT.H"
00073 
00074     // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00075 
00076     Info<< "\nStarting time loop\n" << endl;
00077 
00078     while (runTime.run())
00079     {
00080         #include "readTimeControls.H"
00081         #include "readPISOControls.H"
00082         #include "readAdditionalSolutionControls.H"
00083         #include "compressibleCourantNo.H"
00084         #include "setDeltaT.H"
00085 
00086         runTime++;
00087 
00088         Info<< "Time = " << runTime.timeName() << nl << endl;
00089 
00090         parcels.evolve();
00091 
00092         parcels.info();
00093 
00094         #include "chemistry.H"
00095         #include "rhoEqn.H"
00096         #include "UEqn.H"
00097         #include "YEqn.H"
00098         #include "hEqn.H"
00099 
00100         // --- PISO loop
00101         for (int corr=0; corr<nCorr; corr++)
00102         {
00103             #include "pEqn.H"
00104         }
00105 
00106         turbulence->correct();
00107 
00108         rho = thermo.rho();
00109 
00110         if (runTime.write())
00111         {
00112             chemistry.dQ()().write();
00113         }
00114 
00115         Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
00116             << "  ClockTime = " << runTime.elapsedClockTime() << " s"
00117             << nl << endl;
00118     }
00119 
00120     Info<< "End\n" << endl;
00121 
00122     return(0);
00123 }
00124 
00125 
00126 // ************************************************************************* //
Copyright © 2000-2009 OpenCFD Ltd