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) 2011-2015 OpenFOAM Foundation
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 Group
28  grpHeatTransferSolvers
29 
30 Description
31  Steady-state solver for buoyant, turbulent flow of incompressible fluids
32 
33  Uses the Boussinesq approximation:
34  \f[
35  rho_{k} = 1 - beta(T - T_{ref})
36  \f]
37 
38  where:
39  \f$ rho_{k} \f$ = the effective (driving) density
40  beta = thermal expansion coefficient [1/K]
41  T = temperature [K]
42  \f$ T_{ref} \f$ = reference temperature [K]
43 
44  Valid when:
45  \f[
46  \frac{beta(T - T_{ref})}{rho_{ref}} << 1
47  \f]
48 
49 \*---------------------------------------------------------------------------*/
50 
51 #include "fvCFD.H"
54 #include "radiationModel.H"
55 #include "fvOptions.H"
56 #include "simpleControl.H"
58 
59 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
60 
61 int main(int argc, char *argv[])
62 {
63  #include "setRootCase.H"
64  #include "createTime.H"
65  #include "createMesh.H"
66 
67  simpleControl simple(mesh);
68 
69  #include "createFields.H"
71  #include "createMRF.H"
72  #include "createFvOptions.H"
73  #include "initContinuityErrs.H"
74 
75  turbulence->validate();
76 
77  // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
78 
79  Info<< "\nStarting time loop\n" << endl;
80 
81  while (simple.loop())
82  {
83  Info<< "Time = " << runTime.timeName() << nl << endl;
84 
85  // Pressure-velocity SIMPLE corrector
86  {
87  #include "UEqn.H"
88  #include "TEqn.H"
89  #include "pEqn.H"
90  }
91 
92  laminarTransport.correct();
93  turbulence->correct();
94 
95  runTime.write();
96 
97  Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
98  << " ClockTime = " << runTime.elapsedClockTime() << " s"
99  << nl << endl;
100  }
101 
102  Info<< "End\n" << endl;
103 
104  return 0;
105 }
106 
107 
108 // ************************************************************************* //
fvOptions.H
singlePhaseTransportModel.H
turbulentTransportModel.H
Foam::endl
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:251
simple
Simple relative velocity model.
createFvOptions.H
turbulence
autoPtr< compressible::turbulenceModel > turbulence
Definition: createFields.H:23
Foam::nl
static const char nl
Definition: Ostream.H:260
Foam::Info
messageStream Info
simpleControl.H
createIncompressibleRadiationModel.H
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:18
setRootCase.H
laminarTransport
singlePhaseTransportModel laminarTransport(U, phi)
simple
const dictionary & simple
Definition: readFluidMultiRegionSIMPLEControls.H:1
createMesh.H
createTime.H
fvCFD.H
main
int main(int argc, char *argv[])
Definition: buoyantBoussinesqSimpleFoam.C:58
fixedFluxPressureFvPatchScalarField.H
radiationModel.H