ENH: autoLayerDriver: better layering information message
[OpenFOAM-2.0.x.git] / applications / solvers / multiphase / settlingFoam / settlingFoam.C
blob76f141bbea63421a41fe7098fe05609ff454b1f9
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     settlingFoam
27 Description
28     Solver for 2 incompressible fluids for simulating the settling of the
29     dispersed phase.
31 \*---------------------------------------------------------------------------*/
33 #include "fvCFD.H"
34 #include "nearWallDist.H"
35 #include "wallFvPatch.H"
36 #include "bound.H"
37 #include "Switch.H"
38 #include "plasticViscosity.H"
39 #include "yieldStress.H"
40 #include "pimpleControl.H"
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 int main(int argc, char *argv[])
46     #include "setRootCase.H"
48     #include "createTime.H"
49     #include "createMesh.H"
50     #include "readGravitationalAcceleration.H"
51     #include "createFields.H"
52     #include "initContinuityErrs.H"
54     pimpleControl pimple(mesh);
56     // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
58     Info<< "\nStarting time loop\n" << endl;
60     while (runTime.loop())
61     {
62         Info<< "Time = " << runTime.timeName() << nl << endl;
64         #include "compressibleCourantNo.H"
66         #include "rhoEqn.H"
68         for (pimple.start(); pimple.loop(); pimple++)
69         {
70             #include "calcVdj.H"
72             #include "UEqn.H"
74             #include "alphaEqn.H"
76             #include "correctViscosity.H"
78             // --- PISO loop
79             for (int corr=0; corr<pimple.nCorr(); corr++)
80             {
81                 #include "pEqn.H"
82             }
84             if (pimple.turbCorr())
85             {
86                 #include "kEpsilon.H"
87             }
88         }
90         runTime.write();
92         Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
93             << "  ClockTime = " << runTime.elapsedClockTime() << " s"
94             << nl << endl;
95     }
97     Info<< "End\n" << endl;
99     return 0;
103 // ************************************************************************* //