Home
Downloads
Documentation
Installation
User Guide
man-pages
API Documentation
README
Release Notes
Changes
License
Support
SourceForge Project
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
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) 1991-2010 OpenCFD Ltd.
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
Combination of heatConductionFoam and buoyantFoam for conjugate heat
29
transfer between a solid region and fluid region
30
31
Usage
32
- chtMultiRegionFoam [OPTION]
33
34
@param -case <dir> \n
35
Specify the case directory
36
37
@param -parallel \n
38
Run the case in parallel
39
40
@param -help \n
41
Display short usage message
42
43
@param -doc \n
44
Display Doxygen documentation page
45
46
@param -srcDoc \n
47
Display source code
48
49
\*---------------------------------------------------------------------------*/
50
51
#include <
finiteVolume/fvCFD.H
>
52
#include <
basicThermophysicalModels/basicRhoThermo.H
>
53
#include <
compressibleTurbulenceModel/turbulenceModel.H
>
54
#include <
finiteVolume/fixedGradientFvPatchFields.H
>
55
#include <
compressibleRASModels/regionProperties.H
>
56
#include "
fluid/compressibleCourantNo.H
"
57
#include "
solid/solidRegionDiffNo.H
"
58
59
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
60
61
int
main
(
int
argc,
char
*argv[])
62
{
63
#include <
OpenFOAM/setRootCase.H
>
64
#include <
OpenFOAM/createTime.H
>
65
66
regionProperties
rp(runTime);
67
68
#include "
fluid/createFluidMeshes.H
"
69
#include "
solid/createSolidMeshes.H
"
70
71
#include "
fluid/createFluidFields.H
"
72
#include "
solid/createSolidFields.H
"
73
74
#include "
fluid/initContinuityErrs.H
"
75
76
#include <
finiteVolume/readTimeControls.H
>
77
#include "
solid/readSolidTimeControls.H
"
78
79
80
#include "
fluid/compressibleMultiRegionCourantNo.H
"
81
#include "
solid/solidRegionDiffusionNo.H
"
82
#include "
include/setInitialMultiRegionDeltaT.H
"
83
84
85
while
(runTime.run())
86
{
87
#include <
finiteVolume/readTimeControls.H
>
88
#include "
solid/readSolidTimeControls.H
"
89
#include "
readPIMPLEControls.H
"
90
91
92
#include "
fluid/compressibleMultiRegionCourantNo.H
"
93
#include "
solid/solidRegionDiffusionNo.H
"
94
#include "
include/setMultiRegionDeltaT.H
"
95
96
runTime++;
97
98
Info
<<
"Time = "
<< runTime.timeName() <<
nl
<<
endl
;
99
100
if
(
nOuterCorr
!= 1)
101
{
102
forAll
(
fluidRegions
, i)
103
{
104
#include "
fluid/setRegionFluidFields.H
"
105
#include "
fluid/storeOldFluidFields.H
"
106
}
107
}
108
109
110
// --- PIMPLE loop
111
for
(
int
oCorr=0; oCorr<
nOuterCorr
; oCorr++)
112
{
113
forAll
(
fluidRegions
, i)
114
{
115
Info
<<
"\nSolving for fluid region "
116
<<
fluidRegions
[i].name() <<
endl
;
117
#include "
fluid/setRegionFluidFields.H
"
118
#include "
fluid/readFluidMultiRegionPIMPLEControls.H
"
119
#include "
fluid/solveFluid.H
"
120
}
121
122
forAll
(
solidRegions
, i)
123
{
124
Info
<<
"\nSolving for solid region "
125
<<
solidRegions
[i].name() <<
endl
;
126
#include "
solid/setRegionSolidFields.H
"
127
#include "
solid/readSolidMultiRegionPIMPLEControls.H
"
128
#include "
solid/solveSolid.H
"
129
}
130
}
131
132
runTime.
write
();
133
134
Info
<<
"ExecutionTime = "
<< runTime.elapsedCpuTime() <<
" s"
135
<<
" ClockTime = "
<< runTime.elapsedClockTime() <<
" s"
136
<<
nl
<<
endl
;
137
}
138
139
Info
<<
"End\n"
<<
endl
;
140
141
return
0;
142
}
143
144
145
// ************************ vim: set sw=4 sts=4 et: ************************ //