OpenFOAM
v2312
The open source CFD toolbox
thermoFoam.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 | www.openfoam.com
6
\\/ M anipulation |
7
-------------------------------------------------------------------------------
8
Copyright (C) 2013-2016 OpenFOAM Foundation
9
-------------------------------------------------------------------------------
10
License
11
This file is part of OpenFOAM.
12
13
OpenFOAM is free software: you can redistribute it and/or modify it
14
under the terms of the GNU General Public License as published by
15
the Free Software Foundation, either version 3 of the License, or
16
(at your option) any later version.
17
18
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21
for more details.
22
23
You should have received a copy of the GNU General Public License
24
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25
26
Application
27
thermoFoam
28
29
Group
30
grpHeatTransferSolvers
31
32
Description
33
Solver for energy transport and thermodynamics on a frozen flow field.
34
35
\*---------------------------------------------------------------------------*/
36
37
#include "
fvCFD.H
"
38
#include "
rhoThermo.H
"
39
#include "
turbulentFluidThermoModel.H
"
40
#include "
LESModel.H
"
41
#include "
radiationModel.H
"
42
#include "
fvOptions.H
"
43
#include "
simpleControl.H
"
44
#include "
pimpleControl.H
"
45
46
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47
48
int
main(
int
argc,
char
*argv[])
49
{
50
argList::addNote
51
(
52
"Solver for energy transport and thermodynamics on a frozen flow field"
53
);
54
55
#define NO_CONTROL
56
#include "
postProcess.H
"
57
58
#include "
addCheckCaseOptions.H
"
59
#include "
setRootCaseLists.H
"
60
#include "
createTime.H
"
61
#include "
createMesh.H
"
62
#include "createFields.H"
63
64
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
65
66
Info
<<
"\nEvolving thermodynamics\n"
<<
endl
;
67
68
if
(
mesh
.solutionDict().found(
"SIMPLE"
))
69
{
70
simpleControl
simple
(
mesh
);
71
72
while
(
simple
.loop())
73
{
74
Info
<<
"Time = "
<<
runTime
.timeName() <<
nl
<<
endl
;
75
76
while
(
simple
.correctNonOrthogonal())
77
{
78
#include "EEqn.H"
79
}
80
81
runTime
.write();
82
83
runTime
.printExecutionTime(
Info
);
84
}
85
}
86
else
87
{
88
pimpleControl
pimple
(
mesh
);
89
90
while
(
runTime
.run())
91
{
92
++
runTime
;
93
94
Info
<<
"Time = "
<<
runTime
.timeName() <<
nl
<<
endl
;
95
96
while
(
pimple
.correctNonOrthogonal())
97
{
98
#include "EEqn.H"
99
}
100
101
runTime
.write();
102
103
runTime
.printExecutionTime(
Info
);
104
}
105
}
106
107
Info
<<
"End\n"
<<
endl
;
108
109
return
0;
110
}
111
112
113
// ************************************************************************* //
fvCFD.H
setRootCaseLists.H
Foam::nl
constexpr char nl
The newline '\n' character (0x0a)
Definition:
Ostream.H:50
radiationModel.H
runTime
engineTime & runTime
Definition:
createEngineTime.H:13
Foam::endl
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition:
Ostream.H:531
createTime.H
LESModel.H
turbulentFluidThermoModel.H
mesh
dynamicFvMesh & mesh
Definition:
createDynamicFvMesh.H:6
pimple
pimpleControl & pimple
Definition:
setRegionFluidFields.H:54
createMesh.H
Required Classes.
fvOptions.H
simple
const dictionary & simple
Definition:
readFluidMultiRegionSIMPLEControls.H:1
pimpleControl.H
Foam::Info
messageStream Info
Information stream (stdout output on master, null elsewhere)
postProcess.H
Execute application functionObjects to post-process existing results.
rhoThermo.H
addCheckCaseOptions.H
Required Classes.
simpleControl.H
applications
solvers
heatTransfer
thermoFoam
thermoFoam.C
Generated by
1.8.14