CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   SU2 (https://www.cfd-online.com/Forums/su2/)
-   -   SU2 Mesh Generation from Gmsh (https://www.cfd-online.com/Forums/su2/238183-su2-mesh-generation-gmsh.html)

chabackb August 27, 2021 17:44

SU2 Mesh Generation from Gmsh
 
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.

bigfootedrockmidget August 30, 2021 03:09

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 August 30, 2021 20:56

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!

bigfootedrockmidget August 31, 2021 09:09

Hi,


I think you have to create the volume from the surface first by selecting the enclosing surface. After that you mesh the volume.

chabackb August 31, 2021 19:38

1 Attachment(s)
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!

chabackb September 6, 2021 18:05

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!

rn86j November 15, 2021 09:31

Quote:

Originally Posted by chabackb (Post 811374)
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.

chabackb November 15, 2021 14:11

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!

rn86j November 15, 2021 15:54

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

chabackb November 15, 2021 16:00

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!

rn86j November 23, 2021 16:35

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

chabackb November 28, 2021 17:52

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.

rn86j December 3, 2021 05:04

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


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