CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > SU2

SU2 Mesh Generation from Gmsh

Register Blogs Community New Posts Updated Threads Search

Like Tree3Likes
  • 1 Post By bigfootedrockmidget
  • 1 Post By chabackb
  • 1 Post By chabackb

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 27, 2021, 17:44
Default SU2 Mesh Generation from Gmsh
  #1
New Member
 
Ben Chaback
Join Date: Aug 2021
Posts: 10
Rep Power: 4
chabackb is on a distinguished road
Greetings,

I am attempting to make an su2 mesh in gmsh and I am running into issues outputting the boundary conditions.

What I have been testing is a cylinder with a course mesh. I can go through and individually add the elements into the su2 mesh file but this is tedious and inaccurate and I am sure there is a better way to do it.

I stumbled across a post from back in 2017 on the CFD forum that looked similar to my issue but I was not able to resolve it with the information provided there. I have been able to label my faces in gmsh (inlet, outlet, wall) but when I go to convert from gmsh to exporting in su2 file format these markers are nowhere to be found.

I believe I am missing a step in my process but I have not been able to figure it out. Any help or guidance towards a solution on this would be greatly appreciated, thanks for your help on this!

Technical Information:
OS: Windows 10
Gmsh Version: 4.8.4
SU2 Version: 7.2.0
Working Files: See the zip file at this link (https://drive.google.com/file/d/1yWM...ew?usp=sharing)

If there is additional information I have forgotten that would be helpful in answering the question please let me know! I am also not restricted to using Gmsh if someone knows of a mesh creation software that they find better for su2.
chabackb is offline   Reply With Quote

Old   August 30, 2021, 03:09
Default
  #2
Senior Member
 
bigfoot
Join Date: Dec 2011
Location: Netherlands
Posts: 499
Rep Power: 17
bigfootedrockmidget is on a distinguished road
Hi,


All physical entities should be named, so in 3D you should not only name the surfaces, but also name the volume.



If you export to su2, you should not select the option 'save all entities'. Only the physical entities will now be saved. If you forget to name the volume (or the surface in 2D) then the su2 mesh saving will be incomplete.
chabackb likes this.
bigfootedrockmidget is offline   Reply With Quote

Old   August 30, 2021, 20:56
Default
  #3
New Member
 
Ben Chaback
Join Date: Aug 2021
Posts: 10
Rep Power: 4
chabackb is on a distinguished road
Many thanks for your reply!

The volume is where I am running into issues now. Here is my process if it helps.

1. Load STL file in gmsh
2. Under mesh, select 3D
3. Under geometry, select add, volume

At this point I am looking at the mesh but I cannot actually select what the volume is. Does this have something to do with not creating the model in gmsh?

When I import the STL it looks like a wireframe and not a solid model with the mesh around it so I am wondering if there is an issue there.

Any guidance and help on this is appreciated, thanks for your help and time!
chabackb is offline   Reply With Quote

Old   August 31, 2021, 09:09
Default
  #4
Senior Member
 
bigfoot
Join Date: Dec 2011
Location: Netherlands
Posts: 499
Rep Power: 17
bigfootedrockmidget is on a distinguished road
Hi,


I think you have to create the volume from the surface first by selecting the enclosing surface. After that you mesh the volume.
bigfootedrockmidget is offline   Reply With Quote

Old   August 31, 2021, 19:38
Default
  #5
New Member
 
Ben Chaback
Join Date: Aug 2021
Posts: 10
Rep Power: 4
chabackb is on a distinguished road
Thanks again for another reply!

So the way I am loading the stl file I go to File, Open, and then choose it.

However it is automatically loading with a mesh already generated and not a solid object or volume or anything. I have a screenshot attached of how it looks when I open the stl file in gmsh. [ATTACH]Loaded_STL[/ATTACH]

Is there a different process I should be doing to open the stl file as a solid geometry rather then a mesh?

Thanks for your help and time on this!
Attached Images
File Type: jpg Loaded STL.jpg (128.1 KB, 43 views)
rn86j likes this.
chabackb is offline   Reply With Quote

Old   September 6, 2021, 18:05
Default
  #6
New Member
 
Ben Chaback
Join Date: Aug 2021
Posts: 10
Rep Power: 4
chabackb is on a distinguished road
So after some head hitting with Gmsh and searching around some other forums I ran into enGrid.

In the more recent versions (I think 1.4 is where it started) you can export to the SU2 style mesh. There is an awesome tutorial on YouTube that walks through how to do this.

I found it to be way more user friendly than Gmsh but I have seen a lot of warnings that it is not stable on Linux (I use Windows so no tests done there) so something to be aware of.

Hope this helps others on this thread!
A.Roy likes this.
chabackb is offline   Reply With Quote

Old   November 15, 2021, 09:31
Default
  #7
New Member
 
Join Date: Jun 2020
Posts: 21
Rep Power: 5
rn86j is on a distinguished road
Quote:
Originally Posted by chabackb View Post
Thanks again for another reply!

So the way I am loading the stl file I go to File, Open, and then choose it.

However it is automatically loading with a mesh already generated and not a solid object or volume or anything. I have a screenshot attached of how it looks when I open the stl file in gmsh. [ATTACH]Loaded_STL[/ATTACH]

Is there a different process I should be doing to open the stl file as a solid geometry rather then a mesh?

Thanks for your help and time on this!
--------------------
I have a similar problem with 3-D wing with closed wing tips
not solved yet
importing a STL file, but getting stuck - Trying to add an outer volume (Sphere), so that SU2 mesh can be generated
Any help appreciated. Thanks
I can try to post a simple STL file, next time, if needed.
rn86j is offline   Reply With Quote

Old   November 15, 2021, 14:11
Default
  #8
New Member
 
Ben Chaback
Join Date: Aug 2021
Posts: 10
Rep Power: 4
chabackb is on a distinguished road
Thanks for your question.

So I ended up switching over to EnGrid as I found it to be far more user friendly and easy to work with than Gmsh was. There is an awesome YouTube tutorial that walks through the mesh generation process and while it is for FLUENT you can export to SU2 instead as long as you have the latest version.

If it would be helpful I can see if I have the link somewhere and also send the specs for EnGrid.

Hope this helps!
chabackb is offline   Reply With Quote

Old   November 15, 2021, 15:54
Default
  #9
New Member
 
Join Date: Jun 2020
Posts: 21
Rep Power: 5
rn86j is on a distinguished road
Dr Ben
Yes that would be most helpful
Is Engrid being actively supported / developed again? Some of the correspondence on it seems a bit "dated"
Thanks
r
rn86j is offline   Reply With Quote

Old   November 15, 2021, 16:00
Default
  #10
New Member
 
Ben Chaback
Join Date: Aug 2021
Posts: 10
Rep Power: 4
chabackb is on a distinguished road
Not sure about active support on it, last version I saw is 1.4 but I think 1.5 is floating around too, looks like most updates are from around 2017.

Here is the enGrid GitHub: https://github.com/enGits/engrid/wiki

And here is the tutorial video for meshing: https://www.youtube.com/watch?v=VwSXldG3ank

Hope this helps!
chabackb is offline   Reply With Quote

Old   November 23, 2021, 16:35
Default
  #11
New Member
 
Join Date: Jun 2020
Posts: 21
Rep Power: 5
rn86j is on a distinguished road
Thank you Dr Ben - These are excellent links... Internal flow related. ENGRID seems very useful
I wonder if yourself or other readers have come across the issues as follows:
So, if I have a complete wing surface geometry in STL file and read it into ENGRID. Then the steps needed are:
1. I need to create an outer volume sphere
2. Then create a volume Flow mesh
3. Insert Boundary layer on the wing
Help very much appreciated on how to achieve these 3 steps.
Do we need to specify the the outer volume sphere in the STL file also ?

Similarly, if we assume symmetry then we have to introduce a symmetry plane and half sphere around half a wing..... Possibly a little more difficult.
Many thanks
r
rn86j is offline   Reply With Quote

Old   November 28, 2021, 17:52
Default
  #12
New Member
 
Ben Chaback
Join Date: Aug 2021
Posts: 10
Rep Power: 4
chabackb is on a distinguished road
Glad I could help!

So I think the tutorial will cover some of that with their example but here is my input on the questions.

1. When you say outer volume sphere are you talking about the volume mesh? If so you can do that in EnGrid by defining the faces of the object (I usually do inlet, outlet, etc) and then the wall condition. This allowed me to get the mesh to fully generate for SU2.

2. Again for flow mesh I am guessing you are talking about the internal mesh or maybe a surface mesh? Surface meshing is done after defining faces (created along with the volume mesh) but for some more of the internal stuff you can use prismatic boundary layers and boundary conditions to get the flow areas made.

3. Inside of EnGrid there is the option for prismatic boundary layers and you can later divide that into smaller layers, which should be sufficient for SU2.

I developed a guide for this for my research team based on a simple cylinder case using the tutorial video I linked a few posts back, it is fairly easy to follow and gives some good tips on it. As you get further with it I can try to assist as able to as well. I can see about linking the guide in a future post too if that would be helpful.

For the STL you should be okay without externally defining anything, most of the boundary and other declarations will be handled inside of EnGrid directly. Do make sure your STL is in metric (specifically meters) or you may get some problems inside of EnGrid. I haven't tried to change units but you may be able to.

Not sure on the symmetry question, for all my parts I have done so far with meshing I had the completed STL and then meshed that in EnGrid then evaluated in SU2. I would guess you would want to have a final STL before meshing any of it but may have symmetry abilities inside of EnGrid too.

Hope this info helps! Let me know if you have additional questions I can assist with.
chabackb is offline   Reply With Quote

Old   December 3, 2021, 05:04
Default
  #13
New Member
 
Join Date: Jun 2020
Posts: 21
Rep Power: 5
rn86j is on a distinguished road
Dr Ben Thank you for the post
Your guide seems very useful. I would appreciate the link
1. I remain interested in meshing a wing inside either a WT (inlet, outlet and 4 walls) or a large outer sphere. So the boundary layer develops only on the wing (or wing + fuselage). By any chance, have you considered that.. I have simple wing in STL.
2. Could we create such an example within engrid itself ?
r
rn86j is offline   Reply With Quote

Reply

Tags
boundary markers, gmsh 4.8.4, mesh 2d


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/splitMeshRegion : region1 in zone "-1" GuiMagyar OpenFOAM Meshing & Mesh Conversion 3 August 4, 2023 12:38
how to set periodic boundary conditions Ganesh FLUENT 15 November 18, 2020 06:09
decomposePar problem: Cell 0contains face labels out of range vaina74 OpenFOAM Pre-Processing 37 July 20, 2020 05:38
[Gmsh] How to resolve gmsh 3D mesh generation errors Mugen996 OpenFOAM Meshing & Mesh Conversion 0 March 16, 2020 08:01
[snappyHexMesh] No layers in a small gap bobburnquist OpenFOAM Meshing & Mesh Conversion 6 August 26, 2015 09:38


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