ENH: autoLayerDriver: better layering information message
[OpenFOAM-2.0.x.git] / applications / solvers / lagrangian / reactingParcelFilmFoam / reactingParcelFilmFoam.C
blob4d2025cf1a37d9b11b3255f50e7dc5c63638610d
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
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     reactingParcelFilmFoam
27 Description
28     Transient PISO solver for compressible, laminar or turbulent flow with
29     reacting Lagrangian parcels, and surface film modelling.
31 \*---------------------------------------------------------------------------*/
33 #include "fvCFD.H"
34 #include "hCombustionThermo.H"
35 #include "turbulenceModel.H"
36 #include "basicReactingCloud.H"
37 #include "surfaceFilmModel.H"
38 #include "psiChemistryModel.H"
39 #include "chemistrySolver.H"
40 #include "radiationModel.H"
41 #include "SLGThermo.H"
42 #include "pimpleControl.H"
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 int main(int argc, char *argv[])
48     #include "setRootCase.H"
50     #include "createTime.H"
51     #include "createMesh.H"
52     #include "readChemistryProperties.H"
53     #include "readGravitationalAcceleration.H"
54     #include "createFields.H"
55     #include "createClouds.H"
56     #include "createRadiationModel.H"
57     #include "createSurfaceFilmModel.H"
58     #include "initContinuityErrs.H"
59     #include "readTimeControls.H"
60     #include "compressibleCourantNo.H"
61     #include "setInitialDeltaT.H"
63     pimpleControl pimple(mesh);
65     // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
67     Info<< "\nStarting time loop\n" << endl;
69     while (runTime.run())
70     {
71         #include "readTimeControls.H"
72         #include "compressibleCourantNo.H"
73         #include "setMultiRegionDeltaT.H"
74         #include "setDeltaT.H"
76         runTime++;
78         Info<< "Time = " << runTime.timeName() << nl << endl;
80         parcels.evolve();
82         surfaceFilm.evolve();
84         if (solvePrimaryRegion)
85         {
86             #include "chemistry.H"
87             #include "rhoEqn.H"
89             // --- PIMPLE loop
90             for (pimple.start(); pimple.loop(); pimple++)
91             {
92                 #include "UEqn.H"
93                 #include "YEqn.H"
94                 #include "hsEqn.H"
96                 // --- PISO loop
97                 for (int corr=1; corr<=pimple.nCorr(); corr++)
98                 {
99                     #include "pEqn.H"
100                 }
102                 if (pimple.turbCorr())
103                 {
104                     turbulence->correct();
105                 }
106             }
108             rho = thermo.rho();
110             if (runTime.write())
111             {
112                 chemistry.dQ()().write();
113             }
114         }
115         else
116         {
117             runTime.write();
118         }
120         Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
121             << "  ClockTime = " << runTime.elapsedClockTime() << " s"
122             << nl << endl;
123     }
125     Info<< "End" << endl;
127     return(0);
131 // ************************************************************************* //