FreeFOAM The Cross-Platform CFD Toolkit
Hosted by SourceForge:
Get FreeFOAM at SourceForge.net.
            Fast, secure and Free Open Source software downloads

chtMultiRegionFoam.C

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------------*\
00002   =========                 |
00003   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
00004    \\    /   O peration     |
00005     \\  /    A nd           | Copyright (C) 1991-2010 OpenCFD Ltd.
00006      \\/     M anipulation  |
00007 -------------------------------------------------------------------------------
00008 License
00009     This file is part of OpenFOAM.
00010 
00011     OpenFOAM is free software: you can redistribute it and/or modify it
00012     under the terms of the GNU General Public License as published by
00013     the Free Software Foundation, either version 3 of the License, or
00014     (at your option) any later version.
00015 
00016     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
00017     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00018     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00019     for more details.
00020 
00021     You should have received a copy of the GNU General Public License
00022     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
00023 
00024 Application
00025     chtMultiRegionFoam
00026 
00027 Description
00028     Combination of heatConductionFoam and buoyantFoam for conjugate heat
00029     transfer between a solid region and fluid region
00030 
00031 Usage
00032     - chtMultiRegionFoam [OPTION]
00033 
00034     @param -case <dir> \n
00035     Specify the case directory
00036 
00037     @param -parallel \n
00038     Run the case in parallel
00039 
00040     @param -help \n
00041     Display short usage message
00042 
00043     @param -doc \n
00044     Display Doxygen documentation page
00045 
00046     @param -srcDoc \n
00047     Display source code
00048 
00049 \*---------------------------------------------------------------------------*/
00050 
00051 #include <finiteVolume/fvCFD.H>
00052 #include <basicThermophysicalModels/basicRhoThermo.H>
00053 #include <compressibleTurbulenceModel/turbulenceModel.H>
00054 #include <finiteVolume/fixedGradientFvPatchFields.H>
00055 #include <compressibleRASModels/regionProperties.H>
00056 #include "fluid/compressibleCourantNo.H"
00057 #include "solid/solidRegionDiffNo.H"
00058 
00059 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00060 
00061 int main(int argc, char *argv[])
00062 {
00063     #include <OpenFOAM/setRootCase.H>
00064     #include <OpenFOAM/createTime.H>
00065 
00066     regionProperties rp(runTime);
00067 
00068     #include "fluid/createFluidMeshes.H"
00069     #include "solid/createSolidMeshes.H"
00070 
00071     #include "fluid/createFluidFields.H"
00072     #include "solid/createSolidFields.H"
00073 
00074     #include "fluid/initContinuityErrs.H"
00075 
00076     #include <finiteVolume/readTimeControls.H>
00077     #include "solid/readSolidTimeControls.H"
00078 
00079 
00080     #include "fluid/compressibleMultiRegionCourantNo.H"
00081     #include "solid/solidRegionDiffusionNo.H"
00082     #include "include/setInitialMultiRegionDeltaT.H"
00083 
00084 
00085     while (runTime.run())
00086     {
00087         #include <finiteVolume/readTimeControls.H>
00088         #include "solid/readSolidTimeControls.H"
00089         #include "readPIMPLEControls.H"
00090 
00091 
00092         #include "fluid/compressibleMultiRegionCourantNo.H"
00093         #include "solid/solidRegionDiffusionNo.H"
00094         #include "include/setMultiRegionDeltaT.H"
00095 
00096         runTime++;
00097 
00098         Info<< "Time = " << runTime.timeName() << nl << endl;
00099 
00100         if (nOuterCorr != 1)
00101         {
00102             forAll(fluidRegions, i)
00103             {
00104                 #include "fluid/setRegionFluidFields.H"
00105                 #include "fluid/storeOldFluidFields.H"
00106             }
00107         }
00108 
00109 
00110         // --- PIMPLE loop
00111         for (int oCorr=0; oCorr<nOuterCorr; oCorr++)
00112         {
00113             forAll(fluidRegions, i)
00114             {
00115                 Info<< "\nSolving for fluid region "
00116                     << fluidRegions[i].name() << endl;
00117                 #include "fluid/setRegionFluidFields.H"
00118                 #include "fluid/readFluidMultiRegionPIMPLEControls.H"
00119                 #include "fluid/solveFluid.H"
00120             }
00121 
00122             forAll(solidRegions, i)
00123             {
00124                 Info<< "\nSolving for solid region "
00125                     << solidRegions[i].name() << endl;
00126                 #include "solid/setRegionSolidFields.H"
00127                 #include "solid/readSolidMultiRegionPIMPLEControls.H"
00128                 #include "solid/solveSolid.H"
00129             }
00130         }
00131 
00132         runTime.write();
00133 
00134         Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
00135             << "  ClockTime = " << runTime.elapsedClockTime() << " s"
00136             << nl << endl;
00137     }
00138 
00139     Info << "End\n" << endl;
00140 
00141     return 0;
00142 }
00143 
00144 
00145 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines