1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
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 compressible, 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 \*---------------------------------------------------------------------------*/
41 #include "interfaceProperties.H"
42 #include "twoPhaseMixture.H"
43 #include "turbulenceModel.H"
44 #include "pimpleControl.H"
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48 int main(int argc, char *argv[])
50 #include "setRootCase.H"
51 #include "createTime.H"
52 #include "createMesh.H"
53 #include "readGravitationalAcceleration.H"
55 pimpleControl pimple(mesh);
57 #include "readControls.H"
58 #include "initContinuityErrs.H"
59 #include "createFields.H"
60 #include "CourantNo.H"
61 #include "setInitialDeltaT.H"
63 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
65 Info<< "\nStarting time loop\n" << endl;
69 #include "readControls.H"
70 #include "CourantNo.H"
71 #include "setDeltaT.H"
75 Info<< "Time = " << runTime.timeName() << nl << endl;
77 // --- Outer-corrector loop
78 for (pimple.start(); pimple.loop(); pimple++)
80 #include "alphaEqnsSubCycle.H"
82 solve(fvm::ddt(rho) + fvc::div(rhoPhi));
87 for (int corr=0; corr<pimple.nCorr(); corr++)
92 if (pimple.turbCorr())
94 turbulence->correct();
98 rho = alpha1*rho1 + alpha2*rho2;
102 Info<< "ExecutionTime = "
103 << runTime.elapsedCpuTime()
107 Info<< "End\n" << endl;
113 // ************************************************************************* //