OpenFOAM
4.1
The OpenFOAM Foundation
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
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 |
5
\\ / A nd | Copyright (C) 2011-2016 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
Transient solver for buoyant, turbulent fluid flow and solid heat
29
conduction with conjugate heat transfer between solid and fluid regions.
30
31
It handles secondary fluid or solid circuits which can be coupled
32
thermally with the main fluid region. i.e radiators, etc.
33
34
\*---------------------------------------------------------------------------*/
35
36
#include "
fvCFD.H
"
37
#include "
rhoThermo.H
"
38
#include "
turbulentFluidThermoModel.H
"
39
#include "
fixedGradientFvPatchFields.H
"
40
#include "
regionProperties.H
"
41
#include "compressibleCourantNo.H"
42
#include "
solidRegionDiffNo.H
"
43
#include "
solidThermo.H
"
44
#include "
radiationModel.H
"
45
#include "
fvOptions.H
"
46
#include "
coordinateSystem.H
"
47
48
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49
50
int
main(
int
argc,
char
*argv[])
51
{
52
#define NO_CONTROL
53
#define CREATE_MESH createMeshesPostProcess.H
54
#include "
postProcess.H
"
55
56
#include "
setRootCase.H
"
57
#include "
createTime.H
"
58
#include "
createMeshes.H
"
59
#include "createFields.H"
60
#include "initContinuityErrs.H"
61
#include "
createTimeControls.H
"
62
#include "
readSolidTimeControls.H
"
63
#include "compressibleMultiRegionCourantNo.H"
64
#include "solidRegionDiffusionNo.H"
65
#include "
setInitialMultiRegionDeltaT.H
"
66
67
while
(runTime.run())
68
{
69
#include "
readTimeControls.H
"
70
#include "
readSolidTimeControls.H
"
71
#include "
readPIMPLEControls.H
"
72
73
#include "compressibleMultiRegionCourantNo.H"
74
#include "solidRegionDiffusionNo.H"
75
#include "setMultiRegionDeltaT.H"
76
77
runTime++;
78
79
Info
<<
"Time = "
<< runTime.timeName() <<
nl
<<
endl
;
80
81
if
(nOuterCorr != 1)
82
{
83
forAll
(
fluidRegions
, i)
84
{
85
#include "
storeOldFluidFields.H
"
86
}
87
}
88
89
90
// --- PIMPLE loop
91
for
(
int
oCorr=0; oCorr<
nOuterCorr
; oCorr++)
92
{
93
bool
finalIter = oCorr == nOuterCorr-1;
94
95
forAll
(
fluidRegions
, i)
96
{
97
Info
<<
"\nSolving for fluid region "
98
<<
fluidRegions
[i].name() <<
endl
;
99
#include "setRegionFluidFields.H"
100
#include "
readFluidMultiRegionPIMPLEControls.H
"
101
#include "solveFluid.H"
102
}
103
104
forAll
(
solidRegions
, i)
105
{
106
Info
<<
"\nSolving for solid region "
107
<<
solidRegions
[i].name() <<
endl
;
108
#include "
setRegionSolidFields.H
"
109
#include "
readSolidMultiRegionPIMPLEControls.H
"
110
#include "solveSolid.H"
111
}
112
113
}
114
115
runTime.
write
();
116
117
Info
<<
"ExecutionTime = "
<< runTime.elapsedCpuTime() <<
" s"
118
<<
" ClockTime = "
<< runTime.elapsedClockTime() <<
" s"
119
<<
nl
<<
endl
;
120
}
121
122
Info
<<
"End\n"
<<
endl
;
123
124
return
0;
125
}
126
127
128
// ************************************************************************* //
fvCFD.H
forAll
#define forAll(list, i)
Loop across all elements in list.
Definition:
UList.H:428
setInitialMultiRegionDeltaT.H
Set the initial timestep for the CHT MultiRegion solver.
radiationModel.H
Foam::endl
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition:
Ostream.H:253
readTimeControls.H
Read the control parameters used by setDeltaT.
createTime.H
storeOldFluidFields.H
solidThermo.H
turbulentFluidThermoModel.H
solidRegionDiffNo.H
Calculates and outputs the mean and maximum Diffusion Numbers for the solid regions.
fixedGradientFvPatchFields.H
nOuterCorr
const int nOuterCorr
Definition:
readPIMPLEControls.H:7
readFluidMultiRegionPIMPLEControls.H
readPIMPLEControls.H
readSolidMultiRegionPIMPLEControls.H
Foam::nl
static const char nl
Definition:
Ostream.H:262
fvOptions.H
setRootCase.H
solidRegions
PtrList< fvMesh > solidRegions(solidsNames.size())
readSolidTimeControls.H
Read the control parameters used in the solid.
setRegionSolidFields.H
Foam::Info
messageStream Info
fluidRegions
PtrList< fvMesh > fluidRegions(fluidNames.size())
coordinateSystem.H
Foam::Ostream::write
virtual Ostream & write(const token &)=0
Write next token to stream.
postProcess.H
Execute application functionObjects to post-process existing results.
rhoThermo.H
createTimeControls.H
Read the control parameters used by setDeltaT.
regionProperties.H
createMeshes.H
Generated by
1.8.11