CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   SU2 (http://www.cfd-online.com/Forums/su2/)
-   -   Some tools to download: mesh conversion/transformation (http://www.cfd-online.com/Forums/su2/136497-some-tools-download-mesh-conversion-transformation.html)

Combas May 29, 2014 16:38

Some tools to download: mesh conversion/transformation
 
4 Attachment(s)
Dear all,

I have developed some tools to:

1) convert OpenFoam meshes to SU2 format (see my previous post http://www.cfd-online.com/Forums/su2...esh-2d-3d.html)
You can download the last version in the post you are reading, but for more information go to the previous post. The files to download are:
* ConvertOpenFoam2SU2.py.gz
* TemplateOpenFoamToSU2_2D.txt
* TemplateOpenFoamToSU2_3D.txt


2) perform some basic transformation on SU2 meshes. With this tool you can:
p, li { white-space: pre-wrap; } - get some mesh information
- merge some boundaries
- remove some boundaries (for example, after a mesh conversion, you can get undesired boundaries)
- rename a boundary
- convert a 3D extruded mesh into a 2D mesh
The file to download is:
* TransformSU2MeshFile.py.gz

To launch this tool (after having done gunzip TransformSU2MeshFile.py.gz), you just have to type:
python TransformSU2MeshFile.py
and you just have to answer the questions.



To avoid any problem, it is better to give a new name to the output mesh file (when it is asked) so that the initial mesh file be not overwritten and lost.
Another remark: it seems that there is a slight difference in the SU2 mesh format between the v3.0 and the previous ones: check before using this tool that you get "MARKER_TAG" and not "MARKERTAG" in your mesh file. I am not sure it works in this last case. p, li { white-space: pre-wrap; }
I think it is useless to tell more about this tool since it is really easy to use.


I hope these tools will help you to do some basic things on SU2 meshes.
Laurent

economon June 5, 2014 15:01

Dear Laurent,

Thank you for sharing your tools: these are the types of contributions that we encourage and love to see from the open-source community!

Cheers,
Tom


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