multiphaseEulerFoam.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  multiphaseEulerFoam
26 
27 Group
28  grpMultiphaseSolvers
29 
30 Description
31  Solver for a system of many compressible fluid phases including
32  heat-transfer.
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #include "fvCFD.H"
37 #include "multiphaseSystem.H"
38 #include "phaseModel.H"
39 #include "dragModel.H"
40 #include "heatTransferModel.H"
43 #include "pimpleControl.H"
44 #include "IOMRFZoneList.H"
45 #include "CorrectPhi.H"
47 
48 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49 
50 int main(int argc, char *argv[])
51 {
52  #include "setRootCase.H"
53 
54  #include "createTime.H"
55  #include "createMesh.H"
56 
57  pimpleControl pimple(mesh);
58 
59  #include "createFields.H"
60  #include "createMRFZones.H"
61  #include "initContinuityErrs.H"
62  #include "createTimeControls.H"
63  #include "correctPhi.H"
64  #include "CourantNo.H"
65  #include "setInitialDeltaT.H"
66 
67  turbulence->validate();
68 
69  // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
70 
71  Info<< "\nStarting time loop\n" << endl;
72 
73  while (runTime.run())
74  {
75  #include "createTimeControls.H"
76  #include "CourantNo.H"
77  #include "setDeltaT.H"
78 
79  runTime++;
80  Info<< "Time = " << runTime.timeName() << nl << endl;
81 
82  // --- Pressure-velocity PIMPLE corrector loop
83  while (pimple.loop())
84  {
85  turbulence->correct();
86  fluid.solve();
87  rho = fluid.rho();
88  #include "zonePhaseVolumes.H"
89 
90  //#include "TEqns.H"
91  #include "UEqns.H"
92 
93  // --- Pressure corrector loop
94  while (pimple.correct())
95  {
96  #include "pEqn.H"
97  }
98 
99  #include "DDtU.H"
100  }
101 
102  runTime.write();
103 
104  Info<< "ExecutionTime = "
105  << runTime.elapsedCpuTime()
106  << " s\n\n" << endl;
107  }
108 
109  Info<< "End\n" << endl;
110 
111  return 0;
112 }
113 
114 
115 // ************************************************************************* //
singlePhaseTransportModel.H
fluid
multiphaseSystem & fluid
Definition: createFields.H:10
turbulentTransportModel.H
Foam::endl
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:251
zonePhaseVolumes.H
pimpleControl.H
turbulence
autoPtr< compressible::turbulenceModel > turbulence
Definition: createFields.H:23
Foam::nl
static const char nl
Definition: Ostream.H:260
Foam::Info
messageStream Info
main
int main(int argc, char *argv[])
Definition: postCalc.C:54
createMRFZones.H
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:18
IOMRFZoneList.H
rho
rho
Definition: pEqn.H:3
setRootCase.H
createTimeControls.H
Read the control parameters used by setDeltaT.
createMesh.H
CorrectPhi.H
createTime.H
fvCFD.H
pimple
const dictionary & pimple
Definition: readFluidMultiRegionPIMPLEControls.H:1
fixedFluxPressureFvPatchScalarField.H