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/>.
25 compressibleLesInterFoam
28 Solver for 2 compressible, 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
33 The momentum and other fluid properties are of the "mixture" and a
34 single momentum equation is solved. Turbulence modelling is generic,
35 i.e. laminar, RAS or LES may be selected.
37 \*---------------------------------------------------------------------------*/
40 #include "dynamicFvMesh.H"
43 #include "interfaceProperties.H"
44 #include "twoPhaseMixture.H"
45 #include "turbulenceModel.H"
47 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49 int main(int argc, char *argv[])
51 #include "setRootCase.H"
52 #include "createTime.H"
53 #include "createDynamicFvMesh.H"
54 #include "readGravitationalAcceleration.H"
55 #include "readControls.H"
56 #include "initContinuityErrs.H"
57 #include "createFields.H"
58 #include "CourantNo.H"
59 #include "setInitialDeltaT.H"
61 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
62 Info<< "\nStarting time loop\n" << endl;
66 #include "readControls.H"
67 #include "CourantNo.H"
69 // Make the fluxes absolute
70 fvc::makeAbsolute(phi, U);
72 #include "setDeltaT.H"
76 Info<< "Time = " << runTime.timeName() << nl << endl;
79 // Store divU from the previous mesh for the correctPhi
80 volScalarField divU = fvc::div(phi);
82 bool meshChanged = mesh.update();
83 reduce(meshChanged, orOp<bool>());
85 # include "volContinuity.H"
87 if (correctPhi && meshChanged)
89 # include "correctPhi.H"
93 // Make the fluxes relative to the mesh motion
94 fvc::makeRelative(phi, U);
96 if (checkMeshCourantNo)
98 # include "meshCourantNo.H"
101 turbulence->correct();
103 // --- Outer-corrector loop
104 for (int oCorr=0; oCorr<nOuterCorr; oCorr++)
106 #include "alphaEqnsSubCycle.H"
108 solve(fvm::ddt(rho) + fvc::div(rhoPhi));
113 for (int corr = 0; corr < nCorr; corr++)
119 rho = alpha1*rho1 + alpha2*rho2;
123 Info<< "ExecutionTime = "
124 << runTime.elapsedCpuTime()
128 Info<< "End\n" << endl;
134 // ************************************************************************* //