1 /*---------------------------------------------------------------------------*\
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 -------------------------------------------------------------------------------
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/>.
28 Solver for 2 incompressible, isothermal immiscible fluids with phase-change
29 (e.g. cavitation). Uses a VOF (volume of fluid) phase-fraction based
30 interface capturing approach.
32 The momentum and other fluid properties are of the "mixture" and a
33 single momentum equation is solved.
35 The set of phase-change models provided are designed to simulate cavitation
36 but other mechanisms of phase-change are supported within this solver
39 Turbulence modelling is generic, i.e. laminar, RAS or LES may be selected.
41 \*---------------------------------------------------------------------------*/
46 #include "interfaceProperties.H"
47 #include "phaseChangeTwoPhaseMixture.H"
48 #include "turbulenceModel.H"
50 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
52 int main(int argc, char *argv[])
54 # include "setRootCase.H"
55 # include "createTime.H"
56 # include "createMesh.H"
57 # include "readGravitationalAcceleration.H"
58 # include "readPISOControls.H"
59 # include "initContinuityErrs.H"
60 # include "createFields.H"
61 # include "readTimeControls.H"
62 # include "correctPhi.H"
63 # include "CourantNo.H"
64 # include "setInitialDeltaT.H"
66 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
68 Info<< "\nStarting time loop\n" << endl;
72 # include "readPISOControls.H"
73 # include "readTimeControls.H"
74 # include "CourantNo.H"
75 # include "setDeltaT.H"
79 Info<< "Time = " << runTime.timeName() << nl << endl;
81 # include "alphaEqnSubCycle.H"
83 turbulence->correct();
85 // --- Outer-corrector loop
86 for (int oCorr=0; oCorr<nOuterCorr; oCorr++)
91 for (int corr = 0; corr < nCorr; corr++)
96 # include "continuityErrs.H"
99 twoPhaseProperties->correct();
103 Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
104 << " ClockTime = " << runTime.elapsedClockTime() << " s"
108 Info<< "End\n" << endl;
114 // ************************************************************************* //