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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 25, 2020, 10:56
Default
  #81
New Member
 
Frédéric MR
Join Date: Jun 2019
Posts: 18
Rep Power: 7
FM_Stiral is on a distinguished road
Thank you Gerhard,


I'm going to continue some test to solve it.
If someone has a solution, or a similar problem, please detail your case.
FM_Stiral is offline   Reply With Quote

Old   December 25, 2020, 15:16
Default
  #82
Senior Member
 
Franco
Join Date: Nov 2019
Location: Compiègne, France
Posts: 129
Rep Power: 6
otaolafr is on a distinguished road
hello I tried to use the script to export a polyhedral mesh from salome but i am getting some errors and when i open .foam file in paraview i dont see the mesh


Code:
Number of nodes: 177085 

Number of cells: 30000 

Counting number of faces: 

total number of faces: 203647, internal: 203647, external 0 

Converting mesh to OpenFOAM 

Finished processing boundary faces 

Traceback (most recent call last): 
  File "<string>", line 304, in exportToFoam 
KeyError: (172547, 172548, 172581, 172665, 174509, 174510, 174511) 

During handling of the above exception, another exception occurred: 

Traceback (most recent call last): 
  File "<string>", line 316, in exportToFoam 
KeyError: (172547, 172548, 172581, 172665, 174509, 174510, 174511) 

During handling of the above exception, another exception occurred: 

Traceback (most recent call last): 
  File "<string>", line 667, in run 
  File "<string>", line 341, in exportToFoam 
IndexError: list assignment index out of range 
Number of nodes: 177085 

Number of cells: 30000 

Counting number of faces: 

total number of faces: 203647, internal: 203647, external 0 

Converting mesh to OpenFOAM 

Finished processing boundary faces 

Traceback (most recent call last): 
  File "<string>", line 304, in exportToFoam 
KeyError: (172547, 172548, 172581, 172665, 174509, 174510, 174511) 

During handling of the above exception, another exception occurred: 

Traceback (most recent call last): 
  File "<string>", line 316, in exportToFoam 
KeyError: (172547, 172548, 172581, 172665, 174509, 174510, 174511) 

During handling of the above exception, another exception occurred: 

Traceback (most recent call last): 
  File "<string>", line 667, in run 
  File "<string>", line 341, in exportToFoam 
IndexError: list assignment index out of range


if anyone found themself with the same problem and solved it would be appreciated
otaolafr is offline   Reply With Quote

Old   October 13, 2022, 07:49
Default
  #83
New Member
 
Join Date: Sep 2022
Posts: 8
Rep Power: 4
rahulshivanathri is on a distinguished road
I tried script salomeToOpenfoam.py to import my mesh into openfoam which has pyramids.I get the following message in the console.Can you please help me






SalomeOutsideGUI: no selection mechanism available outside GUI
You have to select a mesh object and then run this script.
or run the export function directly from TUI
import SalomeToOpenFOAM
SalomeToOpenFOAM.exportToFoam(mesh, path)
rahulshivanathri is offline   Reply With Quote

Old   October 13, 2022, 07:54
Default
  #84
Senior Member
 
Franco
Join Date: Nov 2019
Location: Compiègne, France
Posts: 129
Rep Power: 6
otaolafr is on a distinguished road
Quote:
Originally Posted by rahulshivanathri View Post
I tried script salomeToOpenfoam.py to import my mesh into openfoam which has pyramids.I get the following message in the console.Can you please help me






SalomeOutsideGUI: no selection mechanism available outside GUI
You have to select a mesh object and then run this script.
or run the export function directly from TUI
import SalomeToOpenFOAM
SalomeToOpenFOAM.exportToFoam(mesh, path)
there is nothing in relation with the pyramids. the error is telling you what to do. you need to select the mesh you want to export (click in the left tree the mesh you want to export so it becomes blue as select a file) and then run the script.
otaolafr is offline   Reply With Quote

Old   October 13, 2022, 09:56
Default
  #85
New Member
 
Join Date: Sep 2022
Posts: 8
Rep Power: 4
rahulshivanathri is on a distinguished road
believe me i did it 1000000 times.It still shows the same issue,First it showed some errors to update the script now after i debugged the script, it shows this message
rahulshivanathri is offline   Reply With Quote

Old   October 13, 2022, 10:00
Default
  #86
New Member
 
Join Date: Sep 2022
Posts: 8
Rep Power: 4
rahulshivanathri is on a distinguished road
Quote:
Originally Posted by otaolafr View Post
there is nothing in relation with the pyramids. the error is telling you what to do. you need to select the mesh you want to export (click in the left tree the mesh you want to export so it becomes blue as select a file) and then run the script.
I did it but it is still the same issue
rahulshivanathri is offline   Reply With Quote

Old   February 8, 2023, 10:30
Default
  #87
New Member
 
Giovanni Fazzone
Join Date: Feb 2021
Posts: 9
Rep Power: 5
fazzesco is on a distinguished road
Quote:
Originally Posted by rahulshivanathri View Post
believe me i did it 1000000 times.It still shows the same issue,First it showed some errors to update the script now after i debugged the script, it shows this message
Hi rahulshivanathri, I am having the same problem. Did you sole it?
fazzesco is offline   Reply With Quote

Reply

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 20:22.