1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
7 -------------------------------------------------------------------------------
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
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/>.
28 Solver for 2 incompressible, isothermal immiscible fluids using a VOF
29 (volume of fluid) phase-fraction based interface capturing approach.
31 The momentum and other fluid properties are of the "mixture" and a single
32 momentum equation is solved.
34 Turbulence modelling is generic, i.e. laminar, RAS or LES may be selected.
36 For a two-fluid approach see twoPhaseEulerFoam.
38 \*---------------------------------------------------------------------------*/
43 #include "interfaceProperties.H"
44 #include "twoPhaseMixture.H"
45 #include "turbulenceModel.H"
46 #include "interpolationTable.H"
47 #include "pimpleControl.H"
49 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
51 int main(int argc, char *argv[])
53 #include "setRootCase.H"
54 #include "createTime.H"
55 #include "createMesh.H"
57 pimpleControl pimple(mesh);
59 #include "initContinuityErrs.H"
60 #include "createFields.H"
61 #include "readTimeControls.H"
62 #include "correctPhi.H"
63 #include "CourantNo.H"
64 #include "setInitialDeltaT.H"
67 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
69 Info<< "\nStarting time loop\n" << endl;
73 #include "readTimeControls.H"
74 #include "CourantNo.H"
75 #include "alphaCourantNo.H"
76 #include "setDeltaT.H"
80 Info<< "Time = " << runTime.timeName() << nl << endl;
82 twoPhaseProperties.correct();
84 #include "alphaEqnSubCycle.H"
86 // --- Pressure-velocity PIMPLE corrector loop
87 for (pimple.start(); pimple.loop(); pimple++)
92 for (int corr=0; corr<pimple.nCorr(); corr++)
97 if (pimple.turbCorr())
99 turbulence->correct();
105 Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
106 << " ClockTime = " << runTime.elapsedClockTime() << " s"
110 Info<< "End\n" << endl;
116 // ************************************************************************* //