porousSimpleFoam.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  porousSimpleFoam
26 
27 Group
28  grpIncompressibleSolvers
29 
30 Description
31  Steady-state solver for incompressible, turbulent flow with
32  implicit or explicit porosity treatment and support for multiple reference
33  frames (MRF)
34 
35 \*---------------------------------------------------------------------------*/
36 
37 #include "fvCFD.H"
40 #include "simpleControl.H"
41 #include "IOporosityModelList.H"
42 #include "fvOptions.H"
43 
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 
46 int main(int argc, char *argv[])
47 {
48  #include "setRootCase.H"
49  #include "createTime.H"
50  #include "createMesh.H"
51 
53 
54  #include "createFields.H"
55  #include "createMRF.H"
56  #include "createPorousZones.H"
57  #include "createFvOptions.H"
58  #include "initContinuityErrs.H"
59 
60  turbulence->validate();
61 
62  // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
63 
64  Info<< "\nStarting time loop\n" << endl;
65 
66  while (simple.loop())
67  {
68  Info<< "Time = " << runTime.timeName() << nl << endl;
69 
70  // Pressure-velocity SIMPLE corrector
71  {
72  #include "UEqn.H"
73  #include "pEqn.H"
74  }
75 
77  turbulence->correct();
78 
79  runTime.write();
80 
81  Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
82  << " ClockTime = " << runTime.elapsedClockTime() << " s"
83  << nl << endl;
84  }
85 
86  Info<< "End\n" << endl;
87 
88  return 0;
89 }
90 
91 
92 // ************************************************************************* //
main
int main(int argc, char *argv[])
Definition: porousSimpleFoam.C:43
fvOptions.H
Foam::simpleControl
SIMPLE control class to supply convergence information/checks for the SIMPLE loop.
Definition: simpleControl.H:46
singlePhaseTransportModel.H
createPorousZones.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
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:18
pEqn.H
setRootCase.H
laminarTransport
singlePhaseTransportModel laminarTransport(U, phi)
IOporosityModelList.H
simple
const dictionary & simple
Definition: readFluidMultiRegionSIMPLEControls.H:1
createMesh.H
createTime.H
Foam::singlePhaseTransportModel::correct
virtual void correct()
Correct the laminar viscosity.
Definition: singlePhaseTransportModel.C:76
fvCFD.H
UEqn.H