|
[Sponsors] |
September 30, 2019, 10:51 |
Salome meshing to OpenFOAM
|
#1 |
New Member
Frédéric MR
Join Date: Jun 2019
Posts: 18
Rep Power: 7 |
Hi Salome and openFOAM users.
I am facing a problem with mesh conversion from Salome to OpenFOAM. Context : 1 / My geometry is made of 3 parts : a pipe, a rectangular pipe and a junction (for mesh transition). The geometry is constructed with Solidworks and exported as STEP file 2 / I use Salome for mesh generation (I import the step file, explode the assembly in 3 solids). I mesh each solid independently (3D extrusion for pipe and rectangular pipe, and NetGen 3D for junction) BUT with a continuity at interface faces (using import 1D-2D Elements from Another Mesh algorithm as sub mesh). Of course, I create groups of faces for boundaries (inlet, outlet and wall). Then I make a compound with the 3 different meshes. At this step, everything seems ok. Problems start at the following steps. 3 / For OpenFOAM mesh use, I need a compatible mesh format. 1 : My 1st option is to export my mesh in .UNV file (however, this format do not recognize pyramids and this is a big problem for me). 2 : My second option is to use python scripts (SalomeToOpenFOAM). This script is very interesting (thank to nicolasedh and others for their contributions). However, using this script, I have internal faces at the interface between the pipe and the junction that are recognized as external faces and made in defaultPatches face group. 3 : Other solution ? I would like to keep Solidworks for CAD generation, Salome for mesh generation because I find it easy to use (when you have spend time playing with it) but if you know a free software easy to use with a good documentation I could change, and of course OpenFOAM. For information, when I realize a face control (faces with bare border) in Salome, it seems faces that cause my problem are highlighted. However, I don't know how to fix my problem. In attachment, I share my Step file (I would like to share my salome file but it is too big, even with cleared mesh data). Thank you for you help and time spent to my demand, and do not hesitate if my demand is not very clear. I hope you can help me. |
|
October 1, 2019, 09:03 |
|
#2 |
Senior Member
Mikko
Join Date: Jul 2014
Location: The Hague, The Netherlands
Posts: 243
Rep Power: 13 |
Hi,
I think that the mesh that you are exporting from Salome contains 3 different regions which are not stitched together and that's why you get the internal faces. Are the meshes conforming at the interfaces? You could try to fix this either in Salome or in OpenFOAM by using stitchMesh utility. Best, Mikko |
|
October 2, 2019, 06:51 |
|
#3 |
Member
Damian Berghof
Join Date: May 2019
Posts: 41
Rep Power: 11 |
Hello Frédéric,
as already pointed out by Mikko, it seems you have really 3 regions/meshes. To avoid such problems, I myself use the OpenFOAM "extrudeMesh" function to easily create the extensions. You can check my script on GitLab for this purpose: https://gitlab.com/virengos/openfoam...01_extrudeMesh best, Damian
__________________
Get more support about Meshing with Salome and Visualization with ParaView in my growing groups https://bit.ly/2lFfDkQ https://bit.ly/2k2u8Pj |
|
October 3, 2019, 10:58 |
|
#4 | |
New Member
Frédéric MR
Join Date: Jun 2019
Posts: 18
Rep Power: 7 |
Quote:
Thank you Mikko for your answer. My geometry is made of 3 parts exported (Assembly in Solidworks). Therefore I understand why it could be seen as three different regions. But the meshes are made to have continuity at interfaces (but I'm not sure if it is really conform even if using "Import 1D-2D Elements from Another Mesh" algorithm should make a conform mesh at the interfaces. But I don't understand how to fix this in Salome. And depending on what part I mesh 1st, the SalomeToOpenFOAM.py script can fail and give the following error "IndexError : list assignment index out of range" I think this is due to the bad interface faces but not sure. I would like to share my Salome study (.hdf) in order to have an easier way to discuss about my problem but it size is big. Do you know a mean to do this ? Thank you again. Fred |
||
October 3, 2019, 11:01 |
|
#5 | |
New Member
Frédéric MR
Join Date: Jun 2019
Posts: 18
Rep Power: 7 |
Quote:
Thank you Damian for your time. If I well understand, your script is used to create the mesh ? Or you first create your mesh in Salome and after "repair" when it is in OpenFOAM mesh format (using SalomeToOpenFOAM.py script ?). Fred |
||
October 3, 2019, 12:28 |
|
#6 |
Senior Member
Mikko
Join Date: Jul 2014
Location: The Hague, The Netherlands
Posts: 243
Rep Power: 13 |
Hi Fred,
Unfortunately, I don't have much experience with Salome so I'm not sure if I can help you. You can upload the file to some cloud service provider and give us a link. Best, Mikko |
|
October 4, 2019, 10:05 |
|
#7 | |
New Member
Frédéric MR
Join Date: Jun 2019
Posts: 18
Rep Power: 7 |
Quote:
Each answer is always an help even when it doesn't solve the problem directly I have uploaded my CAD + mesh files (available here https://wetransfer.com/downloads/18d...4130314/378bb0). I think it can help to understand how I have created my geometry and mesh (I'm not sure if it's the best way). Thank you for your contribution. Fred |
||
October 4, 2019, 12:36 |
|
#8 |
New Member
Frédéric MR
Join Date: Jun 2019
Posts: 18
Rep Power: 7 |
I see where my problem is located.
In the following images, the CAD imported in Salome (we can see non continued edges between the pipe and the junction, I think mesh generation is based on the CAD edges and it involve a gap between the two meshes. But I don't know how to reorient the edges. Thank you for your time. Fred. |
|
October 15, 2019, 09:59 |
|
#9 |
New Member
Frédéric MR
Join Date: Jun 2019
Posts: 18
Rep Power: 7 |
Finally I solved my problem : I had to create a single part in solidworks and split it in Salome.
|
|
June 28, 2024, 06:43 |
Salomé meshing to OpenFOAM through stl format
|
#10 |
New Member
Wilfried B.
Join Date: May 2024
Posts: 5
Rep Power: 2 |
Hello SALOMÉ and OpenFOAM community,
I am new to these two software programs and am trying to conduct a simulation to get familiar with them. irst, I created a mesh in SALOMÉ using the NETGEN algorithm (triangular pattern) and then exported the mesh in UNV format, having predefined the faces, of course. When I try to open the file using the « ideasUnvToFoam » command, I encounter errors. So I switched to an STL format this time without defining my surfaces. Since I'm not very familiar with the process, I'm open to your suggestions for tutorial videos or other resources to help me progress (I would like to resolve the issues with both UNV and STL formats). Thanks for your reply, Wilf |
|
June 28, 2024, 06:44 |
|
#11 |
New Member
Wilfried B.
Join Date: May 2024
Posts: 5
Rep Power: 2 |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Map of the OpenFOAM Forum - Understanding where to post your questions! | wyldckat | OpenFOAM | 10 | September 2, 2021 06:29 |
OpenFOAM v3.0.1 Training, London, Houston, Berlin, Jan-Mar 2016 | cfd.direct | OpenFOAM Announcements from Other Sources | 0 | January 5, 2016 04:18 |
OpenFOAM Training, London, Chicago, Munich, Sep-Oct 2015 | cfd.direct | OpenFOAM Announcements from Other Sources | 2 | August 31, 2015 14:36 |
2D - Von Karman - Salomé - OpenFoam | aaaallleex | OpenFOAM Running, Solving & CFD | 2 | April 14, 2015 17:16 |
New OpenFOAM Forum Structure | jola | OpenFOAM | 2 | October 19, 2011 07:55 |