CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Mesh Utilities (http://www.cfd-online.com/Forums/openfoam-meshing-utilities/)
-   -   TranformPoints gives skewed mesh Possible Bug (http://www.cfd-online.com/Forums/openfoam-meshing-utilities/61554-tranformpoints-gives-skewed-mesh-possible-bug.html)

andersking March 19, 2008 23:48

Description: I am trying to b
 
Description:
I am trying to build a mesh by flipping and combining a submesh. To construct the mesh I would like to flip the original mesh and merge the original and the flipped mesh together.

ie. if the original mesh is called "left" then the process is roughly

cp -rv left right
transformPoints . right -scale "(-1 1 1)"
(or alternatively transformPoints . right -rotate "((1 1 1) (-1 1 1))" - it doesn't matter which one as both fail"
mergeMesh . left . right

the transformPoints step always results in a bad mesh (according to checkmesh).


Solver/Application:
transformPoints
or checkMesh

Source file:King

Testcase:


Platform:
linux32 (but most likely non-specific)

Version:
OpenFOAM-1.4.1 (extend)

Notes:
I have attached a test case that illustrates the problem.
taking the case and running blockMesh and checkMesh gives:


Checking topology...
Boundary definition OK.
Point usage OK.
Upper triangular ordering OK.
Topological cell zip-up check OK.
Face vertices OK.
Face-face connectivity OK.
Number of regions: 1 (OK).

Checking patch topology for multiply connected surfaces ...
Patch Faces Points Surface
defaultFaces 600 602 ok (closed singly connected surface)

Checking geometry...
Boundary openness (3.41901e-17 3.41901e-17 -1.37863e-18) OK.
This mesh has no valid solving directions. dirs = (-1 -1 -1). Please check mesh definition for empty patches.
This is a 0-D mesh
Domain bounding box: (0 0 0) (0.001 0.001 0.001)
Max cell openness = 1.65436e-16 OK.
Max aspect ratio = 1 OK.
Minumum face area = 1e-08. Maximum face area = 1e-08. Face area magnitudes OK.
Min volume = 1e-12. Max volume = 1e-12. Total volume = 1e-09. Cell volumes OK.
Mesh non-orthogonality Max: 8.53774e-07 average: 0
Non-orthogonality check OK.
Face pyramids OK.
Max skewness = 6.50521e-15 OK.
Min/max edge length = 0.0001 0.0001 OK.
All angles in faces OK.
Face flatness (1 = flat, 0 = butterfly) : average = 1 min = 1
All face flatness OK.

Failed 1 mesh checks.

End

then after running transformPoints . block -scale "(-1 1 1)" checkMesh gives


Checking topology...
Boundary definition OK.
Point usage OK.
Upper triangular ordering OK.
Topological cell zip-up check OK.
Face vertices OK.
Face-face connectivity OK.
Number of regions: 1 (OK).

Checking patch topology for multiply connected surfaces ...
Patch Faces Points Surface
defaultFaces 600 602 ok (closed singly connected surface)

Checking geometry...
Boundary openness (3.41901e-17 -3.41901e-17 1.37863e-18) OK.
This mesh has no valid solving directions. dirs = (-1 -1 -1). Please check mesh definition for empty patches.
This is a 0-D mesh
Domain bounding box: (-0.001 0 0) (0 0.001 0.001)
***High aspect ratio cells found, Max aspect ratio: 6.29961e+191, number of cells 1000

<<Writing 1000 cells with high aspect ratio to set highAspectRatioCells
Minumum face area = 1e-08. Maximum face area = 1e-08. Face area magnitudes OK.
Min volume = 2e-300. Max volume = 2e-300. Total volume = 2e-297. Cell volumes OK.
Mesh non-orthogonality Max: 180 average: 180
<font color="ff0000"> ***Number of non-orthogonality errors: 2700.

<<Writing 2700 non-orthogonal faces to set nonOrthoFaces
***Error in face pyramids: 6000 faces are incorrectly oriented.
<<Writing 3300 faces with incorrect orientation to set wrongOrientedFaces
Max skewness = 5.42101e-15 OK.
Min/max edge length = 0.0001 0.0001 OK.
All angles in faces OK.
Face flatness (1 = flat, 0 = butterfly) : average = 1 min = 1
All face flatness OK.

Failed 4 mesh checks.

End</font>

Am I missing a stage or option to do this conversion? or is this a bug in transformPoints (or checkMesh)?

cheers,
Andrew

http://www.cfd-online.com/OpenFOAM_D...hment_icon.gif block.tgz

mattijs March 20, 2008 08:00

The calculation of the transfo
 
The calculation of the transformation tensor breaks down (no clearly defined path to rotate over 180 degrees). Use two steps:

// Rotate 90 degrees around z-axis
transformPoints .. block -rotate '((1 0 0)(0 1 0))'
// Rotate 90 degrees around z-axis
transformPoints .. block -rotate '((1 0 0)(0 1 0))'

eugene March 20, 2008 10:32

why don't you just use mirrorM
 
why don't you just use mirrorMesh? it does everything including the merging for you.

andersking March 25, 2008 22:33

Thanks, doing the transformati
 
Thanks, doing the transformation in two steps worked, I thought I may have missed something.

As for mirrorMesh I actually need to rotate the mesh 180 degrees, not mirror it (though I realize that's not clear in my post).

cheers,
Andrew


All times are GMT -4. The time now is 10:05.