Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
openfoam
Commits
9afbd680
Commit
9afbd680
authored
Dec 03, 2010
by
mattijs
Browse files
ENH: cyclicPolyPatch : disable warning about faces not perpendicular to rotation axis
parent
dac9c7c4
Changes
1
Show whitespace changes
Inline
Side-by-side
src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C
View file @
9afbd680
...
...
@@ -194,8 +194,9 @@ void Foam::cyclicPolyPatch::calcTransforms
vectorField
half0Normals
(
half0Areas
.
size
());
vectorField
half1Normals
(
half1Areas
.
size
());
scalar
maxCos
=
-
GREAT
;
label
maxFacei
=
-
1
;
//- Additional warning about faces non-aligned with rotation axis
//scalar maxCos = -GREAT;
//label maxFacei = -1;
forAll
(
half0
,
facei
)
{
...
...
@@ -237,32 +238,31 @@ void Foam::cyclicPolyPatch::calcTransforms
half0Normals
[
facei
]
=
half0Areas
[
facei
]
/
magSf
;
half1Normals
[
facei
]
=
half1Areas
[
facei
]
/
nbrMagSf
;
if
(
transform_
==
ROTATIONAL
)
{
scalar
cos
=
mag
(
half0Normals
[
facei
]
&
rotationAxis_
);
if
(
cos
>
maxCos
)
{
maxCos
=
cos
;
maxFacei
=
facei
;
}
}
//
if (transform_ == ROTATIONAL)
//
{
//
scalar cos = mag(half0Normals[facei] & rotationAxis_);
//
if (cos > maxCos)
//
{
//
maxCos = cos;
//
maxFacei = facei;
//
}
//
}
}
}
if
(
maxCos
>
sqrt
(
SMALL
))
{
WarningIn
(
"cyclicPolyPatch::calcTransforms()"
)
<<
"on patch "
<<
name
()
<<
" face:"
<<
maxFacei
<<
" fc:"
<<
half0Ctrs
[
maxFacei
]
<<
" is not perpendicular to the rotationAxis."
<<
endl
<<
"This might cause conservation problems"
<<
" or problems with geometry or topology changes."
<<
endl
<<
"rotation axis : "
<<
rotationAxis_
<<
endl
<<
"face normal : "
<<
half0Normals
[
maxFacei
]
<<
endl
<<
"cosine of angle : "
<<
maxCos
<<
endl
;
}
//if (maxCos > sqrt(SMALL))
//{
// WarningIn
// (
// "cyclicPolyPatch::calcTransforms()"
// ) << "on patch " << name()
// << " face:" << maxFacei << " fc:" << half0Ctrs[maxFacei]
// << " is not perpendicular to the rotationAxis." << endl
// << "This will cause problems with topology changes." << endl
// << "rotation axis : " << rotationAxis_ << endl
// << "face normal : " << half0Normals[maxFacei] << endl
// << "cosine of angle : " << maxCos << endl;
//}
// Calculate transformation tensors
calcTransformTensors
...
...
Write
Preview
Markdown
is supported
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