ENH: Include relative includes directly, instead of using -I
[freefoam.git] / applications / solvers / compressible / rhoPorousMRFPimpleFoam / rhoPorousMRFPimpleFoam.C
blob985813eed802754b7bd76f257f245b77aeb3a744
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 1991-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     rhoPorousMRFPimpleFoam
27 Description
28     Transient solver for laminar or turbulent flow of compressible fluids
29     with support for porous media and MRF for HVAC and similar applications.
31     Uses the flexible PIMPLE (PISO-SIMPLE) solution for time-resolved and
32     pseudo-transient simulations.
34 Usage
35     - rhoPorousMRFPimpleFoam [OPTION]
37     @param -case \<dir\> \n
38     Specify the case directory
40     @param -parallel \n
41     Run the case in parallel
43     @param -help \n
44     Display short usage message
46     @param -doc \n
47     Display Doxygen documentation page
49     @param -srcDoc \n
50     Display source code
52 \*---------------------------------------------------------------------------*/
54 #include <finiteVolume/fvCFD.H>
55 #include <basicThermophysicalModels/basicPsiThermo.H>
56 #include <compressibleTurbulenceModel/turbulenceModel.H>
57 #include <finiteVolume/bound.H>
58 #include <finiteVolume/MRFZones.H>
59 #include <finiteVolume/porousZones.H>
61 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
63 int main(int argc, char *argv[])
65     #include <OpenFOAM/setRootCase.H>
66     #include <OpenFOAM/createTime.H>
67     #include <OpenFOAM/createMesh.H>
68     #include "createFields.H"
69     #include <finiteVolume/initContinuityErrs.H>
71     // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
73     Info<< "\nStarting time loop\n" << endl;
75     while (runTime.run())
76     {
77         #include <finiteVolume/readTimeControls.H>
78         #include <finiteVolume/readPIMPLEControls.H>
79         #include <finiteVolume/compressibleCourantNo.H>
80         #include <finiteVolume/setDeltaT.H>
82         runTime++;
84         Info<< "Time = " << runTime.timeName() << nl << endl;
86         if (nOuterCorr != 1)
87         {
88             p.storePrevIter();
89             rho.storePrevIter();
90         }
92         #include <finiteVolume/rhoEqn.H>
94         // --- Pressure-velocity PIMPLE corrector loop
95         for (int oCorr=0; oCorr<nOuterCorr; oCorr++)
96         {
97             #include "UEqn.H"
98             #include "../rhoPimpleFoam/hEqn.H"
100             // --- PISO loop
101             for (int corr=0; corr<nCorr; corr++)
102             {
103                 #include "pEqn.H"
104             }
106             turbulence->correct();
107         }
109         runTime.write();
111         Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
112             << "  ClockTime = " << runTime.elapsedClockTime() << " s"
113             << nl << endl;
114     }
116     Info<< "End\n" << endl;
118     return 0;
122 // ************************ vim: set sw=4 sts=4 et: ************************ //