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

[snappyHexMesh] Mesh results pixelated

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 8, 2020, 14:14
Default Mesh results pixelated
  #1
New Member
 
George
Join Date: Jul 2020
Location: TU Delft, The Netherlands
Posts: 18
Rep Power: 5
gpouliasis is on a distinguished road
Dear Foamers,

I am relatively new to OF. I have a case where i need to simulate the transition of an open channel to a tunnel. For this i have opted to use interFoam solver. For the generation of the topography i extracted an .stl solid from Civil3D which then i manipulated with Blender to correct it. I used surfaceCheck to make sure the surfaces where correct which they did. You can see my original surface and the original mesh of the .stl file which is fairly simple. Then the resultin mesh of snappyHexMesh appears blocky/pixelated. After a few days of painful searching i realised that the problem was with my surfaceFeatureExtract. For some reason the extracted features which the mesh snaps are sparse and generally weird. I tried refining the mesh with no success as the same result appeared.

Can anybody help me to achieve a smooth grid? This the link with the neccessary case files. https://drive.google.com/drive/folde...qu?usp=sharing

Cheers
Attached Images
File Type: png Surface.png (22.5 KB, 35 views)
File Type: png SurfaceMesh.png (27.2 KB, 31 views)
File Type: png FinaMesh.png (22.5 KB, 39 views)
gpouliasis is offline   Reply With Quote

Old   July 8, 2020, 19:20
Default
  #2
New Member
 
Join Date: Jun 2020
Location: UK
Posts: 22
Rep Power: 5
Rango is on a distinguished road
Hi,


The quality of your "stl" files are not that great. If you can, try to create them as triangulated surface meshes and export them as "stl" (This can be done in Salome for example).

Regarding the "eMesh" files, you have asked to include every single edge in your stl file as an "edge feature" by setting "includeAngle" to 180. Try to decrease it to 150 and check the results,
Code:
<your_stl_file_name.stl>
{
     extractionMethod    extractFromSurface;

    extractFromSurfaceCoeffs
    {
        // Mark edges whose adjacent surface normals are at an angle less
        // than includedAngle as features
        // - 0  : selects no edges
        // - 180: selects all edges
        includedAngle   150;
    }
    // Write options
    writeFeatureEdgeMesh    yes;
}
Cheers
Rango is offline   Reply With Quote

Old   July 9, 2020, 02:15
Post
  #3
New Member
 
George
Join Date: Jul 2020
Location: TU Delft, The Netherlands
Posts: 18
Rep Power: 5
gpouliasis is on a distinguished road
Hi Rango,

Thanks a lot for your response. I have already tried the "includedAngle 150" setting with no results. Do you have any tutorial to suggest for the operations in Salome?
gpouliasis is offline   Reply With Quote

Old   July 9, 2020, 06:47
Post STL Refinement
  #4
New Member
 
George
Join Date: Jul 2020
Location: TU Delft, The Netherlands
Posts: 18
Rep Power: 5
gpouliasis is on a distinguished road
Hi Foamers,

I have worked a bit more on my stl's in Blender. I cleaned my original versions leaving only the essential vertices required for my geometry. Then i tried to use subdivision surface and triangulate modifiers from Blender to refine my geometry. I did this two times. Then i generated three feature extracts, one with the simple and clean geometry, one with the first refinement and one with the second. I kept the "includeangle" option at 180 degrees. You can find the results in the attached screenshots. As you will see the first case is a clean shape except for the tunnel, which is not defined well. Then as we progress to the finer stls the pixelated shape appears.

I have uploaded the stls on the "Refined STLs" folder (https://drive.google.com/drive/folde...qu?usp=sharing)

These results are really confusing. Any suggestions?
Attached Images
File Type: png Feature_Simple.png (52.8 KB, 15 views)
File Type: png Feature_Fine1.png (168.6 KB, 11 views)
File Type: jpg Feature_Fine2.jpg (60.8 KB, 19 views)
gpouliasis is offline   Reply With Quote

Old   July 20, 2020, 03:54
Default
  #5
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Hi,


related to snappyHexMesh and feature edge refinement, many people do things wrong here. The first step should be reading this one Creating waterproof STL using snappyHexMesh or salome, after that you can checkout a surfaceFeatureEdge tutorial I made (given on my website), and if you want to fully understand how you create a well-defined snappyHexMesh mesh, you can go through my archived OpenFOAM training series (on my website too).

Good luck,
Tobi
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   July 21, 2020, 04:33
Default Solution
  #6
New Member
 
George
Join Date: Jul 2020
Location: TU Delft, The Netherlands
Posts: 18
Rep Power: 5
gpouliasis is on a distinguished road
Dear Tobi,

Thanks a lot for taking the time to answer. I had already read your post about watertight surfaces (https://www.cfd-online.com/Forums/op...sh-salome.html) which i recommend to everybody starting with OF. I found to problems with my case.

1. I was only looking at the first step, where only the castallated mesh appeared. Pretty stupid but still, it happened so i am posting it in case somebidy gets confused.

2. I had my geometry in the projected coordinates (x.528288 y.4652000 etc.) which most importantly was not alligned with any axis. I used blender to move my surface to the origin and then rotate it so it is alligned to the x axis. Then i used salome in order to create the hexagonal mesh which snappyHexMesh. In this my hexagons where mostly alligned with the flow direction. This made the snappying better and the simulation more stable.

I hope my adventure will help somebody.

Happy Foaming
gpouliasis is offline   Reply With Quote

Old   July 21, 2020, 04:37
Default
  #7
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
This phenomenon is probably related to numerical schemes and the convective flux calculation (https://www.youtube.com/watch?v=C0CcN7l37Fg). If the flow is parallel / and orthogonal to the cell faces we don't have problems. You can also check out my numerical analysis on my website. There, you will find different convective schemes on different cells such as tetrahedral, hexahedral, polyhedral, in combination with different mesh densities.
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Reply

Tags
interfoam, snappyhexmesh 3d, surfacefeatureextract


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
[snappyHexMesh] Creating multiple multiple cell zones with snappyHexMesh - a newbie in deep water! divergence OpenFOAM Meshing & Mesh Conversion 0 January 23, 2019 04:17
[mesh manipulation] Importing Multiple Meshes thomasnwalshiii OpenFOAM Meshing & Mesh Conversion 18 December 19, 2015 18:57
3D Hybrid Mesh Errors DarrenC ANSYS Meshing & Geometry 11 August 5, 2013 06:42
[ICEM] Generating Mesh for STL Car in Windtunnel Simulation tommymoose ANSYS Meshing & Geometry 48 April 15, 2013 04:24
[Gmsh] 2D Mesh Generation Tutorial for GMSH aeroslacker OpenFOAM Meshing & Mesh Conversion 12 January 19, 2012 03:52


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