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

[snappyHexMesh] Reducing STL size for snappyHexMesh

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By Yann

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 26, 2023, 12:10
Default Reducing STL size for snappyHexMesh
  #1
New Member
 
Marcus
Join Date: Jul 2022
Posts: 8
Rep Power: 4
MarcusAng is on a distinguished road
Hi all,

I am currently working on a porous media problem where I am attempting to run pore-scale simulations using an STL model that was produced from X-Ray tomography.

Unfortunately, the file size can be large ~15-30gb and makes it difficult to work with. I've tried decimating and smoothing the STL file in Blender and ParaView, however, it almost always results in a bad-quality mesh (the original file produces OK mesh). In my case, bad quality means high aspect ratio cells, zero area face, zero volume cell, non-orthogonal faces and high max skewness. I've linked to a google drive that has a modified STL file (small segment of entire STL), decimated STL with 90% reduction and a template of the snappyHexMeshDict.
https://drive.google.com/drive/folde...bI?usp=sharing
Does anyone have any tips or recommendation in the best way to reduce the STL size without affecting the mesh produced by SHM.

Thanks,
Marcus
Attached Images
File Type: png checkMesh_decimated.PNG (42.6 KB, 21 views)
MarcusAng is offline   Reply With Quote

Old   February 27, 2023, 04:41
Default
  #2
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,206
Rep Power: 28
Yann will become famous soon enough
Hello Marcus,

I don't know if it can do the trick for you, but SHM can deal with both STL and OBJ file formats, and OBJ format tends to be significantly lighter than STL.

(STL only contains triangle faces while OBJ works with polygons)

I hope this helps,
Yann
AtoHM likes this.
Yann is offline   Reply With Quote

Old   March 6, 2023, 04:45
Default
  #3
Member
 
Maries
Join Date: Mar 2010
Location: Cologne, Germany
Posts: 75
Rep Power: 16
rmaries is on a distinguished road
Quote:
Originally Posted by MarcusAng View Post
Hi all,

I am currently working on a porous media problem where I am attempting to run pore-scale simulations using an STL model that was produced from X-Ray tomography.

Unfortunately, the file size can be large ~15-30gb and makes it difficult to work with. I've tried decimating and smoothing the STL file in Blender and ParaView, however, it almost always results in a bad-quality mesh (the original file produces OK mesh). In my case, bad quality means high aspect ratio cells, zero area face, zero volume cell, non-orthogonal faces and high max skewness. I've linked to a google drive that has a modified STL file (small segment of entire STL), decimated STL with 90% reduction and a template of the snappyHexMeshDict.
https://drive.google.com/drive/folde...bI?usp=sharing
Does anyone have any tips or recommendation in the best way to reduce the STL size without affecting the mesh produced by SHM.

Thanks,
Marcus
Hi Marcus,

Element quality of surface stl is good, when I see your picture and stl file. Problem is not with decimation, it may be due to very small gaps, spaces etc.
You need to find the where these cells are and try to correct the surfaces there. You can also play with snappyhexmesh dict to overcome this.

Regards
Maries
rmaries is offline   Reply With Quote

Reply

Tags
blender, decimate, mesh quality, porous media, stl


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
An error occurs.'Increase the file catalog size. ' dhehdxhdaus CFX 3 April 10, 2022 21:13
[mesh manipulation] How to split stl file? sunagra27 OpenFOAM Meshing & Mesh Conversion 5 March 18, 2021 12:00
[blockMesh] edges not aligned with or perpendicular to non-empty directions ynos OpenFOAM Meshing & Mesh Conversion 6 March 26, 2020 16:02
[ICEM] STL file! How is it useful? bidi ANSYS Meshing & Geometry 0 December 26, 2016 22:33
critical error during installation of openfoam Fabio88 OpenFOAM Installation 21 June 2, 2010 04:01


All times are GMT -4. The time now is 13:46.