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

[Technical] Polyhedral mesh generation

Register Blogs Community New Posts Updated Threads Search

Like Tree9Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 8, 2006, 11:25
Default Polyhedral mesh generation
  #1
Senior Member
 
Frank Bos
Join Date: Mar 2009
Location: The Netherlands
Posts: 340
Rep Power: 18
lr103476 is on a distinguished road
Hi,

Does anyone know if the current version OpenFOAM 1.3 has the capability of polyhedral mesh generation such that 2d cells has 6 faces or more.

The following link shows what I mean, but I dont know to what extend this link is up to date:

http://www.mfix.org/mwiki/index.php/Mesh_Handling%2C_Generation_and_Conversion#P olyhedral_Mesh_Generation

If not ready in the current version, does anyone know an open-source alternative until this blockMesh utility is made ready to handle this.

Regards, Frank
__________________
Frank Bos
lr103476 is offline   Reply With Quote

Old   September 8, 2006, 11:34
Default I thought that polyDualMesh mi
  #2
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,714
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
I thought that polyDualMesh might have helped with creating one from a tet mesh.
Haven't tried it myself though.
Let us know how you fare.

/mark
olesen is offline   Reply With Quote

Old   December 2, 2007, 09:11
Default Hi all, I tried to convert
  #3
Senior Member
 
BastiL
Join Date: Mar 2009
Posts: 530
Rep Power: 20
bastil is on a distinguished road
Hi all,

I tried to convert a tet mesh into a polyhedral mesh using polyDualMesh. This seems to work.

However, visualising this mesh seems to be challenging. I do not know a open source tool ou there that is capable in visualising these polyhedral meshes, am I right? Or is there an opportunity?
bastil is offline   Reply With Quote

