OpenFOAM
6
The OpenFOAM Foundation
Main Page
+
Namespaces
Namespace List
+
Namespace Members
+
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
z
+
Typedefs
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
Enumerations
Enumerator
+
Classes
Class List
Class Index
Class Hierarchy
+
Class Members
+
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Typedefs
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
v
w
+
Enumerations
a
b
c
d
e
f
g
i
k
l
m
o
p
r
s
t
v
w
+
Enumerator
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Related Functions
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
+
Files
File List
+
File Members
+
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
+
Typedefs
b
c
d
f
g
k
l
m
p
r
s
t
v
w
+
Macros
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
applications
solvers
multiphase
reactingEulerFoam
reactingTwoPhaseEulerFoam
reactingTwoPhaseEulerFoam.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
reactingTwoPhaseEulerFoam
26
27
Description
28
Solver for a system of 2 compressible fluid phases with a common pressure,
29
but otherwise separate properties. The type of phase model is run time
30
selectable and can optionally represent multiple species and in-phase
31
reactions. The phase system is also run time selectable and can optionally
32
represent different types of momentun, heat and mass transfer.
33
34
\*---------------------------------------------------------------------------*/
35
36
#include "
fvCFD.H
"
37
#include "twoPhaseSystem.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
68
#include "
pUf/createRDeltaTf.H
"
69
70
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
71
72
Info
<<
"\nStarting time loop\n"
<<
endl
;
73
74
while
(
runTime
.run())
75
{
76
#include "
readTimeControls.H
"
77
78
int
nEnergyCorrectors
79
(
80
pimple
.dict().lookupOrDefault<
int
>(
"nEnergyCorrectors"
, 1)
81
);
82
83
if
(
LTS
)
84
{
85
#include "setRDeltaT.H"
86
if
(faceMomentum)
87
{
88
#include "
setRDeltaTf.H
"
89
}
90
}
91
else
92
{
93
#include "CourantNos.H"
94
#include "setDeltaT.H"
95
}
96
97
runTime
++;
98
Info
<<
"Time = "
<<
runTime
.timeName() <<
nl
<<
endl
;
99
100
// --- Pressure-velocity PIMPLE corrector loop
101
while
(
pimple
.loop())
102
{
103
fluid
.solve();
104
fluid
.correct();
105
106
#include "YEqns.H"
107
108
if
(faceMomentum)
109
{
110
#include "pUf/UEqns.H"
111
#include "EEqns.H"
112
#include "pUf/pEqn.H"
113
}
114
else
115
{
116
#include "pU/UEqns.H"
117
#include "EEqns.H"
118
#include "pU/pEqn.H"
119
}
120
121
fluid
.correctKinematics();
122
123
if
(
pimple
.turbCorr())
124
{
125
fluid
.correctTurbulence();
126
}
127
}
128
129
runTime
.write();
130
131
Info
<<
"ExecutionTime = "
132
<<
runTime
.elapsedCpuTime()
133
<<
" s\n\n"
<<
endl
;
134
}
135
136
Info
<<
"End\n"
<<
endl
;
137
138
return
0;
139
}
140
141
142
// ************************************************************************* //
fvCFD.H
pimple
pimpleNoLoopControl & pimple
Definition:
setRegionFluidFields.H:60
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
setRDeltaTf.H
createMesh.H
createRDeltaTf.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.
Generated by
1.8.13