Skip to content
GitLab
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
d77df7aa
Commit
d77df7aa
authored
Jun 14, 2018
by
sergio
Browse files
STY: Improving log info in stabilityBlendingFactor
parent
b76d6b5c
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/functionObjects/field/stabilityBlendingFactor/stabilityBlendingFactor.C
View file @
d77df7aa
...
...
@@ -73,18 +73,25 @@ bool Foam::functionObjects::stabilityBlendingFactor::init(bool first)
const
IOField
<
scalar
>*
residualPtr
=
mesh_
.
lookupObjectPtr
<
IOField
<
scalar
>>
(
residualName_
);
if
(
log
)
{
Log
<<
nl
<<
type
()
<<
" : "
<<
nl
;
}
if
(
residuals_
)
{
if
(
!
residualPtr
)
{
WarningInFunction
<<
"Could not find residual file : "
<<
residualName_
<<
nl
<<
"The residual mode won't be considered for the blended "
<<
"field in the stability blending factor. "
<<
nl
<<
"Add the corresponding residual function object. "
<<
nl
<<
"If the residual function object is already set "
<<
nl
<<
"you might need to wait for the first iteration."
<<
endl
;
<<
"Could not find residual file : "
<<
residualName_
<<
".The residual mode won't be "
<<
nl
<<
" considered for the blended field in the stability "
<<
"blending factor. "
<<
nl
<<
" Add the corresponding residual function object. "
<<
nl
<<
" If the residual function object is already set "
<<
"you might need to wait "
<<
nl
<<
" for the first iteration."
<<
nl
<<
endl
;
}
else
{
...
...
@@ -284,6 +291,13 @@ bool Foam::functionObjects::stabilityBlendingFactor::init(bool first)
if
(
Co_
)
{
if
(
Co1_
>=
Co2_
)
{
FatalErrorInFunction
<<
" Co2 should be larger than Co1."
<<
exit
(
FatalError
);
}
tmp
<
volScalarField
>
CoPtr
(
new
volScalarField
...
...
@@ -321,6 +335,11 @@ bool Foam::functionObjects::stabilityBlendingFactor::init(bool first)
}
}
if
(
log
)
{
Log
<<
nl
;
}
indicator_
.
correctBoundaryConditions
();
indicator_
.
min
(
1
.
0
);
indicator_
.
max
(
0
.
0
);
...
...
@@ -462,7 +481,7 @@ Foam::functionObjects::stabilityBlendingFactor::stabilityBlendingFactor
else
{
FatalErrorInFunction
<<
"Field : "
<<
nonOrthogonalityName_
<<
" not found."
<<
"
Field : "
<<
nonOrthogonalityName_
<<
" not found."
<<
exit
(
FatalError
);
}
}
...
...
@@ -493,7 +512,7 @@ Foam::functionObjects::stabilityBlendingFactor::stabilityBlendingFactor
else
{
FatalErrorInFunction
<<
"Field : "
<<
faceWeightName_
<<
" not found."
<<
"
Field : "
<<
faceWeightName_
<<
" not found."
<<
exit
(
FatalError
);
}
}
...
...
@@ -523,7 +542,7 @@ Foam::functionObjects::stabilityBlendingFactor::stabilityBlendingFactor
else
{
FatalErrorInFunction
<<
"Field : "
<<
skewnessName_
<<
" not found."
<<
"
Field : "
<<
skewnessName_
<<
" not found."
<<
exit
(
FatalError
);
}
}
...
...
@@ -535,6 +554,8 @@ Foam::functionObjects::stabilityBlendingFactor::stabilityBlendingFactor
}
init
(
true
);
writeFileHeader
(
file
());
}
...
...
@@ -590,6 +611,37 @@ bool Foam::functionObjects::stabilityBlendingFactor::read
<<
tolerance_
<<
exit
(
FatalError
);
}
Info
<<
type
()
<<
" "
<<
name
()
<<
":"
<<
nl
;
if
(
nonOrthogonality_
)
{
Info
<<
" Including nonOrthogonality between: "
<<
minNonOrthogonality_
<<
" and "
<<
maxNonOrthogonality_
<<
endl
;
}
if
(
gradCc_
)
{
Info
<<
" Including gradient between: "
<<
minGradCc_
<<
" and "
<<
maxGradCc_
<<
endl
;
}
if
(
residuals_
)
{
Info
<<
" Including residuals"
<<
endl
;
}
if
(
faceWeight_
)
{
Info
<<
" Including faceWeight between: "
<<
minFaceWeight_
<<
" and "
<<
maxFaceWeight_
<<
endl
;
}
if
(
skewness_
)
{
Info
<<
" Including skewness between: "
<<
minSkewness_
<<
" and "
<<
maxSkewness_
<<
endl
;
}
if
(
Co_
)
{
Info
<<
" Including Co between: "
<<
Co2_
<<
" and "
<<
Co1_
<<
endl
;
}
return
true
;
}
else
...
...
@@ -627,7 +679,8 @@ bool Foam::functionObjects::stabilityBlendingFactor::write()
reduce
(
nCellsScheme2
,
sumOp
<
label
>
());
reduce
(
nCellsBlended
,
sumOp
<
label
>
());
Log
<<
" scheme 1 cells : "
<<
nCellsScheme1
<<
nl
Log
<<
nl
<<
type
()
<<
" : "
<<
nl
<<
" scheme 1 cells : "
<<
nCellsScheme1
<<
nl
<<
" scheme 2 cells : "
<<
nCellsScheme2
<<
nl
<<
" blended cells : "
<<
nCellsBlended
<<
nl
<<
endl
;
...
...
@@ -635,9 +688,9 @@ bool Foam::functionObjects::stabilityBlendingFactor::write()
writeTime
(
file
());
file
()
<<
t
oken
::
TAB
<<
nCellsScheme1
<<
t
oken
::
TAB
<<
nCellsScheme2
<<
t
oken
::
TAB
<<
nCellsBlended
<<
t
ab
<<
nCellsScheme1
<<
t
ab
<<
nCellsScheme2
<<
t
ab
<<
nCellsBlended
<<
endl
;
return
true
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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