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

[snappyHexMesh] Calculation of number of faces sHM

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 23, 2016, 13:55
Default Calculation of number of faces sHM
  #1
New Member
 
Moritz
Join Date: Aug 2016
Posts: 14
Rep Power: 10
Mojo is on a distinguished road
Hi there,

I'm working on my Thesis and this forum already has been a huge help for me. Thanks to everyone who's contributing!

I'm wondering how the number of faces is calculated. I expected it to be something like 6 times the number of cells, but it's more something around 3. For example I found this in the snappyHexMesh Logfile:

Code:
After refinement surface refinement iteration 0 : cells: 43 708 500  faces: 132 352 117  points:44935475
Does anybody know?

During further refinement I get negative faces:

Code:
After refinement gap refinement iteration 1 : cells: 888 490 165  faces: -1 563 835 164  points:952606417
After a few lines sHM aborts.

Code:
*** Error in `snappyHexMesh': free(): corrupted unsorted chunks: 0x000000017a1176e0 ***
I think it's because of the 32 Bit Integer limit. The number of faces would probably be higher than 2 147 483 647. Can anybody confirm this?

Thanks for your help in advance!

Moritz
Mojo is offline   Reply With Quote

Old   December 23, 2016, 14:49
Default
  #2
New Member
 
Suffolk
Join Date: Nov 2015
Posts: 26
Rep Power: 11
spitchers is on a distinguished road
I am new to this and have become an OpenFOAM addict over the past month. Just want to say that before I give my thoughts on sHM.

The face calculation would not be 6 times the number of cells. Think about it this way: the cells share faces with each other and the shared faces don't count as 2 separate faces. Now imagine a perfect cube cell, completely surrounded by other cubes. Each face connects to another cell - thus these cell faces would not go towards the faces count!

You are probably right with the error. I couldn't confirm as the largest mesh I have simulated is 100M.




Sent from my iPhone using CFD Online Forum mobile app
spitchers is offline   Reply With Quote

Old   December 23, 2016, 15:23
Default
  #3
New Member
 
Suffolk
Join Date: Nov 2015
Posts: 26
Rep Power: 11
spitchers is on a distinguished road
So the calculation for total face count would be (my first guess):

number of faces ( number of cells X 6) minus half the number of internal/shared faces. ??

Of course I am assuming I know the shape of each cell and the reasoning for half the shared faces is obvious.

This calculation may be not 100% accurate (although it could be) but I am sure it will get you a very close figure.


Sent from my iPhone using CFD Online Forum mobile app
spitchers is offline   Reply With Quote

Old   December 25, 2016, 15:58
Default
  #4
New Member
 
Moritz
Join Date: Aug 2016
Posts: 14
Rep Power: 10
Mojo is on a distinguished road
Thanks for sharing your thoughts!

I checked, the formula doesn't work for me. But I took a look at a checkMesh logfile again. After the snapping process I get this for example:

Code:
Mesh stats
    points:           121 499 837
    faces:            287 925 286
    internal faces:   230 639 221
    cells:            83 115 144
    faces per cell:   6.23911
    boundary patches: 6
    point zones:      0
    face zones:       0
    cell zones:       3
I calculate the faces like this:

Code:
cells      x faces per cell  - internal faces = faces
83 115 144 x  6.23911        - 230 639 286    = 287 925 240
Almost perfect

But the "faces per cell" depends on your geometry, and also with the same geometry but different parameters in the snappyHexMesh dict, "faces per cell" are different (for my case at least). It seems like it is not possible to calculate the number of faces just with the cell number or without checkMesh.

Maybe someone can confirm my guess with the 32 Bit Integer Limit?

Merry Christmas!!
Mojo is offline   Reply With Quote

Old   January 5, 2017, 09:55
Default
  #5
New Member
 
Moritz
Join Date: Aug 2016
Posts: 14
Rep Power: 10
Mojo is on a distinguished road
I answered the question regarding the 32 Bit Integer Limit myself.
See this thread: maximum number of faces?
Mojo is offline   Reply With Quote

Old   January 7, 2017, 09:49
Default
  #6
New Member
 
Suffolk
Join Date: Nov 2015
Posts: 26
Rep Power: 11
spitchers is on a distinguished road
Thank you for that sharing that - I am glad you solved the issue. How is the Thesis coming along ?


Sent from my iPhone using CFD Online Forum mobile app
spitchers 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
[Other] Can't Shake Erros: patch type 'patch' not constraint type 'empty' BrendaEM OpenFOAM Meshing & Mesh Conversion 12 April 3, 2022 19:32
parallel run OpenFoam Srinath Reddy OpenFOAM Running, Solving & CFD 13 February 27, 2019 10:15
[Other] Equal decomposition of cylindrical fluid domain Sean95 OpenFOAM Meshing & Mesh Conversion 3 February 12, 2019 04:34
[blockMesh] --> foam fatal error: lillo763 OpenFOAM Meshing & Mesh Conversion 0 March 5, 2014 11:27
Unaligned accesses on IA64 andre OpenFOAM 5 June 23, 2008 11:37


All times are GMT -4. The time now is 01:39.