ENH: autoLayerDriver: better layering information message
[OpenFOAM-2.0.x.git] / applications / solvers / multiphase / interFoam / MRFInterFoam / MRFInterFoam.C
blobb4f87264b928e96c16e14055cc914b48a1f0baa5
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     MRFInterFoam
27 Description
28     Solver for 2 incompressible, isothermal immiscible fluids using a VOF
29     (volume of fluid) phase-fraction based interface capturing approach.
30     The momentum and other fluid properties are of the "mixture" and a single
31     momentum equation is solved.
33     Turbulence modelling is generic, i.e. laminar, RAS or LES may be selected.
35     For a two-fluid approach see twoPhaseEulerFoam.
37 \*---------------------------------------------------------------------------*/
39 #include "fvCFD.H"
40 #include "MULES.H"
41 #include "subCycle.H"
42 #include "interfaceProperties.H"
43 #include "twoPhaseMixture.H"
44 #include "turbulenceModel.H"
45 #include "MRFZones.H"
46 #include "pimpleControl.H"
48 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
50 int main(int argc, char *argv[])
52     #include "setRootCase.H"
53     #include "createTime.H"
54     #include "createMesh.H"
55     #include "initContinuityErrs.H"
56     #include "createFields.H"
57     #include "createMRFZones.H"
58     #include "readTimeControls.H"
60     pimpleControl pimple(mesh);
62     #include "correctPhi.H"
63     #include "CourantNo.H"
64     #include "setInitialDeltaT.H"
66     // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
68     Info<< "\nStarting time loop\n" << endl;
70     while (runTime.run())
71     {
72         #include "readTimeControls.H"
73         #include "CourantNo.H"
74         #include "alphaCourantNo.H"
75         #include "setDeltaT.H"
77         runTime++;
79         Info<< "Time = " << runTime.timeName() << nl << endl;
81         twoPhaseProperties.correct();
83         #include "alphaEqnSubCycle.H"
84         #include "zonePhaseVolumes.H"
86         // --- Pressure-velocity PIMPLE corrector loop
87         for (pimple.start(); pimple.loop(); pimple++)
88         {
89             #include "UEqn.H"
91             // --- PISO loop
92             for (int corr=0; corr<pimple.nCorr(); corr++)
93             {
94                 #include "pEqn.H"
95             }
97             if (pimple.turbCorr())
98             {
99                 turbulence->correct();
100             }
101         }
103         runTime.write();
105         Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
106             << "  ClockTime = " << runTime.elapsedClockTime() << " s"
107             << nl << endl;
108     }
110     Info<< "End\n" << endl;
112     return 0;
116 // ************************************************************************* //