Salome as an automatic Mesher for 3D Aerodynamic Shape Optimization

Hello Salome Community,

I am new to Salome, and before starting to work rigorously with it I need to know some capabilities of Salome’s SMesh from its experienced users.

I want to perform a 3D aerodynamic shape optimization of a wing (will be extended to wing+fuselage+tail later) using OpenMDAO, an open-source framework for MultiDisciplinary Analysis and Optimization. I am using OpenVSP for parametrizing the geometry and making the CAD model. My questions are:

  1. Assuming I can import the geometry from OpenVSP to Salome in an acceptable format (such as IGES format) is it possible to write a python script that will automatically import the geometry to Salome’s SMesh without opening the GUI?

  2. After importing the wing geometry automatically through a python script, is it possible to automatically mesh with a 3D inflation layer (to capture boundary layers effects) and unstructured mesh beyond the inflation layer? I hope to automate this through a python script.

  3. After meshing, is it possible to automatically export the mesh to .su2 format? I am currently using SU2 since it supports adjoint-based gradient evaluation which is crucial for a gradient-based optimization algorithm. If not, is there an alternate way to do it? Probably exporting it to GMSH and then exporting it to .su2 format might work out.

I understand that initially, I need to play around with the GUI to figure out the required number of inflation layers, their size etc. but after figuring them out my main objective is to automate the whole meshing process so that it can automatically and seamlessly work with the Optimization framework. If you have any other suggestions or thoughts regarding this work please let me know.

Thank You!

  1. yes, it is preferably the .STEP format. have a look at tutorial
  2. yes. see 1.
  3. no up to what I know. have a look at this interesting project maybe it supports the desired format. GitHub - MoiseRousseau/Salome-MeshIO: MeshIO plugin for Salome
    other suggestions, have a look at YACS module of salome. cyprien has also some videos about this.
    best regards,
    F.
1 Like

Thanks a lot for the answers and suggestions! Your quick reply is much appreciated. Now I feel confident to get deep into Salome. I will figure out if there is a way to export it to .su2 format and post it here soon.

Hi vishnu67,

I’m not aware of an export straight to .su2 format, but I do have code to auto-export the raw mesh for manipulation afterwards (in my case, translating the mesh to be viewed by PyVista functions). You can run your model’s dump script in terminal mode and it will auto-export mesh nodes, elements, and groups to the working directory.

1 Like

Oh, that’s great! Thanks a lot, @LGutknecht. I will try working with it and will post the code if I manage to export it to .su2 format.

if you look in the link to the plugin of meshIO it has .su2 as format of reading and writing

1 Like

That would really simplify a lot of my work. Thanks a lot @franco.ota for taking the effort to look into it.

My 2¢ here, I’m happy to see that there are workarounds. Anyway as for now I’ve always used a small python routine that I found online and ad-hoc modified, which natively exports in su2 from salome (ASCII).

The good thing is that it supports direct export of mesh and specified groups from SALOME, it handles 3D and 2D meshes.

You may give it a try here.

Thank you @giovanni.medici for letting me know about your work! Right now I am figuring out how to mesh a 3D wing in Salome by playing around with the GUI. I am hoping to finish it soon, will explore all the options suggested by the community and keep everyone posted here.

Thanks!