Old   December 2, 2007, 09:53
Default Hi, Convert to VTK (foamToV
  #4
Member
 
lillberg's Avatar
 
Eric Lillberg
Join Date: Mar 2009
Location: Stockholm
Posts: 80
Rep Power: 17
lillberg is on a distinguished road
Send a message via Skype™ to lillberg
Hi,

Convert to VTK (foamToVTK) and use latest paraview binaries 3.2.1, available at http://www.paraview.org/New/download.html

Regards

//Eric
lillberg is offline   Reply With Quote

Old   December 2, 2007, 10:13
Default Hi, Can someone explain exa
  #5
Senior Member
 
Pei-Ying Hsieh
Join Date: Mar 2009
Posts: 317
Rep Power: 18
hsieh is on a distinguished road
Hi,

Can someone explain exactly what polyDualMesh do? What will be the benefits of going from Tet to polyhedral mesh in this case (by combining Tets) except for fewer elements (but will have the same number of faces, correct)?

Thanks!

Pei
hsieh is offline   Reply With Quote

Old   December 2, 2007, 10:26
Default Not exactly! You reduce the nu
  #6
Member
 
lillberg's Avatar
 
Eric Lillberg
Join Date: Mar 2009
Location: Stockholm
Posts: 80
Rep Power: 17
lillberg is on a distinguished road
Send a message via Skype™ to lillberg
Not exactly! You reduce the number of cells with approximately 80% and the number of faces only with 20% which gives you a lot smaller dataset to carry around. In the same time you have almost the same accuracy since it primarily depends on the number of faces. You'll have an increase in typical dX with some 20-50% but your degrees of freedom in the mesh are almost the same.

//Eric
lillberg is offline   Reply With Quote

Old   December 2, 2007, 10:27
Default Thanks Erik, I will try. Is pa
  #7
Senior Member
 
BastiL
Join Date: Mar 2009
Posts: 530
Rep Power: 20
bastil is on a distinguished road
Thanks Erik, I will try. Is paraview now able to handle Polyhedral? Is this also true for foamTovtk from OF 1.4.1?

BastiL



Hi,

Convert to VTK (foamToVTK) and use latest paraview binaries 3.2.1, available at http://www.paraview.org/New/download.html

Regards

//Eric
bastil is offline   Reply With Quote

Old   December 2, 2007, 10:43
Default I get the following using foam
  #8
Senior Member
 
BastiL
Join Date: Mar 2009
Posts: 530
Rep Power: 20
bastil is on a distinguished road
I get the following using foamToVTK of OF 1.4.1:

#0 Foam::error::printStack(Foam:stream&) in "/OpenFOAM/OpenFOAM-1.4.1/lib/linux64GccDPOpt/libOpenFOAM.so"
#1 Foam::sigSegv::sigSegvHandler(int) in "/OpenFOAM/OpenFOAM-1.4.1/lib/linux64GccDPOpt/libOpenFOAM.so"
#2 ?? in "/lib/libc.so.6"
#3 Foam::polyMesh::readUpdate() in "/OpenFOAM/OpenFOAM-1.4.1/lib/linux64GccDPOpt/libOpenFOAM.so"
#4 Foam::fvMesh::readUpdate() in "/OpenFOAM/OpenFOAM-1.4.1/lib/linux64GccDPOpt/libfiniteVolume.so"
#5 Foam::vtkMesh::readUpdate() in "/OpenFOAM/OpenFOAM-1.4.1/applications/bin/linux64GccDPOpt/foamToVTK"
#6 main in "/OpenFOAM/OpenFOAM-1.4.1/applications/bin/linux64GccDPOpt/foamToVTK"
#7 __libc_start_main in "/lib/libc.so.6"
#8 Foam::regIOobject::readIfModified() in "/OpenFOAM/OpenFOAM-1.4.1/applications/bin/linux64GccDPOpt/foamToVTK"
segmentation fault

No VTK is finally created
bastil is offline   Reply With Quote

Old   December 2, 2007, 11:24
Default Hmm... strange, never had any
  #9
Member
 
lillberg's Avatar
 
Eric Lillberg
Join Date: Mar 2009
Location: Stockholm
Posts: 80
Rep Power: 17
lillberg is on a distinguished road
Send a message via Skype™ to lillberg
Hmm... strange, never had any problems with VTK conversion. Try -latestTime switch if you have something incompatible in the other time directories. Make sure you don't have any fields in the time directory you're trying to convert to VTK that where not created from defaults or through running mapFields.

//Eric
lillberg is offline   Reply With Quote

Old   December 2, 2007, 11:26
Default Here's an image of a hex/polyH
  #10
Member
 
lillberg's Avatar
 
Eric Lillberg
Join Date: Mar 2009
Location: Stockholm
Posts: 80
Rep Power: 17
lillberg is on a distinguished road
Send a message via Skype™ to lillberg
Here's an image of a hex/polyHedral mesh as seen in paraview 3.3.0


lillberg is offline   Reply With Quote

Old   December 2, 2007, 11:59
Default Ooops... that picture didn't c
  #11
Member
 
lillberg's Avatar
 
Eric Lillberg
Join Date: Mar 2009
Location: Stockholm
Posts: 80
Rep Power: 17
lillberg is on a distinguished road
Send a message via Skype™ to lillberg
Ooops... that picture didn't come out very well, let's try this one


lillberg is offline   Reply With Quote

Old   December 2, 2007, 12:04
Default I am sorry the picture is litt
  #12
Senior Member
 
BastiL
Join Date: Mar 2009
Posts: 530
Rep Power: 20
bastil is on a distinguished road
I am sorry the picture is little small I can not see much... Paraview 3.3.0 is a internal development version as it can not be downloaded so far, right? However 3.2.1 should be ok?

I tried to reconstruct what is happening: I have a tetra-mesh with prism-layers. Checkmesh reports no errors. Afterwards using polyDualMesh (feature angle 90deg, do not know what this is good for?) i get warnings:

--> FOAM Warning :
From function calcDual
in file polyDualMesh.C at line 1140
Incorrect orientation on internal edge:463769(0.341353 -0.196117 0.301625)(0.341353 -0.196956 0.302462)

I get this for different edges... Afterwards CheckMesh crashes with a segmentation fault. Seems like there is a problem....
bastil is offline   Reply With Quote

Old   December 2, 2007, 12:06
Default Hi Eric, thanks for the lar
  #13
Senior Member
 
BastiL
Join Date: Mar 2009
Posts: 530
Rep Power: 20
bastil is on a distinguished road
Hi Eric,

thanks for the larger picture - your meshes look extremly nice. ehat tools do you use for generating theses hybrid hexa-poly meshes? Any ideas about my conversation problems?

BastiL
bastil is offline   Reply With Quote

Old   December 2, 2007, 14:22
Default Try something smaller than 90
  #14
Member
 
lillberg's Avatar
 
Eric Lillberg
Join Date: Mar 2009
Location: Stockholm
Posts: 80
Rep Power: 17
lillberg is on a distinguished road
Send a message via Skype™ to lillberg
Try something smaller than 90 deg feature angle since it represents the maximum angle between two neighboring surface normals on a surface without corners. That is, the mesh will consider your surface shape a corner if the angel is larger than this value. I typically use something between 45 and 80 depending on the tet mesh resolution on highly curved surfaces. This might be the root of your problem. Looking at my picture the curved surface in the middle would (wrongly) be treated as a corner if the feature angle was set to some 30 deg. Here I used 75 degrees, but anything abowe 45 usually works. In your case virtually no corners are treated as such.

I often use Gambit or T-grid for tet/hex + tet-prism b-layer mesh generation and then convert the mesh using polyDualMesh. The result is in the picture.

Good luck!

//Eric
Alhasan likes this.
lillberg is offline   Reply With Quote

Old   December 2, 2007, 14:36
Default Btw, the latest paraview is do
  #15
Member
 
lillberg's Avatar
 
Eric Lillberg
Join Date: Mar 2009
Location: Stockholm
Posts: 80
Rep Power: 17
lillberg is on a distinguished road
Send a message via Skype™ to lillberg
Btw, the latest paraview is downloadable from the same site using the svn repos found at the end of the page. Compilation is really easy, just follow the instructions supplied with the distro.

//Eric
lillberg is offline   Reply With Quote

Old   December 2, 2007, 15:37
Default Hi Eric, thanks so much for
  #16
Senior Member
 
BastiL
Join Date: Mar 2009
Posts: 530
Rep Power: 20
bastil is on a distinguished road
Hi Eric,

thanks so much for your great help and explanation of feaure angle. I tried different feature angles now and still have trouble with it. I found out first warnings different from the others:

Create time

Create polyMesh for time = 0

Feature:60
minCos :0.5

--> FOAM Warning :
From function boundBox::boundBox(const pointField& points)
in file meshes/boundBox/boundBox.C at line 52
cannot find bounding box for zero sized pointFieldreturning zero
--> FOAM Warning :
From function calcDual
in file polyDualMesh.C at line 1025
Incorrect orientation on boundary edge:40913(0.0449507 -0.177984 0.283496)(0.0485079 -0.180224 0.285736)

... more edge warnings ....

--> FOAM Warning :
From function calcDual
in file polyDualMesh.C at line 1140
Incorrect orientation on internal edge:463772(0.333385 -0.196118 0.301625)(0.333385 -0.196957 0.302462)
nInternalFaces:964348
nFaces:1004682
nCells:190892
nFaces:1004682 patchSizes:
11
(
172
176
5329
7507
7322
2802
4224
1362
1715
7990
1735
)
patchStarts:
11
(
964348
964520
964696
970025
977532
984854
987656
991880
993242
994957
1002947
)

Writing dualMesh to 1
End

As mentioned before: CheckMesh reports no errors on the tet-Mesh but stops with a segmentation fault while checking the poly mesh.
bastil is offline   Reply With Quote

Old   December 2, 2007, 17:50
Default Seems to me that your original
  #17
Member
 
lillberg's Avatar
 
Eric Lillberg
Join Date: Mar 2009
Location: Stockholm
Posts: 80
Rep Power: 17
lillberg is on a distinguished road
Send a message via Skype™ to lillberg
Seems to me that your original mesh is wrong somehow .
How did you generate it?
What does checkMesh tell you about the original mesh?
Are there any strange geometrical features in your mesh, like zero thickness walls, interior faces etc.

//Eric
lillberg is offline   Reply With Quote

Old   December 2, 2007, 18:27
Default Hi Eric, its a tetrahedral
  #18
Senior Member
 
BastiL
Join Date: Mar 2009
Posts: 530
Rep Power: 20
bastil is on a distinguished road
Hi Eric,

its a tetrahedral mesh with prism layers generated in GridPro. It runs well and CheckMesh thinks its ok:

Create polyMesh for time = constant

Time = constant

Mesh stats
points: 190892
edges: 964348
faces: 1412547
internal faces: 1336849
cells: 639090
boundary patches: 11
point zones: 0
face zones: 0
cell zones: 2

Number of cells of each type:
hexahedra: 0
prisms: 193036
wedges: 0
pyramids: 0
tet wedges: 0
tetrahedra: 446054
polyhedra: 0

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
wt-inlet 296 172 ok (not multiply connected)
wt-outlet 304 176 ok (not multiply connected)
wt-walls 10119 5231 ok (not multiply connected)
a.forebody 14611 7417 ok (not multiply connected)
a.side 14275 7322 ok (not multiply connected)
a.top 5362 2802 ok (not multiply connected)
a.bot 8138 4224 ok (not multiply connected)
a.baklite 2586 1362 ok (not multiply connected)
a.rear 3287 1715 ok (not multiply connected)
wt-sym 15332 7990 ok (not multiply connected)
wt-sym-quad:22 1388 1735 ok (not multiply connected)

Checking geometry...
Domain bounding box: (-1 -1 -0.05) (4 5.0354e-07 1.24999)
Boundary openness (1.57876e-17 1.28209e-15 6.74944e-17) OK.
Max cell openness = 3.60863e-16 OK.
Max aspect ratio = 11.0021 OK.
Minumum face area = 4.52742e-07. Maximum face area = 0.0133246. Face area magnitudes OK.
Min volume = 1.71943e-10. Max volume = 0.000443001. Total volume = 6.44374. Cell volumes OK.
Mesh non-orthogonality Max: 67.352 average: 17.3122
Non-orthogonality check OK.
Face pyramids OK.
Max skewness = 2.39857 OK.
Min/max edge length = 0.000557864 0.206334 OK.
All angles in faces OK.
Face flatness (1 = flat, 0 = butterfly) : average = 0.999968 min = 0.998242
All face flatness OK.

Mesh OK.

End

It has no special features like internal walls.

BastiL
bastil is offline   Reply With Quote

Old   December 3, 2007, 13:45
Default Haven't seen this problem befo
  #19
Senior Member
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26
mattijs is on a distinguished road
Haven't seen this problem before with polyDualMesh. Can you ship the tet mesh so I can try it over here?

(m dot janssens at opencfd.co.uk)
mattijs is offline   Reply With Quote

Old   December 3, 2007, 15:05
Default Hi Matthijs, I sent you an
  #20
Senior Member
 
BastiL
Join Date: Mar 2009
Posts: 530
Rep Power: 20
bastil is on a distinguished road
Hi Matthijs,

I sent you an email. Hopefully it is not to large.

BastiL
bastil is offline   Reply With Quote

Reply


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
how to set periodic boundary conditions Ganesh FLUENT 15 November 18, 2020 07:09
Polyhedral mesh generation sanathkeshav ANSA 1 September 3, 2018 10:39
Mesh motion with Translation & Rotation Doginal CFX 2 January 12, 2014 07:21
[ICEM] Need urgent help for hybrid mesh generation Pursuor ANSYS Meshing & Geometry 1 August 29, 2012 17:04
Convergence moving mesh lr103476 OpenFOAM Running, Solving & CFD 30 November 19, 2007 15:09


All times are GMT -4. The time now is 19:26.