OpenFOAM: API Guide
v2112
The open source CFD toolbox
solidFoam.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) 2020 OpenCFD Ltd.
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
solidFoam
28
29
Group
30
grpHeatTransferSolvers
31
32
Description
33
Solver for energy transport and thermodynamics on a solid.
34
35
\*---------------------------------------------------------------------------*/
36
37
#include "
fvCFD.H
"
38
#include "
dynamicFvMesh.H
"
39
#include "
solidThermo.H
"
40
#include "
radiationModel.H
"
41
#include "
fvOptions.H
"
42
#include "
simpleControl.H
"
43
#include "
pimpleControl.H
"
44
#include "
coordinateSystem.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 solid"
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 "
createDynamicFvMesh.H
"
62
#include "createFields.H"
63
#include "createFieldRefs.H"
64
65
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
66
67
Info
<<
"\nEvolving thermodynamics\n"
<<
endl
;
68
69
if
(
mesh
.solutionDict().found(
"SIMPLE"
))
70
{
71
simpleControl
simple
(
mesh
);
72
73
while
(
simple
.loop())
74
{
75
Info
<<
"Time = "
<<
runTime
.timeName() <<
nl
<<
endl
;
76
77
while
(
simple
.correctNonOrthogonal())
78
{
79
#include "hEqn.H"
80
}
81
82
runTime
.write();
83
84
runTime
.printExecutionTime(
Info
);
85
}
86
}
87
else
88
{
89
pimpleControl
pimple
(
mesh
);
90
91
while
(
runTime
.run())
92
{
93
++
runTime
;
94
95
Info
<<
"Time = "
<<
runTime
.timeName() <<
nl
<<
endl
;
96
97
while
(
pimple
.loop())
98
{
99
if
(
pimple
.firstIter())
100
{
101
mesh
.update();
102
}
103
104
while
(
pimple
.correct())
105
{
106
#include "hEqn.H"
107
}
108
}
109
110
runTime
.write();
111
runTime
.printExecutionTime(
Info
);
112
}
113
}
114
115
Info
<<
"End\n"
<<
endl
;
116
117
return
0;
118
}
119
120
121
// ************************************************************************* //
runTime
engineTime & runTime
Definition:
createEngineTime.H:13
simple
const dictionary & simple
Definition:
readFluidMultiRegionSIMPLEControls.H:1
fvOptions.H
Foam::endl
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition:
Ostream.H:369
coordinateSystem.H
pimpleControl.H
solidThermo.H
pimple
pimpleControl & pimple
Definition:
setRegionFluidFields.H:56
setRootCaseLists.H
addCheckCaseOptions.H
Required Classes.
Foam::Info
messageStream Info
Information stream (stdout output on master, null elsewhere)
simpleControl.H
mesh
dynamicFvMesh & mesh
Definition:
createDynamicFvMesh.H:6
postProcess.H
Execute application functionObjects to post-process existing results.
Foam::nl
constexpr char nl
Definition:
Ostream.H:404
createTime.H
dynamicFvMesh.H
fvCFD.H
radiationModel.H
createDynamicFvMesh.H
applications
solvers
heatTransfer
solidFoam
solidFoam.C
Generated by
1.8.17
OPENFOAM® is a registered
trademark
of OpenCFD Ltd.