|
[Sponsors] |
[Salome] SALOME mesh to OpenFoam: splitting pyramids |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
March 29, 2023, 06:48 |
SALOME mesh to OpenFoam: splitting pyramids
|
#1 |
Member
Giorgio
Join Date: Mar 2023
Posts: 55
Rep Power: 3 |
I am generating a mesh in SALOME (unv format) and exporting to OpenFoam using ideasUnvToFoam. I use the Netgen algorithm with viscous layers.
When I generate the mesh, some pyramids are created: those pyramids are not exported in unv, so I split them in tetrahedrons. However, when I convert the mesh using ideasUnvToFoam, some defaultFaces are created: Code:
--> FOAM Warning : From Foam::polyMesh::polyMesh(const Foam::IOobject&, Foam::pointField&&, const cellShapeList&, const faceListList&, const wordList&, const wordList&, const Foam::word&, const Foam::word&, const wordList&, bool) in file meshes/polyMesh/polyMeshFromShapeMesh.C at line 645 Found 4311 undefined faces in mesh; adding to default patch defaultFaces End I tried to put the flag "empty" to these faces in the boundary file, but the simulation with pisoFoam crashes after some iterations due to k and epsilon blowing up close to these faces. My questions are: 1- is there a way to avoid internal faces when splitting pyramids? 2- if NO, how should I deal with them? Thanks in advance, Giorgio |
|
March 30, 2023, 04:54 |
|
#2 |
Senior Member
Join Date: Dec 2021
Posts: 251
Rep Power: 5 |
Hey
Maybe you can try to delete and recreate the groups from your geometry after splitting the pyramids into tetrahedrons? The defaultFaces newly created are probably due to the new faces not belonging to any group. By the way, how do you split your pyramids in Salome? I have been struggling with this issue for some time. Let me know if you manage to solve this! |
|
March 30, 2023, 05:28 |
|
#3 |
Member
Giorgio
Join Date: Mar 2023
Posts: 55
Rep Power: 3 |
To split pyramids: select the mesh, Modification->Split Volumes, deselect Apply to all, Filter by Geometry Type: pyramids.
I am not sure about your procedure... they are internal faces, so why the groups of faces that I create should affect them? |
|
March 30, 2023, 07:31 |
|
#4 |
Senior Member
Join Date: Dec 2021
Posts: 251
Rep Power: 5 |
Ah my bad, I read your post a bit too fast. Maybe you can sew the internal faces together into one face only, I suspect Salome creates duplicate faces when it splits the pyramids. Another thing you could try: use some OpenFOAM utilites such as mergeOrSplitBaffles or stitchMesh maybe? Iam not sure but maybe that could work.
Thanks for the tip about splitting, and sorry for not helping more |
|
March 30, 2023, 07:52 |
|
#5 |
Member
Giorgio
Join Date: Mar 2023
Posts: 55
Rep Power: 3 |
Yes, I'll try that indeed. Anyway, I found out that you can use the python script salomeToOpenFOAM.py to export the mesh with also pyramids, and seems to work fine.
|
|
March 30, 2023, 08:29 |
|
#6 |
Senior Member
Gerhard Holzinger
Join Date: Feb 2012
Location: Austria
Posts: 342
Rep Power: 28 |
Have you tried a different approach to exporting the mesh? It is well known, that Salome's export to UNV has no love for pyramids, however, there are other means of exporting a mesh from Salome to OpenFOAM PS: Should have read the thread fully to the end, I realized just after posting that your last post is about the very thing I was suggesting. https://github.com/nicolasedh/salomeToOpenFOAM |
|
March 30, 2023, 10:47 |
|
#7 | |
Senior Member
Join Date: Dec 2021
Posts: 251
Rep Power: 5 |
Quote:
It worked for you right off the bat? I am using Salome 9.10 and it is not working, lot of errors other than the usual wrong syntax (like the print parenthesis missing etc). |
||
March 30, 2023, 10:53 |
|
#8 |
Member
Giorgio
Join Date: Mar 2023
Posts: 55
Rep Power: 3 |
Yes it worked. I am on Salome 9.9.0 and I am using salomeToOpenFOAM.py right from the Salome interface.
|
|
March 30, 2023, 11:09 |
|
#9 |
Senior Member
Gerhard Holzinger
Join Date: Feb 2012
Location: Austria
Posts: 342
Rep Power: 28 |
The original code from https://github.com/nicolasedh/salomeToOpenFOAM has not received updates for a while.
So, I would recommend to check out one of the many forks of the original code. Among others: https://github.com/meritzio/salomeToOpenFOAM https://github.com/EastEriq/salomeToOpenFOAM https://github.com/oseen/salomeToOpenFOAM I don't remember which of these is on my machine. |
|
March 30, 2023, 11:43 |
|
#10 | |
Senior Member
Join Date: Dec 2021
Posts: 251
Rep Power: 5 |
Quote:
The EastEriq fork works with Salome 9.10, thanks for the links |
||
Tags |
internal faces, pisofoam, pyramids splitting, salome |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Salome] mesh distortion in OpenFOAM of a model created in Salome | 4lrdyD | OpenFOAM Meshing & Mesh Conversion | 1 | February 7, 2022 18:40 |
Map of the OpenFOAM Forum - Understanding where to post your questions! | wyldckat | OpenFOAM | 10 | September 2, 2021 06:29 |
[Salome] import mesh from salome to openfoam | dome90 | OpenFOAM Meshing & Mesh Conversion | 2 | April 21, 2016 00:58 |
Suggestion for a new sub-forum at OpenFOAM's Forum | wyldckat | Site Help, Feedback & Discussions | 20 | October 28, 2014 10:04 |
Converting Salome hybrid mesh to OpenFOAM | Arnoldinho | OpenFOAM | 4 | March 28, 2012 11:24 |