Merge branch 'master' of ssh://git.code.sf.net/p/foam-extend/foam-extend-3.2
[foam-extend-3.2.git] / applications / solvers / multiphase / MRFInterFoam / MRFInterFoam.C
blob2e0b58796c684ff8551ce627a4ac1161c80a9399
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | foam-extend: Open Source CFD
4    \\    /   O peration     | Version:     3.2
5     \\  /    A nd           | Web:         http://www.foam-extend.org
6      \\/     M anipulation  | For copyright notice see file Copyright
7 -------------------------------------------------------------------------------
8 License
9     This file is part of foam-extend.
11     foam-extend 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 3 of the License, or (at your
14     option) any later version.
16     foam-extend is distributed in the hope that it will be useful, but
17     WITHOUT ANY WARRANTY; without even the implied warranty of
18     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
19     General Public License for more details.
21     You should have received a copy of the GNU General Public License
22     along with foam-extend.  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"
47 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49 int main(int argc, char *argv[])
51     #include "setRootCase.H"
52     #include "createTime.H"
53     #include "createMesh.H"
54     #include "readGravitationalAcceleration.H"
55     #include "readPIMPLEControls.H"
56     #include "initContinuityErrs.H"
57     #include "createFields.H"
58     #include "createMRFZones.H"
59     #include "readTimeControls.H"
60     #include "correctPhi.H"
61     #include "CourantNo.H"
62     #include "setInitialDeltaT.H"
64     // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
66     Info<< "\nStarting time loop\n" << endl;
68     while (runTime.run())
69     {
70         #include "readPIMPLEControls.H"
71         #include "readTimeControls.H"
72         #include "CourantNo.H"
73         #include "setDeltaT.H"
75         runTime++;
77         Info<< "Time = " << runTime.timeName() << nl << endl;
79         // Pressure-velocity corrector
80         int oCorr = 0;
81         do
82         {
83             twoPhaseProperties.correct();
85 #           include "alphaEqnSubCycle.H"
87 #           include "UEqn.H"
89             // --- PISO loop
90             for (int corr=0; corr<nCorr; corr++)
91             {
92 #               include "pEqn.H"
93             }
95 #           include "continuityErrs.H"
97             turbulence->correct();
98         } while (++oCorr < nOuterCorr);
100         runTime.write();
102         Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
103             << "  ClockTime = " << runTime.elapsedClockTime() << " s"
104             << nl << endl;
105     }
107     Info<< "End\n" << endl;
109     return 0;
113 // ************************************************************************* //