OpenFOAM
4.1
The OpenFOAM Foundation
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
applications
solvers
multiphase
multiphaseEulerFoam
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-2016 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
Description
28
Solver for a system of many compressible fluid phases including
29
heat-transfer.
30
31
\*---------------------------------------------------------------------------*/
32
33
#include "
fvCFD.H
"
34
#include "multiphaseSystem.H"
35
#include "phaseModel.H"
36
#include "dragModel.H"
37
#include "heatTransferModel.H"
38
#include "
singlePhaseTransportModel.H
"
39
#include "
turbulentTransportModel.H
"
40
#include "
pimpleControl.H
"
41
#include "
IOMRFZoneList.H
"
42
#include "
CorrectPhi.H
"
43
44
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45
46
int
main(
int
argc,
char
*argv[])
47
{
48
#include "
postProcess.H
"
49
50
#include "
setRootCase.H
"
51
#include "
createTime.H
"
52
#include "
createMesh.H
"
53
#include "createControl.H"
54
#include "createFields.H"
55
#include "initContinuityErrs.H"
56
#include "
createTimeControls.H
"
57
#include "correctPhi.H"
58
#include "CourantNo.H"
59
#include "setInitialDeltaT.H"
60
61
scalar slamDampCoeff
62
(
63
fluid
.lookupOrDefault<scalar>(
"slamDampCoeff"
, 1)
64
);
65
66
dimensionedScalar
maxSlamVelocity
67
(
68
"maxSlamVelocity"
,
69
dimVelocity
,
70
fluid
.lookupOrDefault<scalar>(
"maxSlamVelocity"
, GREAT)
71
);
72
73
turbulence
->validate();
74
75
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
76
77
Info
<<
"\nStarting time loop\n"
<<
endl
;
78
79
while
(runTime.run())
80
{
81
#include "
readTimeControls.H
"
82
#include "CourantNo.H"
83
#include "setDeltaT.H"
84
85
runTime++;
86
Info
<<
"Time = "
<< runTime.timeName() <<
nl
<<
endl
;
87
88
// --- Pressure-velocity PIMPLE corrector loop
89
while
(
pimple
.loop())
90
{
91
turbulence
->correct();
92
fluid
.solve();
93
rho
=
fluid
.rho();
94
#include "
zonePhaseVolumes.H
"
95
96
//#include "TEqns.H"
97
#include "UEqns.H"
98
99
// --- Pressure corrector loop
100
while
(
pimple
.correct())
101
{
102
#include "pEqn.H"
103
}
104
105
#include "DDtU.H"
106
}
107
108
runTime.write();
109
110
Info
<<
"ExecutionTime = "
111
<< runTime.elapsedCpuTime()
112
<<
" s\n\n"
<<
endl
;
113
}
114
115
Info
<<
"End\n"
<<
endl
;
116
117
return
0;
118
}
119
120
121
// ************************************************************************* //
turbulence
autoPtr< compressible::turbulenceModel > turbulence
Definition:
createFields.H:23
fvCFD.H
fluid
multiphaseSystem & fluid
Definition:
createFields.H:10
pimple
const dictionary & pimple
Definition:
readFluidMultiRegionPIMPLEControls.H:1
Foam::endl
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition:
Ostream.H:253
readTimeControls.H
Read the control parameters used by setDeltaT.
CorrectPhi.H
createTime.H
turbulentTransportModel.H
IOMRFZoneList.H
rho
rho
Definition:
readInitialConditions.H:96
Foam::nl
static const char nl
Definition:
Ostream.H:262
createMesh.H
setRootCase.H
Foam::dimensionedScalar
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
Definition:
dimensionedScalarFwd.H:41
pimpleControl.H
Foam::Info
messageStream Info
zonePhaseVolumes.H
postProcess.H
Execute application functionObjects to post-process existing results.
createTimeControls.H
Read the control parameters used by setDeltaT.
singlePhaseTransportModel.H
Foam::dimVelocity
const dimensionSet dimVelocity
Generated by
1.8.11