00001 /*---------------------------------------------------------------------------*\ 00002 ========= | 00003 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox 00004 \\ / O peration | 00005 \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. 00006 \\/ M anipulation | 00007 ------------------------------------------------------------------------------- 00008 License 00009 This file is part of OpenFOAM. 00010 00011 OpenFOAM is free software: you can redistribute it and/or modify it 00012 under the terms of the GNU General Public License as published by 00013 the Free Software Foundation, either version 3 of the License, or 00014 (at your option) any later version. 00015 00016 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT 00017 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00018 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 00019 for more details. 00020 00021 You should have received a copy of the GNU General Public License 00022 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. 00023 00024 Application 00025 MRFInterFoam 00026 00027 Description 00028 Solver for 2 incompressible, isothermal immiscible fluids. 00029 00030 Using a VOF (volume of fluid) phase-fraction based interface capturing 00031 approach. The momentum and other fluid properties are of the "mixture" and 00032 a single momentum equation is solved. 00033 00034 Turbulence modelling is generic, i.e. laminar, RAS or LES may be selected. 00035 00036 For a two-fluid approach see twoPhaseEulerFoam. 00037 00038 \*---------------------------------------------------------------------------*/ 00039 00040 #include <finiteVolume/fvCFD.H> 00041 #include <finiteVolume/MULES.H> 00042 #include <OpenFOAM/subCycle.H> 00043 #include <interfaceProperties/interfaceProperties.H> 00044 #include <incompressibleTransportModels/twoPhaseMixture.H> 00045 #include <incompressibleTurbulenceModel/turbulenceModel.H> 00046 #include <finiteVolume/MRFZones.H> 00047 00048 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00049 00050 int main(int argc, char *argv[]) 00051 { 00052 #include <OpenFOAM/setRootCase.H> 00053 #include <OpenFOAM/createTime.H> 00054 #include <OpenFOAM/createMesh.H> 00055 #include <finiteVolume/readPISOControls.H> 00056 #include <finiteVolume/initContinuityErrs.H> 00057 #include "../createFields.H" 00058 #include "createMRFZones.H" 00059 #include <finiteVolume/readTimeControls.H> 00060 #include "../correctPhi.H" 00061 #include <finiteVolume/CourantNo.H> 00062 #include <finiteVolume/setInitialDeltaT.H> 00063 00064 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00065 00066 Info<< "\nStarting time loop\n" << endl; 00067 00068 while (runTime.run()) 00069 { 00070 #include <finiteVolume/readPISOControls.H> 00071 #include <finiteVolume/readTimeControls.H> 00072 #include <finiteVolume/CourantNo.H> 00073 #include "../alphaCourantNo.H" 00074 #include "../setDeltaT.H" 00075 00076 runTime++; 00077 00078 Info<< "Time = " << runTime.timeName() << nl << endl; 00079 00080 twoPhaseProperties.correct(); 00081 00082 #include "../alphaEqnSubCycle.H" 00083 #include "zonePhaseVolumes.H" 00084 00085 #include "UEqn.H" 00086 00087 // --- PISO loop 00088 for (int corr=0; corr<nCorr; corr++) 00089 { 00090 #include "pEqn.H" 00091 } 00092 00093 turbulence->correct(); 00094 00095 runTime.write(); 00096 00097 Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" 00098 << " ClockTime = " << runTime.elapsedClockTime() << " s" 00099 << nl << endl; 00100 } 00101 00102 Info<< "End\n" << endl; 00103 00104 return 0; 00105 } 00106 00107 // ************************ vim: set sw=4 sts=4 et: ************************ //