|
[Sponsors] |
[Gmsh] Meshing 3D volume from STL/STEP Files (Gmsh) |
![]() |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
![]() |
![]() |
#1 |
Member
James Gross
Join Date: Nov 2017
Posts: 77
Rep Power: 8 ![]() |
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 |
|
![]() |
![]() |
![]() |
![]() |
#2 |
Senior Member
|
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. |
|
![]() |
![]() |
![]() |
![]() |
#3 |
Member
James Gross
Join Date: Nov 2017
Posts: 77
Rep Power: 8 ![]() |
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 |
|
![]() |
![]() |
![]() |
![]() |
#4 |
Member
James Gross
Join Date: Nov 2017
Posts: 77
Rep Power: 8 ![]() |
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.
|
|
![]() |
![]() |
![]() |
![]() |
#5 | |
Senior Member
Franco
Join Date: Nov 2019
Location: Compiègne, France
Posts: 129
Rep Power: 6 ![]() |
Quote:
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 |
||
![]() |
![]() |
![]() |
![]() |
#6 |
New Member
Maryjane Roberts
Join Date: Jul 2022
Posts: 2
Rep Power: 0 ![]() |
Your chart looks weird.
|
|
![]() |
![]() |
![]() |
![]() |
#7 |
New Member
Join Date: Jul 2022
Posts: 6
Rep Power: 4 ![]() |
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 11:56. |
|
![]() |
![]() |
![]() |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
[GAMBIT] Issues with Cooper Volume Meshing | Forrest | ANSYS Meshing & Geometry | 6 | September 19, 2018 04:07 |
meshing of a compound volume in GMSH | shawn3531 | OpenFOAM | 4 | March 12, 2015 10:45 |
[blockMesh] error message with modeling a cube with a hold at the center | hsingtzu | OpenFOAM Meshing & Mesh Conversion | 2 | March 14, 2012 09:56 |
channelFoam for a 3D pipe | AlmostSurelyRob | OpenFOAM | 3 | June 24, 2011 13:06 |
On the damBreak4phaseFine cases | paean | OpenFOAM Running, Solving & CFD | 0 | November 14, 2008 21:14 |