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

[Gmsh] Meshing 3D volume from STL/STEP Files (Gmsh)

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 1, 2017, 11:21
Default Meshing 3D volume from STL/STEP Files (Gmsh)
  #1
Member
 
James Gross
Join Date: Nov 2017
Posts: 77
Rep Power: 8
jgross is on a distinguished road
Hello people!

As the title says, I am trying to use Gmsh to mesh a 3D volume that is enclosed by a number of STL files. The STL files define a centrifugal pump volute with inlet, outlet, and wall. The end goal is to use this mesh with OpenFOAM to simulate internal flow through the volute.

After some previous research online, it seems that it might be best to initially convert from STL to STEP. I can use FreeCAD to do so if that is indeed the better option.

My question to you is the following. Is it best to merge the STL/STEP files individually (as this would presumably allow for patches to be defined more easily) or should I initially merge all the files into one volume?

I attempted to upload the STL files, however they even after zipping, it was too large.

Furthermore, if I would like to use Gmsh to define all the different surfaces of the geometry (so that patches can be defined readily in OpenFOAM), how might I go about doing this using a geo script?

I am sorry if any of these questions come across as trivial, I am new to Gmsh and unfortunately have not found much online about using Gmsh for STL/STEP files.

Thank you for your help. I will be sure to post progress here so that my post may have future use to others.

James
jgross is offline   Reply With Quote

Old   December 3, 2017, 17:37
Default
  #2
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,938
Rep Power: 39
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Hi,

Couple of questions:

1. Do you really have to use Gmsh (cause, for example, snappyHexMesh looks more suitable for the task)?
2. Did you already see https://www.cfd-online.com/Forums/op...emesh-stl.html (link to Gmsh mailing list in the post is also useful).
3. If you can make STEP from your STLs, it would be much easier to create 3D mesh in Gmsh from STEP file than from bunch of STLs.
alexeym is offline   Reply With Quote

Old   December 5, 2017, 07:27
Default
  #3
Member
 
James Gross
Join Date: Nov 2017
Posts: 77
Rep Power: 8
jgross is on a distinguished road
Hi Alexey,

Thank you for taking the time to respond to my post.

To answer your questions:

1. I have thought about using sHM, however the nature of the bigger problem really requires a parametric meshing tool. This is because I will need to be able to construct new geometries parametrically, mesh the new geometries, and then evaluate them. All of this will be need to be done with little to no human interaction. Therefore, I thought Gmsh might be a better tool to accomplish this.

2. I have had a look at the post you linked. I have also subscribed to the Gmsh mailing list. I may possibly post the question there as well. I attempted to follow similar steps as those from the post, however the STL file seems to have a number of irregular shaped triangles that I would like to avoid having in my mesh. The reclassified mesh seems to retain these irregularities. I was hoping using a STEP file might improve upon this.

3. I have created STEP files of each individual component STL. I had thought it might be possible to mesh these individually and then to merge the meshes at a later stage. I could also concatenate the STL files into one STEP file. However, I am worried that might make it more difficult to individually assign patch types to each component when I evaluate the design in OpenFOAM later on.

Here is a link to the files on my OneDrive, if you would like to see the geometries for the volute.

https://universityofcambridgecloud-m...4dfff2d3e6baf2

If not, then I will proceed by meshing the STEP components separately so that I can readily define the separate physical groups. Afterwards, I will try to merge the meshes into a single mesh to be used in OpenFOAM. If that is not very successful, I will try to mesh the geometry as a whole, and separately define the physical groups.

Thank you again for your help. I really appreciate you taking the time to answer my question.

James
jgross is offline   Reply With Quote

Old   December 11, 2017, 14:16
Default
  #4
Member
 
James Gross
Join Date: Nov 2017
Posts: 77
Rep Power: 8
jgross is on a distinguished road
As an update for anyone that might have the same issue, investigating t13.geo tutorial included in the $GmshHome/share/doc/gmsh/tutorial directory helped a lot. The CreateTopology function seems to be a bit of a black box, as I couldn't find any options for defining the surfaces in the same way as the input STL files, however it is not too much of an issue for this case.
jgross is offline   Reply With Quote

Old   May 12, 2020, 07:08
Default
  #5
Senior Member
 
Franco
Join Date: Nov 2019
Location: Compiègne, France
Posts: 129
Rep Power: 6
otaolafr is on a distinguished road
Quote:
Originally Posted by jgross View Post
As an update for anyone that might have the same issue, investigating t13.geo tutorial included in the $GmshHome/share/doc/gmsh/tutorial directory helped a lot. The CreateTopology function seems to be a bit of a black box, as I couldn't find any options for defining the surfaces in the same way as the input STL files, however it is not too much of an issue for this case.
hello jgross, maybe your experience could help me,
i was looking for a way to export my geometry in STEP, doing a meshing (maybe in gmsh) and then export the different boundaries in separate STLs so i can have the patches from the begining and use snappyHex, so I can make my volumetric mesh. i want to do this so i can use one of the surfaces with boundary layers, could you please lend me know if the correct path could be with gmsh? best regards.
franco
otaolafr is offline   Reply With Quote

Old   July 13, 2022, 23:36
Default
  #6
New Member
 
Maryjane Roberts
Join Date: Jul 2022
Posts: 2
Rep Power: 0
MaryjaneRoberts is on a distinguished road
Your chart looks weird.
MaryjaneRoberts is offline   Reply With Quote

Old   July 15, 2022, 06:11
Default
  #7
New Member
 
Join Date: Jul 2022
Posts: 6
Rep Power: 4
PassengerC07 is on a distinguished road
I had the same idea of parametric meshing for better mesh quality from my experience with ICEM and explored Gmsh a bit, specifically t13.geo that uses an STL model. I was pretty frustrated when converting my STL models into STEP ones coz the 3D shapes are irregular. You might have better chances with a regular-shape pump.

I think you can combine the surfaces in Gmsh and define enclosed volume for meshing. In this sense it might not be meaningful to combine the STEP files before loading them into Gmsh.

Last edited by PassengerC07; July 15, 2022 at 12:56.
PassengerC07 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
[GAMBIT] Issues with Cooper Volume Meshing Forrest ANSYS Meshing & Geometry 6 September 19, 2018 05:07
meshing of a compound volume in GMSH shawn3531 OpenFOAM 4 March 12, 2015 11:45
[blockMesh] error message with modeling a cube with a hold at the center hsingtzu OpenFOAM Meshing & Mesh Conversion 2 March 14, 2012 10:56
channelFoam for a 3D pipe AlmostSurelyRob OpenFOAM 3 June 24, 2011 14:06
On the damBreak4phaseFine cases paean OpenFOAM Running, Solving & CFD 0 November 14, 2008 22:14


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