1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 1991-2010 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 incompressible, isothermal immiscible fluids using a VOF
29 (volume of fluid) phase-fraction based interface capturing approach,
30 with optional mesh motion and mesh topology changes including adaptive
34 - interDyMFoam [OPTION]
36 @param -case \<dir\> \n
37 Specify the case directory
40 Run the case in parallel
43 Display short usage message
46 Display Doxygen documentation page
51 \*---------------------------------------------------------------------------*/
53 #include <finiteVolume/fvCFD.H>
54 #include <dynamicFvMesh/dynamicFvMesh.H>
55 #include <finiteVolume/MULES.H>
56 #include <OpenFOAM/subCycle.H>
57 #include <interfaceProperties/interfaceProperties.H>
58 #include <incompressibleTransportModels/twoPhaseMixture.H>
59 #include <incompressibleTurbulenceModel/turbulenceModel.H>
61 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
63 int main(int argc, char *argv[])
65 #include <OpenFOAM/setRootCase.H>
66 #include <OpenFOAM/createTime.H>
67 #include <dynamicFvMesh/createDynamicFvMesh.H>
68 #include <finiteVolume/readPISOControls.H>
69 #include <finiteVolume/initContinuityErrs.H>
70 #include "../createFields.H"
71 #include <finiteVolume/readTimeControls.H>
72 #include "../correctPhi.H"
73 #include <finiteVolume/CourantNo.H>
74 #include <finiteVolume/setInitialDeltaT.H>
76 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
77 Info<< "\nStarting time loop\n" << endl;
81 #include "readControls.H"
82 #include "../alphaCourantNo.H"
83 #include <finiteVolume/CourantNo.H>
85 // Make the fluxes absolute
86 fvc::makeAbsolute(phi, U);
88 #include "../setDeltaT.H"
92 Info<< "Time = " << runTime.timeName() << nl << endl;
94 scalar timeBeforeMeshUpdate = runTime.elapsedCpuTime();
96 // Do any mesh changes
101 Info<< "Execution time for mesh.update() = "
102 << runTime.elapsedCpuTime() - timeBeforeMeshUpdate
109 if (mesh.changing() && correctPhi)
111 #include "../correctPhi.H"
114 // Make the fluxes relative to the mesh motion
115 fvc::makeRelative(phi, U);
117 if (mesh.changing() && checkMeshCourantNo)
119 #include <dynamicFvMesh/meshCourantNo.H>
122 twoPhaseProperties.correct();
124 #include "../alphaEqnSubCycle.H"
129 for (int corr=0; corr<nCorr; corr++)
134 turbulence->correct();
138 Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
139 << " ClockTime = " << runTime.elapsedClockTime() << " s"
143 Info<< "End\n" << endl;
149 // ************************ vim: set sw=4 sts=4 et: ************************ //