Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
openfoam
Commits
56547863
Commit
56547863
authored
Jun 18, 2019
by
Andrew Heather
Browse files
ENH: {simple|pimple}Control - output on construction controlled by a 'verbose' flag
parent
e184e1e7
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/finiteVolume/cfdTools/general/solutionControl/pimpleControl/pimpleControl.C
View file @
56547863
...
...
@@ -138,7 +138,12 @@ void Foam::pimpleControl::setFirstIterFlag(const bool check, const bool force)
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam
::
pimpleControl
::
pimpleControl
(
fvMesh
&
mesh
,
const
word
&
dictName
)
Foam
::
pimpleControl
::
pimpleControl
(
fvMesh
&
mesh
,
const
word
&
dictName
,
const
bool
verbose
)
:
solutionControl
(
mesh
,
dictName
),
solveFlow_
(
true
),
...
...
@@ -151,36 +156,38 @@ Foam::pimpleControl::pimpleControl(fvMesh& mesh, const word& dictName)
{
read
();
Info
<<
nl
<<
algorithmName_
;
if
(
nCorrPIMPLE_
>
1
)
if
(
verbose
)
{
if
(
residualControl_
.
empty
())
Info
<<
nl
<<
algorithmName_
;
if
(
nCorrPIMPLE_
>
1
)
{
Info
<<
": no residual control data found. "
<<
"Calculations will employ "
<<
nCorrPIMPLE_
<<
" corrector loops"
<<
nl
;
if
(
residualControl_
.
empty
())
{
Info
<<
": no residual control data found. "
<<
"Calculations will employ "
<<
nCorrPIMPLE_
<<
" corrector loops"
<<
nl
;
}
else
{
Info
<<
": max iterations = "
<<
nCorrPIMPLE_
<<
nl
;
for
(
const
fieldData
&
ctrl
:
residualControl_
)
{
Info
<<
" field "
<<
ctrl
.
name
<<
token
::
TAB
<<
": relTol "
<<
ctrl
.
relTol
<<
", tolerance "
<<
ctrl
.
absTol
<<
nl
;
}
}
}
else
{
Info
<<
": max iterations = "
<<
nCorrPIMPLE_
<<
nl
;
for
(
const
fieldData
&
ctrl
:
residualControl_
)
{
Info
<<
" field "
<<
ctrl
.
name
<<
token
::
TAB
<<
": relTol "
<<
ctrl
.
relTol
<<
", tolerance "
<<
ctrl
.
absTol
<<
nl
;
}
Info
<<
": Operating solver in PISO mode"
<<
nl
;
}
}
else
{
Info
<<
": Operating solver in PISO mode"
<<
nl
;
}
Info
<<
endl
;
Info
<<
endl
;
}
}
...
...
src/finiteVolume/cfdTools/general/solutionControl/pimpleControl/pimpleControl.H
View file @
56547863
...
...
@@ -121,7 +121,12 @@ public:
// Constructors
//- Construct from mesh and the name of control sub-dictionary
pimpleControl
(
fvMesh
&
mesh
,
const
word
&
dictName
=
"PIMPLE"
);
pimpleControl
(
fvMesh
&
mesh
,
const
word
&
dictName
=
"PIMPLE"
,
const
bool
verbose
=
true
);
//- Destructor
...
...
src/finiteVolume/cfdTools/general/solutionControl/simpleControl/simpleControl.C
View file @
56547863
...
...
@@ -91,33 +91,44 @@ bool Foam::simpleControl::criteriaSatisfied()
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam
::
simpleControl
::
simpleControl
(
fvMesh
&
mesh
,
const
word
&
dictName
)
Foam
::
simpleControl
::
simpleControl
(
fvMesh
&
mesh
,
const
word
&
dictName
,
const
bool
verbose
)
:
solutionControl
(
mesh
,
dictName
),
initialised_
(
false
)
{
read
();
Info
<<
nl
<<
algorithmName_
;
if
(
residualControl_
.
empty
())
{
Info
<<
": no convergence criteria found. Calculations will run for "
<<
mesh_
.
time
().
endTime
().
value
()
-
mesh_
.
time
().
startTime
().
value
()
<<
" steps."
<<
nl
;
}
else
if
(
verbose
)
{
Info
<<
": convergence criteria"
<<
nl
;
for
(
const
fieldData
&
ctrl
:
residualControl_
)
Info
<<
nl
<<
algorithmName_
;
if
(
residualControl_
.
empty
())
{
Info
<<
" field "
<<
ctrl
.
name
<<
token
::
TAB
<<
" tolerance "
<<
ctrl
.
absTol
const
scalar
duration
=
mesh_
.
time
().
endTime
().
value
()
-
mesh_
.
time
().
startTime
().
value
();
Info
<<
": no convergence criteria found. "
<<
"Calculations will run for "
<<
duration
<<
" steps."
<<
nl
;
}
else
{
Info
<<
": convergence criteria"
<<
nl
;
for
(
const
fieldData
&
ctrl
:
residualControl_
)
{
Info
<<
" field "
<<
ctrl
.
name
<<
token
::
TAB
<<
" tolerance "
<<
ctrl
.
absTol
<<
nl
;
}
}
Info
<<
endl
;
}
Info
<<
endl
;
}
...
...
src/finiteVolume/cfdTools/general/solutionControl/simpleControl/simpleControl.H
View file @
56547863
...
...
@@ -93,7 +93,12 @@ public:
// Constructors
//- Construct from mesh and the name of control sub-dictionary
simpleControl
(
fvMesh
&
mesh
,
const
word
&
dictName
=
"SIMPLE"
);
simpleControl
(
fvMesh
&
mesh
,
const
word
&
dictName
=
"SIMPLE"
,
const
bool
verbose
=
true
);
//- Destructor
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment