pimpleNoLoopControl.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::pimpleNoLoopControl
26 
27 Description
28  Pimple no-loop control class. Implements various option flags, but leaves
29  loop controls to the derivation or owner. Can be derived into a "full"
30  pimple control or can be owned by a multi-region pimple class.
31 
32 SourceFiles
33  pimpleNoLoopControlI.H
34  pimpleNoLoopControl.C
35 
36 \*---------------------------------------------------------------------------*/
37 
38 #ifndef pimpleNoLoopControl_H
39 #define pimpleNoLoopControl_H
40 
41 #include "pimpleLoop.H"
42 #include "pisoControl.H"
45 
46 #undef PISO_CONTROL
47 #define PIMPLE_CONTROL
48 
49 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
50 
51 namespace Foam
52 {
53 
54 /*---------------------------------------------------------------------------*\
55  Class pimpleNoLoopControl Declaration
56 \*---------------------------------------------------------------------------*/
57 
59 :
60  public pisoControl,
63 {
64 protected:
65 
66  // Protected data
67 
68  //- The pimple loop
69  const pimpleLoop& loop_;
70 
71  //- Flag to indicate whether to update the density in SIMPLE mode rather
72  // than PISO mode
73  bool simpleRho_;
74 
75  //- Flag to control whether turbulence is solved just on the final
76  // pimple iteration, or on every pimple iteration
78 
79 
80 public:
81 
82  // Static Data Members
83 
84  //- Run-time type information
85  TypeName("pimpleNoLoopControl");
86 
87 
88  // Constructors
89 
90  //- Construct from a mesh, the name of the algorithm, and a reference
91  // to the pimple loop
93  (
94  fvMesh& mesh,
95  const word& algorithmName,
96  const pimpleLoop& loop
97  );
98 
99 
100  //- Destructor
101  virtual ~pimpleNoLoopControl();
102 
103 
104  // Member Functions
105 
106  // IO
107 
108  //- Read controls
109  virtual bool read();
110 
111  // Access
112 
113  //- Flag to indicate whether in final state
114  virtual bool isFinal() const;
115 
116  //- Flag to indicate whether to update the density in simple mode
117  inline bool simpleRho() const;
118 
119  //- Flag to indicate whether to solve the turbulence on the final
120  // pimple iteration only
121  inline bool turbOnFinalIterOnly() const;
122 };
123 
124 
125 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
126 
127 } // End namespace Foam
128 
129 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
130 
131 #include "pimpleNoLoopControlI.H"
132 
133 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
134 
135 #endif
136 
137 // ************************************************************************* //
virtual ~pimpleNoLoopControl()
Destructor.
virtual bool read()
Read controls.
TypeName("pimpleNoLoopControl")
Run-time type information.
bool turbOnFinalIterOnly_
Flag to control whether turbulence is solved just on the final.
Pimple loop class. Implements the logic which controls the pimple loop generically for a given correc...
Definition: pimpleLoop.H:51
bool simpleRho() const
Flag to indicate whether to update the density in simple mode.
bool turbOnFinalIterOnly() const
Flag to indicate whether to solve the turbulence on the final.
A class for handling words, derived from string.
Definition: word.H:59
pimpleNoLoopControl(fvMesh &mesh, const word &algorithmName, const pimpleLoop &loop)
Construct from a mesh, the name of the algorithm, and a reference.
const fvMesh & mesh() const
Return the mesh.
Piso control class. Provides time-loop and piso-loop control methods. No convergence checking is done...
Definition: pisoControl.H:52
const pimpleLoop & loop_
The pimple loop.
virtual bool isFinal() const
Flag to indicate whether in final state.
bool simpleRho_
Flag to indicate whether to update the density in SIMPLE mode rather.
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
Pimple no-loop control class. Implements various option flags, but leaves loop controls to the deriva...
Single-region-specific derivation of the convergence control class.
bool loop(Time &time)
Time loop loop.
Definition: pisoControl.C:107
const word & algorithmName() const
Return the name of the algorithm.
Single-region-specific derivation of the corrector convergence control class.
Namespace for OpenFOAM.