OpenFOAM
4.1
The OpenFOAM Foundation
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
src
finiteVolume
cfdTools
general
solutionControl
pimpleControl
pimpleControl.H
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-2016 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::pimpleControl
26
27
Description
28
PIMPLE control class to supply convergence information/checks for
29
the PIMPLE loop.
30
31
May also be used to for PISO-based algorithms as PISO controls are a
32
sub-set of PIMPLE controls.
33
34
\*---------------------------------------------------------------------------*/
35
36
#ifndef pimpleControl_H
37
#define pimpleControl_H
38
39
#include "
solutionControl.H
"
40
41
//- Declare that pimpleControl will be used
42
#define PIMPLE_CONTROL
43
44
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45
46
namespace
Foam
47
{
48
49
/*---------------------------------------------------------------------------*\
50
Class pimpleControl Declaration
51
\*---------------------------------------------------------------------------*/
52
53
class
pimpleControl
54
:
55
public
solutionControl
56
{
57
// Private member functions
58
59
//- Disallow default bitwise copy construct
60
pimpleControl
(
const
pimpleControl
&);
61
62
//- Disallow default bitwise assignment
63
void
operator=(
const
pimpleControl
&);
64
65
66
protected
:
67
68
// Protected data
69
70
// Solution controls
71
72
//- Maximum number of PIMPLE correctors
73
label
nCorrPIMPLE_
;
74
75
//- Maximum number of PISO correctors
76
label
nCorrPISO_
;
77
78
//- Current PISO corrector
79
label
corrPISO_
;
80
81
//- Flag to indicate whether to only solve turbulence on final iter
82
bool
turbOnFinalIterOnly_
;
83
84
//- Converged flag
85
bool
converged_
;
86
87
88
// Protected Member Functions
89
90
//- Read controls from fvSolution dictionary
91
virtual
void
read
();
92
93
//- Return true if all convergence checks are satisfied
94
virtual
bool
criteriaSatisfied
();
95
96
97
public
:
98
99
// Static Data Members
100
101
//- Run-time type information
102
TypeName
(
"pimpleControl"
);
103
104
105
// Constructors
106
107
//- Construct from mesh and the name of control sub-dictionary
108
pimpleControl
(
fvMesh
&
mesh
,
const
word
&
dictName
=
"PIMPLE"
);
109
110
111
//- Destructor
112
virtual
~pimpleControl
();
113
114
115
// Member Functions
116
117
// Access
118
119
//- Maximum number of PIMPLE correctors
120
inline
label
nCorrPIMPLE
()
const
;
121
122
//- Maximum number of PISO correctors
123
inline
label
nCorrPISO
()
const
;
124
125
//- Current PISO corrector index
126
inline
label
corrPISO
()
const
;
127
128
129
// Solution control
130
131
//- PIMPLE loop
132
virtual
bool
loop
();
133
134
//- Pressure corrector loop
135
inline
bool
correct
();
136
137
//- Helper function to identify when to store the intial residuals
138
inline
bool
storeInitialResiduals
()
const
;
139
140
//- Helper function to identify first PIMPLE (outer) iteration
141
inline
bool
firstIter
()
const
;
142
143
//- Helper function to identify final PIMPLE (outer) iteration
144
inline
bool
finalIter
()
const
;
145
146
//- Helper function to identify final inner iteration
147
inline
bool
finalInnerIter
()
const
;
148
149
//- Helper function to identify whether to solve for turbulence
150
inline
bool
turbCorr
()
const
;
151
};
152
153
154
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
155
156
}
// End namespace Foam
157
158
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
159
160
#include "
pimpleControlI.H
"
161
162
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
163
164
#endif
165
166
// ************************************************************************* //
Foam::pimpleControl::correct
bool correct()
Pressure corrector loop.
Definition:
pimpleControlI.H:46
Foam::label
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
Foam::pimpleControl::nCorrPISO_
label nCorrPISO_
Maximum number of PISO correctors.
Definition:
pimpleControl.H:75
Foam::pimpleControl::storeInitialResiduals
bool storeInitialResiduals() const
Helper function to identify when to store the intial residuals.
Definition:
pimpleControlI.H:67
Foam::solutionControl
Base class for solution control classes.
Definition:
solutionControl.H:45
Foam::pimpleControl::finalInnerIter
bool finalInnerIter() const
Helper function to identify final inner iteration.
Definition:
pimpleControlI.H:86
Foam::pimpleControl::nCorrPISO
label nCorrPISO() const
Maximum number of PISO correctors.
Definition:
pimpleControlI.H:34
Foam::pimpleControl::turbCorr
bool turbCorr() const
Helper function to identify whether to solve for turbulence.
Definition:
pimpleControlI.H:95
Foam::pimpleControl::corrPISO_
label corrPISO_
Current PISO corrector.
Definition:
pimpleControl.H:78
mesh
dynamicFvMesh & mesh
Definition:
createDynamicFvMesh.H:18
Foam::pimpleControl::read
virtual void read()
Read controls from fvSolution dictionary.
Definition:
pimpleControl.C:39
Foam::word
A class for handling words, derived from string.
Definition:
word.H:59
Foam::pimpleControl::loop
virtual bool loop()
PIMPLE loop.
Definition:
pimpleControl.C:173
Foam::pimpleControl::corrPISO
label corrPISO() const
Current PISO corrector index.
Definition:
pimpleControlI.H:40
pimpleControlI.H
Foam::pimpleControl::nCorrPIMPLE_
label nCorrPIMPLE_
Maximum number of PIMPLE correctors.
Definition:
pimpleControl.H:72
Foam::pimpleControl::turbOnFinalIterOnly_
bool turbOnFinalIterOnly_
Flag to indicate whether to only solve turbulence on final iter.
Definition:
pimpleControl.H:81
Foam::pimpleControl::TypeName
TypeName("pimpleControl")
Run-time type information.
Foam::pimpleControl::firstIter
bool firstIter() const
Helper function to identify first PIMPLE (outer) iteration.
Definition:
pimpleControlI.H:74
dictName
word dictName("noiseDict")
Foam::pimpleControl
PIMPLE control class to supply convergence information/checks for the PIMPLE loop.
Definition:
pimpleControl.H:52
Foam::fvMesh
Mesh data needed to do the Finite Volume discretisation.
Definition:
fvMesh.H:78
Foam::pimpleControl::nCorrPIMPLE
label nCorrPIMPLE() const
Maximum number of PIMPLE correctors.
Definition:
pimpleControlI.H:28
solutionControl.H
Foam::pimpleControl::criteriaSatisfied
virtual bool criteriaSatisfied()
Return true if all convergence checks are satisfied.
Definition:
pimpleControl.C:52
Foam::pimpleControl::~pimpleControl
virtual ~pimpleControl()
Destructor.
Definition:
pimpleControl.C:167
Foam
Namespace for OpenFOAM.
Definition:
combustionModel.C:30
Foam::pimpleControl::converged_
bool converged_
Converged flag.
Definition:
pimpleControl.H:84
Foam::pimpleControl::finalIter
bool finalIter() const
Helper function to identify final PIMPLE (outer) iteration.
Definition:
pimpleControlI.H:80
Generated by
1.8.11