CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   SU2 (https://www.cfd-online.com/Forums/su2/)
-   -   Import salome mesh to SU2 (https://www.cfd-online.com/Forums/su2/226653-import-salome-mesh-su2.html)

pl96andy May 4, 2020 03:44

Import salome mesh to SU2
 
Hi all
I'm new to cfd. I'm trying to import triangle mesh generated in salome 9.4 to SU2 7.0.4 using cgns format.


I export cgns HDF5 format to ADF using cgns tools obtained from debian packages.


While trying to run simulation i receive an error " Unsupported or unknown CGNS element type : (type6) "



What should i do about it?


Thany You


Andrzej

giovanni.medici May 7, 2020 10:48

Hi pl96andy,
I've been trying to read in SU2 a CGNS mesh file created in Salome, in the past, but never succeeded, possibly with the new Salome and SU2 versions, is finally possible, if you managed to read a CGNS mesh in SU2 please let us know!!

As a backup solution I modified a script that was available so to export the native su2 file format. The problem is that the su2 files are ASCII, so they will be considerably less efficient than (binary) CGNS.

To load the script in Salome you have to ctrl+T and open the python script. Then simply type the command:

Code:

ExportSU2File("Mesh1","OutputMesh",["GroupToInclude1","GroupToInclude2"],["GroupToExclude"])
  • Mesh1 is the name of the mesh in Salome that you want to export
  • OutputMesh is the name of the output file that will be created, (with an .su2 extension)
  • GroupToIncluden is the name of the groups you want to export (usually Input, Output, Symmetry, Body ...) You must create group of faces of the boundaries of your interest otherwise you will export only the volume mesh. To create groups in Salome: Create Group --> select Edges ... (if 2D mesh), Faces ... (if 3D mesh), choose a name of the group, pick select from geometry, and select the conveniente faces in the geometry file. If you don't see any, you shall go back to the Geometry module and explode the geometry which contains the mesh.
  • GroupToExclude groups that you don't want to add to your mesh

I'll redirect you to the post where I was sharing the modified python script.
https://www.cfd-online.com/Forums/su...tml#post750038

pl96andy June 10, 2020 06:15

1 Attachment(s)
Hi giovanni.medici
Thank you for solution and explanation. Until some point it looks like mesh is accepted by SU2 but it freezes at "geometry preprocessing (zone 0)". Processor is fully loaded but after day nothing changes. The same is for mesh exported through gmsh.
To 'shorten' waiting time i runned calculations using parallel_computation.py

After some attempts i created new config file to make sure that all functions are for the same version of SU2. But it didn't changed anything.


Am i missing something?

giovanni.medici June 19, 2020 05:25

I just opened your output.txt file, and I think that your SU2 failed to include parallel computation when compiling.
I suggest you to recompile and/or check you have installed all dependencies.
The output of parallel_computation.py shall be a readable log, similar to the one produced when only one core is used.

pl96andy June 19, 2020 08:31

I've runned this simulation also on single core and output freezes in the same place. I'm using precompiled binary (without mpi in package name) so i weren't compiling anything...
While running tutorial cases, there wasn't problem with running in parallel. Also if this is needed i've installed mpich from debian stretch repository but i don't know how to use it :D .
Should i try to compile SU2?

giovanni.medici June 20, 2020 02:50

Quote:

Originally Posted by pl96andy (Post 775143)
I've runned this simulation also on single core and output freezes in the same place. I'm using precompiled binary (without mpi in package name) so i weren't compiling anything...
While running tutorial cases, there wasn't problem with running in parallel. Also if this is needed i've installed mpich from debian stretch repository but i don't know how to use it :D .
Should i try to compile SU2?



If you downloaded the precompiled binary without mpi, it won’t use all your cores, parallel_computation.py will not crash, but you will not take advantage of the speedup of parallelization. So if you plan to use the parallel feature I suggest you to download, install or compile the mpi version.

Going back to the mesh problem, how did you created the ”test_1.su2” mesh? I'm the .su2 is an ASCII file, so you can open it with a text editor to see if everything is as expected.

It shall more resamble the file format described here.

pl96andy August 4, 2020 09:46

Mesh i've created in salome and exported it with python script.
I've recreated mesh to have some quadriangles.
i looked at exported mesh and mesh element 9 (according to website quadriangle element) occurs however there are some "None" elements. "9" elements have 5 columns of conectivity while "None" has 9 columns. That looks suspicious.
also i've tryied to export the same mesh to .med format, open it with gmsh and then export it to .su2. Simulation changs in the same moment however there are some "22" and "23" elements with 9 columns of conectivity.
I've tryied little with openfoam and also had problems with exported files from salome. In this case helped script to export directly from salome to openfoam.

I don't know how to do check this but maybe salome changed the way of exporting meshes.:(


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