Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
openfoam
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Development
openfoam
Commits
d77df7aa
Commit
d77df7aa
authored
7 years ago
by
sergio
Browse files
Options
Downloads
Patches
Plain Diff
STY: Improving log info in stabilityBlendingFactor
parent
b76d6b5c
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/functionObjects/field/stabilityBlendingFactor/stabilityBlendingFactor.C
+67
-14
67 additions, 14 deletions
...s/field/stabilityBlendingFactor/stabilityBlendingFactor.C
with
67 additions
and
14 deletions
src/functionObjects/field/stabilityBlendingFactor/stabilityBlendingFactor.C
+
67
−
14
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
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment