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

[Gmsh] .stl from GMSH in SnappyHexMesh

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By mturcios777

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 27, 2012, 12:56
Default .stl from GMSH in SnappyHexMesh
  #1
Member
 
Robert
Join Date: Aug 2012
Location: Berlin
Posts: 74
Rep Power: 14
vainilreb is on a distinguished road
Hi,

is it possible to use a 2D-Mesh from GMSH which is saved in the .stl-format as stl-input for snappyHexMesh?

Or is there any other way to extract an stl-File from a geometry which was modelled in GMSH?

Thank you very much!

Robert
vainilreb is offline   Reply With Quote

Old   November 27, 2012, 13:27
Default
  #2
Senior Member
 
mturcios777's Avatar
 
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28
mturcios777 will become famous soon enough
Hi Robert,

Do you mean a 2D geometry to make a 2D case in snappyHexMesh? I've never heard of doing a 2D case in snappy, but I guess you could do it.

As long as you have an STL file, snappyHexMesh will read it. As to what happens after that, there is only one way to find out...
mturcios777 is offline   Reply With Quote

Old   November 27, 2012, 13:41
Default
  #3
Member
 
Robert
Join Date: Aug 2012
Location: Berlin
Posts: 74
Rep Power: 14
vainilreb is on a distinguished road
No, I mean a 3D-geometry created in gmsh. I want to save it as .stl to mesh it with snappyHexMesh. But I don't know how to get an .stl from a .geo! :/
I tried simply 2D-meshing the 3D-geometry and then saving the mesh in the stl format, but so far that does not work at all.
vainilreb is offline   Reply With Quote

Old   November 27, 2012, 14:11
Default
  #4
Senior Member
 
mturcios777's Avatar
 
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28
mturcios777 will become famous soon enough
Ah, I see now. You should be able to mesh as long as you get the STL. Have you checked that the STL is watertight? You can inspect the STL in paraview, have a look and see if there are any serious problems, maybe post a picture somewhere.
mturcios777 is offline   Reply With Quote

Old   November 29, 2012, 04:42
Default
  #5
Member
 
Robert
Join Date: Aug 2012
Location: Berlin
Posts: 74
Rep Power: 14
vainilreb is on a distinguished road
Well, the stl looks good. Unfortunately gmsh did not save the physical groups to the file? The stl is a simple desk with an inlet patch where I want ammonia to be added to the system.

Could it be a problem that the stl contains surfaces which intersect the walls of the blockMesh geometry? I'm talking about the lower surfaces of the desk's legs. Maybe I should leave them away?
vainilreb is offline   Reply With Quote

Old   November 29, 2012, 06:52
Default
  #6
Member
 
Robert
Join Date: Aug 2012
Location: Berlin
Posts: 74
Rep Power: 14
vainilreb is on a distinguished road
Snappy finally did it! Once I have figured out how to divide the surfaces into different physical groups I will be happy.
vainilreb is offline   Reply With Quote

Old   November 29, 2012, 15:12
Default
  #7
Senior Member
 
mturcios777's Avatar
 
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28
mturcios777 will become famous soon enough
Glad to hear it worked well; please be sure to post your solution so that future users can benefit from it. There are many threads on splitting geometry up into patches. I personally prefer splitting the surface into multiple files, as it makes it easier to isolate a problem patch.

I use blender for when I need to see the geometry to manipulate it, or write an octave/matlab script to separate out the triangles based on certain criteria.
Nicole likes this.
mturcios777 is offline   Reply With Quote

Old   March 19, 2020, 09:54
Default geo to stl
  #8
New Member
 
muhammet çevik
Join Date: Oct 2016
Location: turkey
Posts: 5
Rep Power: 10
muhmt.cvk is on a distinguished road
hi
I write matlab code to generate 3d geo file . I am trying to change to format to stl to run snappyhexmesh. I am using GMSH to convert geo file to stl file but snapp seems doesnt recognize the file. what I understand you also tried samething. Could you help me about it if its work for you


Quote:
Originally Posted by vainilreb View Post
Snappy finally did it! Once I have figured out how to divide the surfaces into different physical groups I will be happy.
muhmt.cvk 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
[snappyHexMesh] SnappyHexMesh fails to create patches of .stl files WernerW OpenFOAM Meshing & Mesh Conversion 4 September 26, 2017 01:59
[Gmsh] gMsh instead of blockMesh for base mesh, then snappyHexMesh sazabi2001 OpenFOAM Meshing & Mesh Conversion 0 February 23, 2017 13:00
[snappyHexMesh] SnappyHexMesh .stl Jochem OpenFOAM Meshing & Mesh Conversion 10 September 23, 2016 05:26
[snappyHexMesh] snappyHexMesh does not create boundary patches from .stl files bug_or_feature OpenFOAM Meshing & Mesh Conversion 7 August 30, 2016 20:18
[Gmsh] Import problem ARC OpenFOAM Meshing & Mesh Conversion 0 February 27, 2010 11:56


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