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

[Gmsh] Export single patch from mesh to stl

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 1, 2018, 15:16
Default Export single patch from mesh to stl
  #1
New Member
 
Join Date: Oct 2018
Posts: 19
Rep Power: 7
krzychu111 is on a distinguished road
Hi,


I'm working on meshing with use of snappyHexMesh, to use it properly I have to provide a stl file with geometry. Unfortunately gmsh doesn't export geometry divided by patches but whole geometry is in single "Created by Gmsh" group. So I want to bypass this issue by exporting patch by patch and by script marge and add group's names.


But I don't know how to export only patch of whole volume. I tried using "gmsh -string "Physical Volume(1) = {27};" or setting visibility to single patch but this doesn't work and each time I got whole geometry.



Does anybody know how to export single patch from volume?
krzychu111 is offline   Reply With Quote

Old   March 9, 2019, 12:06
Default
  #2
New Member
 
Petar Cajic
Join Date: Jul 2018
Location: City of Nis, Serbia
Posts: 5
Rep Power: 7
caja94 is on a distinguished road
Send a message via Skype™ to caja94
Hello krzychu111,

I am having a similar problem trying to export .stl file from gmsh. Sorry i don't have an answer if you didn't solve this problem, but in case you did, i have a question.
Is it possible to export all patches by their names in .stl files e.g. "fluidInlet" or something like that? Because i only get "Created by Gmsh", the same thing you quoted above.
If you, or anyone else, have an answer, it would be greatly appreciated.

Best regards, Petar
caja94 is offline   Reply With Quote

Old   April 27, 2021, 08:48
Default
  #3
New Member
 
Guilherme Luz
Join Date: Mar 2021
Posts: 1
Rep Power: 0
qwertyus is on a distinguished road
Quote:
Originally Posted by krzychu111 View Post
Hi,


I'm working on meshing with use of snappyHexMesh, to use it properly I have to provide a stl file with geometry. Unfortunately gmsh doesn't export geometry divided by patches but whole geometry is in single "Created by Gmsh" group. So I want to bypass this issue by exporting patch by patch and by script marge and add group's names.


But I don't know how to export only patch of whole volume. I tried using "gmsh -string "Physical Volume(1) = {27};" or setting visibility to single patch but this doesn't work and each time I got whole geometry.



Does anybody know how to export single patch from volume?



As of now (v 4.8.3 and a few previous ones), Gmsh allows exporting stl by physical surface, which then can be read in by snappyHexMesh when creating the patches. To do so, go to "File -> Export" and select .stl format. When prompted, select "Per physical surface". Of course, you have to have defined the corresponding surfaces when importing/creating the geometry in Gmsh.

What I'm trying unsuccessfully to do is do that on a .geo script. I was only able to save the stl using default settings (which yield exactly the same result as yours).
qwertyus 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
[Commercial meshers] Thin Walls Conversion from Fluent Mesh Isaac OpenFOAM Meshing & Mesh Conversion 1 March 4, 2016 12:08
Moving mesh Niklas Wikstrom (Wikstrom) OpenFOAM Running, Solving & CFD 122 June 15, 2014 06:20
[blockMesh] Cyclic BC's: Possible face ordering problem? (Channel flow) sega OpenFOAM Meshing & Mesh Conversion 3 September 28, 2010 12:46
Patch mesh export ariorus OpenFOAM 3 March 7, 2006 05:41
[Gmsh] Import gmsh msh to Foam adorean OpenFOAM Meshing & Mesh Conversion 24 April 27, 2005 08:19


All times are GMT -4. The time now is 05:50.