OpenFOAM
7
The OpenFOAM Foundation
reactingMultiphaseEulerFoam.C
Go to the documentation of this file.
1
/*---------------------------------------------------------------------------*\
2
========= |
3
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4
\\ / O peration | Website: https://openfoam.org
5
\\ / A nd | Copyright (C) 2011-2018 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
reactingMultiphaseEulerFoam
26
27
Description
28
Solver for a system of any number of compressible fluid phases with a
29
common pressure, but otherwise separate properties. The type of phase model
30
is run time selectable and can optionally represent multiple species and
31
in-phase reactions. The phase system is also run time selectable and can
32
optionally represent different types of momentun, heat and mass transfer.
33
34
\*---------------------------------------------------------------------------*/
35
36
#include "
fvCFD.H
"
37
#include "multiphaseSystem.H"
38
#include "phaseCompressibleTurbulenceModel.H"
39
#include "
pimpleControl.H
"
40
#include "
localEulerDdtScheme.H
"
41
#include "
fvcSmooth.H
"
42
43
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44
45
int
main(
int
argc,
char
*argv[])
46
{
47
#include "
postProcess.H
"
48
49
#include "
setRootCaseLists.H
"
50
#include "
createTime.H
"
51
#include "
createMesh.H
"
52
#include "createControl.H"
53
#include "
createTimeControls.H
"
54
#include "createFields.H"
55
#include "createFieldRefs.H"
56
57
if
(!
LTS
)
58
{
59
#include "CourantNo.H"
60
#include "setInitialDeltaT.H"
61
}
62
63
Switch faceMomentum
64
(
65
pimple
.dict().lookupOrDefault<Switch>(
"faceMomentum"
,
false
)
66
);
67
Switch partialElimination
68
(
69
pimple
.dict().lookupOrDefault<Switch>(
"partialElimination"
,
false
)
70
);
71
72
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
73
74
Info
<<
"\nStarting time loop\n"
<<
endl
;
75
76
while
(
runTime
.run())
77
{
78
#include "
readTimeControls.H
"
79
80
int
nEnergyCorrectors
81
(
82
pimple
.dict().lookupOrDefault<
int
>(
"nEnergyCorrectors"
, 1)
83
);
84
85
if
(
LTS
)
86
{
87
#include "setRDeltaT.H"
88
}
89
else
90
{
91
#include "CourantNo.H"
92
#include "setDeltaT.H"
93
}
94
95
runTime
++;
96
Info
<<
"Time = "
<<
runTime
.timeName() <<
nl
<<
endl
;
97
98
// --- Pressure-velocity PIMPLE corrector loop
99
while
(
pimple
.loop())
100
{
101
fluid
.solve();
102
fluid
.correct();
103
104
#include "YEqns.H"
105
106
if
(faceMomentum)
107
{
108
#include "pUf/UEqns.H"
109
#include "EEqns.H"
110
#include "pUf/pEqn.H"
111
}
112
else
113
{
114
#include "pU/UEqns.H"
115
#include "EEqns.H"
116
#include "pU/pEqn.H"
117
}
118
119
fluid
.correctKinematics();
120
121
if
(
pimple
.turbCorr())
122
{
123
fluid
.correctTurbulence();
124
}
125
}
126
127
runTime
.write();
128
129
Info
<<
"ExecutionTime = "
130
<<
runTime
.elapsedCpuTime()
131
<<
" s\n\n"
<<
endl
;
132
}
133
134
Info
<<
"End\n"
<<
endl
;
135
136
return
0;
137
}
138
139
140
// ************************************************************************* //
fvCFD.H
pimple
pimpleNoLoopControl & pimple
Definition:
setRegionFluidFields.H:58
fluid
multiphaseSystem & fluid
Definition:
createFields.H:11
setRootCaseLists.H
runTime
engineTime & runTime
Definition:
createEngineTime.H:13
Foam::endl
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition:
Ostream.H:256
readTimeControls.H
Read the control parameters used by setDeltaT.
createTime.H
Foam::nl
static const char nl
Definition:
Ostream.H:265
LTS
bool LTS
Definition:
createRDeltaT.H:1
createMesh.H
pimpleControl.H
localEulerDdtScheme.H
Foam::Info
messageStream Info
postProcess.H
Execute application functionObjects to post-process existing results.
fvcSmooth.H
Provides functions smooth spread and sweep which use the FaceCellWave algorithm to smooth and redistr...
createTimeControls.H
Read the control parameters used by setDeltaT.
applications
solvers
multiphase
reactingEulerFoam
reactingMultiphaseEulerFoam
reactingMultiphaseEulerFoam.C
Generated by
1.8.13