1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
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.
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
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/>.
28 Combination of heatConductionFoam and buoyantFoam for conjugate heat
29 transfer between a solid region and fluid region
31 \*---------------------------------------------------------------------------*/
34 #include "basicRhoThermo.H"
35 #include "turbulenceModel.H"
36 #include "fixedGradientFvPatchFields.H"
37 #include "regionProperties.H"
38 #include "compressibleCourantNo.H"
39 #include "solidRegionDiffNo.H"
40 #include "basicSolidThermo.H"
41 #include "radiationModel.H"
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 int main(int argc, char *argv[])
47 #include "setRootCase.H"
48 #include "createTime.H"
50 regionProperties rp(runTime);
52 #include "createFluidMeshes.H"
53 #include "createSolidMeshes.H"
55 #include "createFluidFields.H"
56 #include "createSolidFields.H"
58 #include "initContinuityErrs.H"
60 #include "readTimeControls.H"
61 #include "readSolidTimeControls.H"
64 #include "compressibleMultiRegionCourantNo.H"
65 #include "solidRegionDiffusionNo.H"
66 #include "setInitialMultiRegionDeltaT.H"
71 #include "readTimeControls.H"
72 #include "readSolidTimeControls.H"
73 #include "readPIMPLEControls.H"
76 #include "compressibleMultiRegionCourantNo.H"
77 #include "solidRegionDiffusionNo.H"
78 #include "setMultiRegionDeltaT.H"
82 Info<< "Time = " << runTime.timeName() << nl << endl;
86 forAll(fluidRegions, i)
88 #include "setRegionFluidFields.H"
89 #include "storeOldFluidFields.H"
95 for (int oCorr=0; oCorr<nOuterCorr; oCorr++)
97 bool finalIter = oCorr == nOuterCorr-1;
99 forAll(fluidRegions, i)
101 Info<< "\nSolving for fluid region "
102 << fluidRegions[i].name() << endl;
103 #include "setRegionFluidFields.H"
104 #include "readFluidMultiRegionPIMPLEControls.H"
105 #include "solveFluid.H"
108 forAll(solidRegions, i)
110 Info<< "\nSolving for solid region "
111 << solidRegions[i].name() << endl;
112 #include "setRegionSolidFields.H"
113 #include "readSolidMultiRegionPIMPLEControls.H"
114 #include "solveSolid.H"
120 Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
121 << " ClockTime = " << runTime.elapsedClockTime() << " s"
125 Info<< "End\n" << endl;
131 // ************************************************************************* //