FreeFOAM The Cross-Platform CFD Toolkit
chtMultiRegionSimpleFoam.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  chtMultiRegionSimpleFoam
26 
27 Description
28  Steady-state version of chtMultiRegionFoam
29 
30 Usage
31  - rhoCentralFoam [OPTION]
32 
33  @param -case <dir> \n
34  Specify the case directory
35 
36  @param -parallel \n
37  Run the case in parallel
38 
39  @param -help \n
40  Display short usage message
41 
42  @param -doc \n
43  Display Doxygen documentation page
44 
45  @param -srcDoc \n
46  Display source code
47 
48 \*---------------------------------------------------------------------------*/
49 
50 #include <finiteVolume/fvCFD.H>
56 
57 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
58 
59 int main(int argc, char *argv[])
60 {
61  #include <OpenFOAM/setRootCase.H>
62  #include <OpenFOAM/createTime.H>
63 
64  regionProperties rp(runTime);
65 
66  #include "fluid/createFluidMeshes.H"
67  #include "solid/createSolidMeshes.H"
68 
69  #include "fluid/createFluidFields.H"
70  #include "solid/createSolidFields.H"
71 
73 
74 
75  while (runTime.loop())
76  {
77  Info<< "Time = " << runTime.timeName() << nl << endl;
78 
80  {
81  Info<< "\nSolving for fluid region "
82  << fluidRegions[i].name() << endl;
86  #include "fluid/solveFluid.H"
87  #include "fluid/convergenceCheck.H"
88  }
89 
91  {
92  Info<< "\nSolving for solid region "
93  << solidRegions[i].name() << endl;
97  #include "solid/solveSolid.H"
98  #include "fluid/convergenceCheck.H"
99  }
100 
101  runTime.write();
102 
103  Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
104  << " ClockTime = " << runTime.elapsedClockTime() << " s"
105  << nl << endl;
106  }
107 
108  Info<< "End\n" << endl;
109 
110  return 0;
111 }
112 
113 
114 // ************************ vim: set sw=4 sts=4 et: ************************ //