ENH: sixDoFRigidBodyDisplacement. rho field handling and new tutorial.
[OpenFOAM-1.6.x.git] / applications / solvers / lagrangian / porousExplicitSourceReactingParcelFoam / porousExplicitSourceReactingParcelFoam.C
blob436fda7a8bb9089cda3c62e1dd48fd38461aabea
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 2008-2009 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 the
13     Free Software Foundation; either version 2 of the License, or (at your
14     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, write to the Free Software Foundation,
23     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25 Application
26     porousExplicitSourceReactingParcelFoam
28 Description
29     Transient PISO solver for compressible, laminar or turbulent flow with
30     reacting multiphase Lagrangian parcels for porous media, including explicit
31     sources for mass, momentum and energy
33     The solver includes:
34     - reacting multiphase parcel cloud
35     - porous media
36     - mass, momentum and energy sources
37     - polynomial based, incompressible thermodynamics (f(T))
39     Note: ddtPhiCorr not used here when porous zones are active
40     - not well defined for porous calculations
42 \*---------------------------------------------------------------------------*/
44 #include "fvCFD.H"
45 #include "hReactionThermo.H"
46 #include "turbulenceModel.H"
47 #include "BasicReactingMultiphaseCloud.H"
48 #include "rhoChemistryModel.H"
49 #include "chemistrySolver.H"
50 #include "radiationModel.H"
51 #include "porousZones.H"
52 #include "timeActivatedExplicitSource.H"
54 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
56 int main(int argc, char *argv[])
58     #include "setRootCase.H"
60     #include "createTime.H"
61     #include "createMesh.H"
62     #include "readChemistryProperties.H"
63     #include "readGravitationalAcceleration.H"
64     #include "createFields.H"
65     #include "createRadiationModel.H"
66     #include "createClouds.H"
67     #include "createExplicitSources.H"
68     #include "createPorousZones.H"
69     #include "initContinuityErrs.H"
70     #include "readTimeControls.H"
71     #include "compressibleCourantNo.H"
72     #include "setInitialDeltaT.H"
74     // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
76     Info<< "\nStarting time loop\n" << endl;
78     while (runTime.run())
79     {
80         #include "readTimeControls.H"
81         #include "readPISOControls.H"
82         #include "readAdditionalSolutionControls.H"
83         #include "compressibleCourantNo.H"
84         #include "setDeltaT.H"
86         runTime++;
88         Info<< "Time = " << runTime.timeName() << nl << endl;
90         parcels.evolve();
92         #include "chemistry.H"
93         #include "rhoEqn.H"
94         #include "UEqn.H"
95         #include "YEqn.H"
96         #include "hsEqn.H"
98         // --- PISO loop
99         for (int corr=0; corr<nCorr; corr++)
100         {
101             #include "pEqn.H"
102         }
104         turbulence->correct();
106         rho = thermo.rho();
108         if (runTime.write())
109         {
110             chemistry.dQ()().write();
111         }
113         Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
114             << "  ClockTime = " << runTime.elapsedClockTime() << " s"
115             << nl << endl;
116     }
118     Info<< "End\n" << endl;
120     return(0);
124 // ************************************************************************* //