OpenFOAM
6
The OpenFOAM Foundation
applications
solvers
heatTransfer
chtMultiRegionFoam
chtMultiRegionFoam.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
chtMultiRegionFoam
26
27
Description
28
Solver for steady or transient fluid flow and solid heat conduction, with
29
conjugate heat transfer between regions, buoyancy effects, turbulence,
30
reactions and radiation modelling.
31
32
\*---------------------------------------------------------------------------*/
33
34
#include "
fvCFD.H
"
35
#include "
turbulentFluidThermoModel.H
"
36
#include "
rhoReactionThermo.H
"
37
#include "
CombustionModel.H
"
38
#include "
fixedGradientFvPatchFields.H
"
39
#include "
regionProperties.H
"
40
#include "compressibleCourantNo.H"
41
#include "
solidRegionDiffNo.H
"
42
#include "
solidThermo.H
"
43
#include "
radiationModel.H
"
44
#include "
fvOptions.H
"
45
#include "
coordinateSystem.H
"
46
#include "
pimpleMultiRegionControl.H
"
47
#include "
pressureControl.H
"
48
49
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
50
51
int
main(
int
argc,
char
*argv[])
52
{
53
#define NO_CONTROL
54
#define CREATE_MESH createMeshesPostProcess.H
55
#include "
postProcess.H
"
56
57
#include "
setRootCaseLists.H
"
58
#include "
createTime.H
"
59
#include "
createMeshes.H
"
60
#include "createFields.H"
61
#include "initContinuityErrs.H"
62
pimpleMultiRegionControl pimples(
fluidRegions
,
solidRegions
);
63
#include "
createFluidPressureControls.H
"
64
#include "
createTimeControls.H
"
65
#include "
readSolidTimeControls.H
"
66
#include "
compressibleMultiRegionCourantNo.H
"
67
#include "solidRegionDiffusionNo.H"
68
#include "
setInitialMultiRegionDeltaT.H
"
69
70
while
(pimples.run(
runTime
))
71
{
72
#include "
readTimeControls.H
"
73
#include "
readSolidTimeControls.H
"
74
75
#include "
compressibleMultiRegionCourantNo.H
"
76
#include "solidRegionDiffusionNo.H"
77
#include "setMultiRegionDeltaT.H"
78
79
runTime
++;
80
81
Info
<<
"Time = "
<<
runTime
.timeName() <<
nl
<<
endl
;
82
83
// --- PIMPLE loop
84
while
(pimples.loop())
85
{
86
forAll
(
fluidRegions
, i)
87
{
88
Info
<<
"\nSolving for fluid region "
89
<<
fluidRegions
[i].name() <<
endl
;
90
#include "
setRegionFluidFields.H
"
91
#include "
solveFluid.H
"
92
}
93
94
forAll
(
solidRegions
, i)
95
{
96
Info
<<
"\nSolving for solid region "
97
<<
solidRegions
[i].name() <<
endl
;
98
#include "
setRegionSolidFields.H
"
99
#include "
solveSolid.H
"
100
}
101
}
102
103
runTime
.write();
104
105
Info
<<
"ExecutionTime = "
<<
runTime
.elapsedCpuTime() <<
" s"
106
<<
" ClockTime = "
<<
runTime
.elapsedClockTime() <<
" s"
107
<<
nl
<<
endl
;
108
}
109
110
Info
<<
"End\n"
<<
endl
;
111
112
return
0;
113
}
114
115
116
// ************************************************************************* //
CombustionModel.H
fvCFD.H
forAll
#define forAll(list, i)
Loop across all elements in list.
Definition:
UList.H:428
setRootCaseLists.H
setInitialMultiRegionDeltaT.H
Set the initial timestep for the CHT MultiRegion solver.
compressibleMultiRegionCourantNo.H
pimpleMultiRegionControl.H
radiationModel.H
pressureControl.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
solidThermo.H
turbulentFluidThermoModel.H
solidRegionDiffNo.H
Calculates and outputs the mean and maximum Diffusion Numbers for the solid regions.
setRegionFluidFields.H
fixedGradientFvPatchFields.H
rhoReactionThermo.H
fluidRegions
PtrList< fvMesh > fluidRegions(fluidNames.size())
createFluidPressureControls.H
Foam::nl
static const char nl
Definition:
Ostream.H:265
solveSolid.H
fvOptions.H
solidRegions
PtrList< fvMesh > solidRegions(solidsNames.size())
readSolidTimeControls.H
Read the control parameters used in the solid.
setRegionSolidFields.H
Foam::Info
messageStream Info
coordinateSystem.H
solveFluid.H
postProcess.H
Execute application functionObjects to post-process existing results.
createTimeControls.H
Read the control parameters used by setDeltaT.
regionProperties.H
createMeshes.H
Generated by
1.8.13