initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / applications / solvers / multiphase / twoLiquidMixingFoam / twoLiquidMixingFoam.C
blobf7ebe5f721eeaa6e17e6dd25c7e6aa043ee2e875
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
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 the
13     Free Software Foundation; either version 2 of the License, or (at your
14     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, write to the Free Software Foundation,
23     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25 Application
26     twoLiquidMixingFoam
28 Description
29     Solver for mixing 2 incompressible fluids.
31     Turbulence modelling is generic, i.e. laminar, RAS or LES may be selected.
33 \*---------------------------------------------------------------------------*/
35 #include "fvCFD.H"
36 #include "twoPhaseMixture.H"
37 #include "turbulenceModel.H"
39 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
41 int main(int argc, char *argv[])
43     #include "setRootCase.H"
44     #include "createTime.H"
45     #include "createMesh.H"
46     #include "readGravitationalAcceleration.H"
47     #include "readPIMPLEControls.H"
48     #include "initContinuityErrs.H"
49     #include "createFields.H"
50     #include "readTimeControls.H"
51     #include "CourantNo.H"
52     #include "setInitialDeltaT.H"
54     // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
56     Info<< "\nStarting time loop\n" << endl;
58     while (runTime.run())
59     {
60         #include "readPIMPLEControls.H"
61         #include "readTimeControls.H"
62         #include "CourantNo.H"
63         #include "setDeltaT.H"
65         runTime++;
67         Info<< "Time = " << runTime.timeName() << nl << endl;
69         // --- Pressure-velocity PIMPLE corrector loop
70         for (int oCorr=0; oCorr<nOuterCorr; oCorr++)
71         {
72             twoPhaseProperties.correct();
74             #include "alphaEqn.H"
76             #include "UEqn.H"
78             // --- PISO loop
79             for (int corr=0; corr<nCorr; corr++)
80             {
81                 #include "pEqn.H"
82             }
84             #include "continuityErrs.H"
86             turbulence->correct();
87         }
89         runTime.write();
91         Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
92             << "  ClockTime = " << runTime.elapsedClockTime() << " s"
93             << nl << endl;
94     }
96     Info<< "End\n" << endl;
98     return 0;
102 // ************************************************************************* //