CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Meshing & Mesh Conversion

[mesh manipulation] polyDualMesh creating non planar faces

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 22, 2019, 02:38
Default polyDualMesh creating non planar faces
  #1
New Member
 
Alberto Artoni
Join Date: Oct 2019
Posts: 7
Rep Power: 7
AlbertoArtoni is on a distinguished road
I am trying to generate a polyhedral mesh.
  1. I generate the tetrahedral mesh using TetGen
  2. I import in OpenFoam and convert to OpenFoam format
  3. I use polyDualMesh to convert to polyhedra
It seems to work all fine. I am making my tests on a cube and I am checking if the mesh works with checkMesh. It gives no issues.


Then I convert to VTK and post process it visually: I notice that some faces of my elements are not on a plane. For my application this is an important issue.


Also, I import them in matlab: I check the coplanarity of faces and the issue seem to be concrete, not some visual problem.


Is there a way I can fix it, generating polyhedral elements with planar faces?


I've already tried chaning polyDualMesh angle and using -concaveMultiCells options but the output doesn't change.


For instance, on a polyhedral cube mesh I can obtain the following statistics:
Of 4581 elements, at least 4529 have a non planar face.
Of 32002 faces, at least 18241 are not planar.






EDIT: I've added several zooms of differents mesh sizes.
Attached Images
File Type: png CutCoarse.png (46.6 KB, 16 views)
File Type: png ZoomFine.png (149.4 KB, 17 views)
File Type: png Zoom.png (44.8 KB, 11 views)

Last edited by AlbertoArtoni; October 22, 2019 at 12:26. Reason: adding attachments.
AlbertoArtoni is offline   Reply With Quote

Old   January 20, 2021, 12:31
Default
  #2
New Member
 
Join Date: Feb 2019
Posts: 23
Rep Power: 7
dolfus is on a distinguished road
Hi,
I don't know if you fixed your probelm, but in case you haven't you can triangulate all mesh faces using the face geometric centre of the non planar faces. You can write some program in OF that reads the polyhedral mesh and writes a new one with cell faces triangulated in a new directory, e.g. constant/polyMesh.tri. Then just remove the old polyMesh and use the new one.
The structure of the program could be something like:
- Calculate face geometric centres for faces with more than 3 nodes. Append this points to the old file polyMesh/points.

- Loop over internal faces and create new triangular faces for each old face (assuming same owner and neighbour).
- Loop over all boundary faces and make same operations as in th previous step.
- Write polyMesh.tri/faces taking in account internal faces are first written and then all boundary ones starting from patch 0.
- Write the rest of mesh files.


Hope this helps.
dolfus is offline   Reply With Quote

Old   January 22, 2021, 02:31
Default
  #3
New Member
 
Alberto Artoni
Join Date: Oct 2019
Posts: 7
Rep Power: 7
AlbertoArtoni is on a distinguished road
Thanks for the answer.


It turns out that polyDualMesh uses polygons centres instead of centroids: if the original mesh is a Delauny triangulation it should generate planar faces.



We obtained some reasonable results, although new problems arose and then we lost interest in the whole procedure since the mesh generation was not the main focus.
AlbertoArtoni is offline   Reply With Quote

Reply

Tags
notplanarfaces, polydualmesh, polyhedra


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Foam::error::PrintStack almir OpenFOAM Running, Solving & CFD 92 May 21, 2024 07:56
[snappyHexMesh] Error snappyhexmesh - Multiple outside loops avinashjagdale OpenFOAM Meshing & Mesh Conversion 53 March 8, 2019 09:42
[snappyHexMesh] No layers in a small gap bobburnquist OpenFOAM Meshing & Mesh Conversion 6 August 26, 2015 09:38
decomposePar -allRegions stru OpenFOAM Pre-Processing 2 August 25, 2015 03:58
Problem in running ICEM grid in Openfoam Tarak OpenFOAM 6 September 9, 2011 17:51


All times are GMT -4. The time now is 00:07.