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-2020 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 
94  // Access
95 
96  //- Maximum number of piso correctors
97  inline label nCorrPiso() const;
98 
99  //- Flag to indicate any piso iteration
100  inline bool anyPisoIter() const;
101 
102  //- Flag to indicate the first piso iteration
103  inline bool firstPisoIter() const;
104 
105  //- Flag to indicate the last piso iteration
106  inline bool finalPisoIter() const;
107 
108  //- Flag to indicate the last inner iteration (last piso and last
109  // non-orthogonal)
110  inline bool finalInnerIter() const;
111 
112  //- Flag to indicate whether in final state
113  virtual bool isFinal() const;
114 
115 
116  // Evolution
117 
118  //- Piso loop
119  bool correct();
120 
121  //- Time run loop
122  bool run(Time& time);
123 
124  //- Time loop loop
125  bool loop(Time& time);
126 };
127 
128 
129 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
130 
131 } // End namespace Foam
132 
133 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
134 
135 #include "pisoControlI.H"
136 
137 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
138 
139 #endif
140 
141 // ************************************************************************* //
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
label nCorrPiso() const
Maximum number of piso correctors.
Definition: pisoControlI.H:28
bool anyPisoIter() const
Flag to indicate any piso iteration.
Definition: pisoControlI.H:34
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
A class for handling words, derived from string.
Definition: word.H:59
virtual bool read()
Read controls.
Definition: pisoControl.C:56
const fvMesh & mesh() const
Return the mesh.
bool finalInnerIter() const
Flag to indicate the last inner iteration (last piso and last.
Definition: pisoControlI.H:52
bool correct()
Piso loop.
Definition: pisoControl.C:80
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 bool isFinal() const
Flag to indicate whether in final state.
Definition: pisoControl.C:71
bool finalPisoIter() const
Flag to indicate the last piso iteration.
Definition: pisoControlI.H:46
label corrPiso_
Current piso corrector.
Definition: pisoControl.H:64
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:107
bool run(Time &time)
Time run loop.
Definition: pisoControl.C:101
TypeName("pisoControl")
Run-time type information.
Fluid solution control class. Holds flags specific to the solution of fluids.
const word & algorithmName() const
Return the name of the algorithm.
bool firstPisoIter() const
Flag to indicate the first piso iteration.
Definition: pisoControlI.H:40
label nCorrPiso_
Maximum number of piso correctors.
Definition: pisoControl.H:61
Namespace for OpenFOAM.