OpenFOAM
v2512
The open source CFD toolbox
Loading...
Searching...
No Matches
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 "
dummyCourantNo.H
"
45
#include "
solidRegionDiffNo.H
"
46
#include "
coordinateSystem.H
"
47
48
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49
50
int
main(
int
argc,
char
*argv[])
51
{
52
argList::addNote
53
(
54
"Solver for energy transport and thermodynamics on a solid"
55
);
56
57
#define NO_CONTROL
58
#include "
postProcess.H
"
59
60
#include "
addCheckCaseOptions.H
"
61
#include "
setRootCaseLists.H
"
62
#include "
createTime.H
"
63
#include "
createDynamicFvMesh.H
"
64
#include "
createFields.H
"
65
#include "
createFieldRefs.H
"
66
67
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
68
69
Info
<<
"\nEvolving thermodynamics\n"
<<
endl
;
70
71
if
(
mesh
.solutionDict().found(
"SIMPLE"
))
72
{
73
simpleControl
simple
(
mesh
);
74
75
while
(
simple
.loop())
76
{
77
Info
<<
"Time = "
<<
runTime
.timeName() <<
nl
<<
endl
;
78
79
while
(
simple
.correctNonOrthogonal())
80
{
81
#include "
hEqn.H
"
82
}
83
84
runTime
.write();
85
86
runTime
.printExecutionTime(Info);
87
}
88
}
89
else
90
{
91
pimpleControl
pimple
(
mesh
);
92
93
#include "
createDyMControls.H
"
94
95
while
(
runTime
.run())
96
{
97
#include "
readDyMControls.H
"
98
#include "
readSolidTimeControls.H
"
99
100
#include "
solidDiffusionNo.H
"
101
#include "setMultiRegionDeltaT.H"
102
103
++
runTime
;
104
105
Info
<<
"Time = "
<<
runTime
.timeName() <<
nl
<<
endl
;
106
107
while
(
pimple
.loop())
108
{
109
if
(
pimple
.firstIter() ||
moveMeshOuterCorrectors
)
110
{
111
// Do any mesh changes
112
mesh
.controlledUpdate();
113
114
if
(
mesh
.changing() &&
checkMeshCourantNo
)
115
{
116
#include "
meshCourantNo.H
"
117
}
118
}
119
120
while
(
pimple
.correct())
121
{
122
#include "
hEqn.H
"
123
}
124
}
125
126
runTime
.write();
127
runTime
.printExecutionTime(Info);
128
}
129
}
130
131
Info
<<
"End\n"
<<
endl
;
132
133
return
0;
134
}
135
136
137
// ************************************************************************* //
addCheckCaseOptions.H
Required Classes.
pimple
pimpleControl & pimple
Definition
setRegionFluidFields.H:56
coordinateSystem.H
createDyMControls.H
createDynamicFvMesh.H
mesh
dynamicFvMesh & mesh
Definition
createDynamicFvMesh.H:6
runTime
engineTime & runTime
Definition
createEngineTime.H:13
createTime.H
dummyCourantNo.H
Dummy (fluid) Courant number.
dynamicFvMesh.H
fvCFD.H
fvOptions.H
createFieldRefs.H
hEqn.H
meshCourantNo.H
Calculates and outputs the mean and maximum Courant Numbers.
Foam::Info
messageStream Info
Information stream (stdout output on master, null elsewhere).
Foam::endl
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition
Ostream.H:519
Foam::nl
constexpr char nl
The newline '\n' character (0x0a).
Definition
Ostream.H:50
pimpleControl.H
postProcess.H
Execute application functionObjects to post-process existing results.
radiationModel.H
readDyMControls.H
checkMeshCourantNo
checkMeshCourantNo
Definition
readDyMControls.H:9
moveMeshOuterCorrectors
moveMeshOuterCorrectors
Definition
readDyMControls.H:15
simple
const dictionary & simple
Definition
readFluidMultiRegionSIMPLEControls.H:1
readSolidTimeControls.H
Read the control parameters used in the solid.
setRootCaseLists.H
simpleControl.H
solidDiffusionNo.H
solidRegionDiffNo.H
Calculates and outputs the mean and maximum Diffusion Numbers for the solid regions.
solidThermo.H
createFields.H
applications
solvers
heatTransfer
solidFoam
solidFoam.C
Generated by
1.16.1