pisoControl.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2018 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 Class
25  Foam::pisoControl
26 
27 Description
28  PISO control class. Provides time-loop and PISO-loop control methods. No
29  convergence checking is done.
30 
31 SourceFiles
32  pisoControlI.H
33  pisoControl.C
34 
35 \*---------------------------------------------------------------------------*/
36 
37 #ifndef pisoControl_H
38 #define pisoControl_H
39 
40 #include "fluidSolutionControl.H"
41 
42 #define PISO_CONTROL
43 
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 
46 namespace Foam
47 {
48 
49 /*---------------------------------------------------------------------------*\
50  Class pisoControl Declaration
51 \*---------------------------------------------------------------------------*/
52 
53 class pisoControl
54 :
56 {
57 protected:
58 
59  // Protected data
60 
61  //- Maximum number of PISO correctors
63 
64  //- Current PISO corrector
66 
67 
68 public:
69 
70  // Static data members
71 
72  //- Run-time type information
73  TypeName("pisoControl");
74 
75 
76  // Constructors
77 
78  //- Construct from a mesh and the name of the algorithm
79  pisoControl(fvMesh& mesh, const word& algorithmName="PISO");
80 
81 
82  //- Destructor
83  virtual ~pisoControl();
84 
85 
86  // Member Functions
87 
88  // IO
89 
90  //- Read controls
91  virtual bool read();
92 
93  // Access
94 
95  //- Maximum number of PISO correctors
96  inline label nCorrPISO() const;
97 
98  //- Flag to indicate the first PISO iteration
99  inline bool firstPISOIter() const;
100 
101  //- Flag to indicate the last PISO iteration
102  inline bool finalPISOIter() const;
103 
104  //- Flag to indicate the last inner iteration (last PISO and last
105  // non-orthogonal)
106  inline bool finalInnerIter() const;
107 
108 
109  // Evolution
110 
111  //- PISO loop
112  bool correct();
113 
114  //- Time run loop
115  bool run(Time& time);
116 
117  //- Time loop loop
118  bool loop(Time& time);
119 };
120 
121 
122 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
123 
124 } // End namespace Foam
125 
126 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
127 
128 #include "pisoControlI.H"
129 
130 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
131 
132 #endif
133 
134 // ************************************************************************* //
label nCorrPISO_
Maximum number of PISO correctors.
Definition: pisoControl.H:61
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
pisoControl(fvMesh &mesh, const word &algorithmName="PISO")
Construct from a mesh and the name of the algorithm.
Definition: pisoControl.C:38
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:68
label nCorrPISO() const
Maximum number of PISO correctors.
Definition: pisoControlI.H:28
A class for handling words, derived from string.
Definition: word.H:59
bool finalPISOIter() const
Flag to indicate the last PISO iteration.
Definition: pisoControlI.H:40
virtual bool read()
Read controls.
Definition: pisoControl.C:56
const fvMesh & mesh() const
Return the mesh.
label corrPISO_
Current PISO corrector.
Definition: pisoControl.H:64
bool finalInnerIter() const
Flag to indicate the last inner iteration (last PISO and last.
Definition: pisoControlI.H:46
bool correct()
PISO loop.
Definition: pisoControl.C:71
PISO control class. Provides time-loop and PISO-loop control methods. No convergence checking is done...
Definition: pisoControl.H:52
const Time & time() const
Return the time.
virtual ~pisoControl()
Destructor.
Definition: pisoControl.C:50
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
bool loop(Time &time)
Time loop loop.
Definition: pisoControl.C:93
bool run(Time &time)
Time run loop.
Definition: pisoControl.C:87
TypeName("pisoControl")
Run-time type information.
Fluid solution control class. Holds flags specific to the solution of fluids.
bool firstPISOIter() const
Flag to indicate the first PISO iteration.
Definition: pisoControlI.H:34
const word & algorithmName() const
Return the name of the algorithm.
Namespace for OpenFOAM.