compressibleInterFoam.C
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
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.
15 
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
19  for more details.
20 
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/>.
23 
24 Application
25  compressibleInterFoam
26 
27 Description
28  Solver for 2 compressible, non-isothermal immiscible fluids using a VOF
29  (volume of fluid) phase-fraction based interface capturing approach.
30 
31  The momentum and other fluid properties are of the "mixture" and a single
32  momentum equation is solved.
33 
34  Turbulence modelling is generic, i.e. laminar, RAS or LES may be selected.
35 
36 \*---------------------------------------------------------------------------*/
37 
38 #include "fvCFD.H"
39 #include "MULES.H"
40 #include "subCycle.H"
41 #include "rhoThermo.H"
42 #include "interfaceProperties.H"
43 #include "twoPhaseMixture.H"
44 #include "twoPhaseMixtureThermo.H"
46 #include "pimpleControl.H"
48 
49 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
50 
51 int main(int argc, char *argv[])
52 {
53  #include "setRootCase.H"
54  #include "createTime.H"
55  #include "createMesh.H"
56 
57  pimpleControl pimple(mesh);
58 
59  #include "createTimeControls.H"
60  #include "createFields.H"
61  #include "CourantNo.H"
62  #include "setInitialDeltaT.H"
63 
64  // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
65 
66  Info<< "\nStarting time loop\n" << endl;
67 
68  while (runTime.run())
69  {
70  #include "createTimeControls.H"
71  #include "CourantNo.H"
72  #include "setDeltaT.H"
73 
74  runTime++;
75 
76  Info<< "Time = " << runTime.timeName() << nl << endl;
77 
78  // --- Pressure-velocity PIMPLE corrector loop
79  while (pimple.loop())
80  {
81  #include "alphaEqnsSubCycle.H"
82 
83  // correct interface on first PIMPLE corrector
84  if (pimple.corr() == 1)
85  {
86  interface.correct();
87  }
88 
90 
91  #include "UEqn.H"
92  #include "TEqn.H"
93 
94  // --- Pressure corrector loop
95  while (pimple.correct())
96  {
97  #include "pEqn.H"
98  }
99 
100  if (pimple.turbCorr())
101  {
102  turbulence->correct();
103  }
104  }
105 
106  runTime.write();
107 
108  Info<< "ExecutionTime = "
109  << runTime.elapsedCpuTime()
110  << " s\n\n" << endl;
111  }
112 
113  Info<< "End\n" << endl;
114 
115  return 0;
116 }
117 
118 
119 // ************************************************************************* //
rhoEqn solve()
messageStream Info
autoPtr< compressible::turbulenceModel > turbulence
Definition: createFields.H:23
tmp< GeometricField< Type, fvPatchField, volMesh > > ddt(const dimensioned< Type > dt, const fvMesh &mesh)
Definition: fvcDdt.C:45
dynamicFvMesh & mesh
rhoPhi
Definition: rhoEqn.H:10
const dictionary & pimple
MULES: Multidimensional universal limiter for explicit solution.
static const char nl
Definition: Ostream.H:260
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:251
tmp< GeometricField< Type, fvPatchField, volMesh > > div(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
Definition: fvcDiv.C:47
Read the control parameters used by setDeltaT.
int main(int argc, char *argv[])
Definition: postCalc.C:54
interfaceProperties interface(alpha1, U, mixture())