FreeFOAM The Cross-Platform CFD Toolkit
buoyantBoussinesqSimpleFoam.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) 2008-2009 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  buoyantBoussinesqSimpleFoam
26 
27 Description
28  Steady-state solver for buoyant, turbulent flow of incompressible fluids
29 
30  Uses the Boussinesq approximation:
31  \f[
32  rho_{eff} = 1 - beta(T - T_{ref})
33  \f]
34 
35  where:
36  \f$ rho_{eff} \f$ = the effective (driving) density
37  beta = thermal expansion coefficient [1/K]
38  T = temperature [K]
39  \f$ T_{ref} \f$ = reference temperature [K]
40 
41  Valid when:
42  \f[
43  rho_{eff} << 1
44  \f]
45 
46 Usage
47  - buoyantBoussinesqSimpleFoam [OPTION]
48 
49  @param -case <dir> \n
50  Specify the case directory
51 
52  @param -parallel \n
53  Run the case in parallel
54 
55  @param -help \n
56  Display short usage message
57 
58  @param -doc \n
59  Display Doxygen documentation page
60 
61  @param -srcDoc \n
62  Display source code
63 
64 \*---------------------------------------------------------------------------*/
65 
66 #include <finiteVolume/fvCFD.H>
69 
70 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
71 
72 int main(int argc, char *argv[])
73 {
74  #include <OpenFOAM/setRootCase.H>
75  #include <OpenFOAM/createTime.H>
76  #include <OpenFOAM/createMesh.H>
78  #include "createFields.H"
80 
81  // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
82 
83  Info<< "\nStarting time loop\n" << endl;
84 
85  while (runTime.loop())
86  {
87  Info<< "Time = " << runTime.timeName() << nl << endl;
88 
90  #include "initConvergenceCheck.H"
91 
93 
94  // Pressure-velocity SIMPLE corrector
95  {
96  #include "UEqn.H"
97  #include "TEqn.H"
98  #include "pEqn.H"
99  }
100 
101  turbulence->correct();
102 
103  runTime.write();
104 
105  Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
106  << " ClockTime = " << runTime.elapsedClockTime() << " s"
107  << nl << endl;
108 
109  #include "convergenceCheck.H"
110  }
111 
112  Info<< "End\n" << endl;
113 
114  return 0;
115 }
116 
117 
118 // ************************ vim: set sw=4 sts=4 et: ************************ //