ENH: patchCloud: return pTraits<Type>::max for unfound points
[OpenFOAM-1.7.x.git] / applications / solvers / lagrangian / porousExplicitSourceReactingParcelFoam / porousExplicitSourceReactingParcelFoam.C
blobc16ba1ec1a0e07e7ebcd626023825a1298a3b463
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 2008-2010 OpenCFD Ltd.
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
9     This file is part of OpenFOAM.
11     OpenFOAM is free software: you can redistribute it and/or modify it
12     under the terms of the GNU General Public License as published by
13     the Free Software Foundation, either version 3 of the License, or
14     (at your option) any later version.
16     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
19     for more details.
21     You should have received a copy of the GNU General Public License
22     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
24 Application
25     porousExplicitSourceReactingParcelFoam
27 Description
28     Transient PISO solver for compressible, laminar or turbulent flow with
29     reacting multiphase Lagrangian parcels for porous media, including explicit
30     sources for mass, momentum and energy
32     The solver includes:
33     - reacting multiphase parcel cloud
34     - porous media
35     - mass, momentum and energy sources
36     - polynomial based, incompressible thermodynamics (f(T))
38     Note: ddtPhiCorr not used here when porous zones are active
39     - not well defined for porous calculations
41 \*---------------------------------------------------------------------------*/
43 #include "fvCFD.H"
44 #include "hReactionThermo.H"
45 #include "turbulenceModel.H"
46 #include "BasicReactingMultiphaseCloud.H"
47 #include "rhoChemistryModel.H"
48 #include "chemistrySolver.H"
49 #include "radiationModel.H"
50 #include "porousZones.H"
51 #include "timeActivatedExplicitSource.H"
53 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
55 int main(int argc, char *argv[])
57     #include "setRootCase.H"
59     #include "createTime.H"
60     #include "createMesh.H"
61     #include "readChemistryProperties.H"
62     #include "readGravitationalAcceleration.H"
63     #include "createFields.H"
64     #include "createRadiationModel.H"
65     #include "createClouds.H"
66     #include "createExplicitSources.H"
67     #include "createPorousZones.H"
68     #include "initContinuityErrs.H"
69     #include "readTimeControls.H"
70     #include "compressibleCourantNo.H"
71     #include "setInitialDeltaT.H"
73     // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
75     Info<< "\nStarting time loop\n" << endl;
77     while (runTime.run())
78     {
79         #include "readTimeControls.H"
80         #include "readPISOControls.H"
81         #include "readAdditionalSolutionControls.H"
82         #include "compressibleCourantNo.H"
83         #include "setDeltaT.H"
85         runTime++;
87         Info<< "Time = " << runTime.timeName() << nl << endl;
89         parcels.evolve();
91         #include "chemistry.H"
92         #include "rhoEqn.H"
93         #include "UEqn.H"
94         #include "YEqn.H"
95         #include "hsEqn.H"
97         // --- PISO loop
98         for (int corr=0; corr<nCorr; corr++)
99         {
100             #include "pEqn.H"
101         }
103         turbulence->correct();
105         rho = thermo.rho();
107         if (runTime.write())
108         {
109             chemistry.dQ()().write();
110         }
112         Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
113             << "  ClockTime = " << runTime.elapsedClockTime() << " s"
114             << nl << endl;
115     }
117     Info<< "End\n" << endl;
119     return(0);
123 // ************************************************************************* //