CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Meshing & Mesh Conversion

[Salome] Script for converting a mesh from Salome-Platform to OpenFOAM

Register Blogs Community New Posts Updated Threads Search

Like Tree33Likes

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   October 16, 2013, 14:14
Default Script for converting a mesh from Salome-Platform to OpenFOAM
  #1
nsf
Senior Member
 
Nicolas Edh
Join Date: Mar 2010
Location: Uppsala, Sweden
Posts: 123
Rep Power: 18
nsf is on a distinguished road
Hi all,

I'd like to share a python script that converts a Salome mesh to OpenFOAM.

It's really easy to use. Just create the geometry and mesh in salome, select the mesh you want to export and go to file-> load script, select salomeToOpenFOAM and the script will convert your mesh to NameOfMesh/constant/polyMesh.

You can download it from https://github.com/nicolasedh/salomeToOpenFOAM. I've included a couple of sample mesh in the sample*py files.

I've been searching the forums for a way to convert a mesh from Salome-Platform to OpenFOAM but I haven't found an easy way. Most frequently people seem to suggest that you save the mesh in unv-format and then use ideasUnvToFoam. The downside is that the unv format doesn't support pyramids. Another option I've found is to save the mesh in gmsh-format and then use one specific version of gmsh to save the mesh in another specific version then finally use gmshToFoam. Then there is pythonFlu, which I suppose can do the same thing but is a bit overkill for my purposes.

Anyways I hope you find it useful.

As people tend to point out, this script is in no way endorsed by anyone but me nor am I affiliated with anyone but myself...

Happy foaming
Nicolas
elvis, aee, y_jiang and 10 others like this.
nsf is offline   Reply With Quote

 

Tags
mesh conversion, openfoam, salome meca


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
[Salome] how to setFields in openFOAM when you have imported mesh from salome or other package 13msmemusman OpenFOAM Meshing & Mesh Conversion 11 May 18, 2022 07:30
[Salome] import mesh from salome to openfoam dome90 OpenFOAM Meshing & Mesh Conversion 2 April 20, 2016 23:58
[Salome] Step to export mesh from SALOME to OpenFoam for 3D MRF geometry aminem OpenFOAM Meshing & Mesh Conversion 0 September 16, 2014 10:18
[Salome] Mesh Salome 7.3.0 to OpenFoam Ahadi OpenFOAM Meshing & Mesh Conversion 5 July 1, 2014 10:11
Mesh conversion problem from Salome to openfoam jishnusoni OpenFOAM 15 March 3, 2010 01:53


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