BUG: UListIO: byteSize overflowing on really big faceLists
[OpenFOAM-2.0.x.git] / applications / solvers / incompressible / pimpleFoam / SRFPimpleFoam / SRFPimpleFoam.C
blobff12ed3f33544ada0b1312a9ef4e2fe30d2f1089
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     SRFPimpleFoam
27 Description
28     Large time-step transient solver for incompressible, flow in a single
29     rotating frame using the PIMPLE (merged PISO-SIMPLE) algorithm.
31     Turbulence modelling is generic, i.e. laminar, RAS or LES may be selected.
33 \*---------------------------------------------------------------------------*/
35 #include "fvCFD.H"
36 #include "singlePhaseTransportModel.H"
37 #include "turbulenceModel.H"
38 #include "pimpleControl.H"
39 #include "SRFModel.H"
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 int main(int argc, char *argv[])
45     #include "setRootCase.H"
46     #include "createTime.H"
47     #include "createMesh.H"
48     #include "createFields.H"
49     #include "initContinuityErrs.H"
51     pimpleControl pimple(mesh);
53     // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
55     Info<< "\nStarting time loop\n" << endl;
57     while (runTime.run())
58     {
59         #include "readTimeControls.H"
60         #include "CourantNo.H"
61         #include "setDeltaT.H"
63         runTime++;
65         Info<< "Time = " << runTime.timeName() << nl << endl;
67         // --- Pressure-velocity PIMPLE corrector loop
68         for (pimple.start(); pimple.loop(); pimple++)
69         {
70             if (pimple.nOuterCorr() != 1)
71             {
72                 p.storePrevIter();
73             }
75             #include "UrelEqn.H"
77             // --- PISO loop
78             for (int corr=0; corr<pimple.nCorr(); corr++)
79             {
80                 #include "pEqn.H"
81             }
83             // Update the absolute velocity
84             U = Urel + SRF->U();
86             if (pimple.turbCorr())
87             {
88                 turbulence->correct();
89             }
90         }
92         runTime.write();
94         Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
95             << "  ClockTime = " << runTime.elapsedClockTime() << " s"
96             << nl << endl;
97     }
99     Info<< "End\n" << endl;
101     return 0;
105 // ************************************************************************* //