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

[Salome] SALOME mesh to OpenFoam: splitting pyramids

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 29, 2023, 05:48
Default SALOME mesh to OpenFoam: splitting pyramids
  #1
Member
 
Giorgio
Join Date: Mar 2023
Posts: 46
Rep Power: 3
giorgianig is on a distinguished road
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 visualized these faces in Paraview, they are internal and close to my walls. I think they are generated due to the splitting of the pyramids.

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
giorgianig is offline   Reply With Quote

Old   March 30, 2023, 03:54
Default
  #2
Senior Member
 
Join Date: Dec 2021
Posts: 221
Rep Power: 5
Alczem is on a distinguished road
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!
Alczem is offline   Reply With Quote

Old   March 30, 2023, 04:28
Default
  #3
Member
 
Giorgio
Join Date: Mar 2023
Posts: 46
Rep Power: 3
giorgianig is on a distinguished road
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?
giorgianig is offline   Reply With Quote

Old   March 30, 2023, 06:31
Default
  #4
Senior Member
 
Join Date: Dec 2021
Posts: 221
Rep Power: 5
Alczem is on a distinguished road
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
Alczem is offline   Reply With Quote

Old   March 30, 2023, 06:52
Default
  #5
Member
 
Giorgio
Join Date: Mar 2023
Posts: 46
Rep Power: 3
giorgianig is on a distinguished road
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.
giorgianig is offline   Reply With Quote

Old   March 30, 2023, 07:29
Default
  #6
Senior Member
 
Gerhard Holzinger
Join Date: Feb 2012
Location: Austria
Posts: 340
Rep Power: 28
GerhardHolzinger will become famous soon enoughGerhardHolzinger will become famous soon enough
Quote:
Originally Posted by giorgianig View Post
... those pyramids are not exported in unv ...

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
GerhardHolzinger is offline   Reply With Quote

Old   March 30, 2023, 09:47
Default
  #7
Senior Member
 
Join Date: Dec 2021
Posts: 221
Rep Power: 5
Alczem is on a distinguished road
Quote:
Originally Posted by giorgianig View Post
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.



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).
Alczem is offline   Reply With Quote

Old   March 30, 2023, 09:53
Default
  #8
Member
 
Giorgio
Join Date: Mar 2023
Posts: 46
Rep Power: 3
giorgianig is on a distinguished road
Yes it worked. I am on Salome 9.9.0 and I am using salomeToOpenFOAM.py right from the Salome interface.
giorgianig is offline   Reply With Quote

Old   March 30, 2023, 10:09
Default
  #9
Senior Member
 
Gerhard Holzinger
Join Date: Feb 2012
Location: Austria
Posts: 340
Rep Power: 28
GerhardHolzinger will become famous soon enoughGerhardHolzinger will become famous soon enough
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.
GerhardHolzinger is offline   Reply With Quote

Old   March 30, 2023, 10:43
Default
  #10
Senior Member
 
Join Date: Dec 2021
Posts: 221
Rep Power: 5
Alczem is on a distinguished road
Quote:
Originally Posted by GerhardHolzinger View Post
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.



The EastEriq fork works with Salome 9.10, thanks for the links
Alczem is offline   Reply With Quote

Reply

Tags
internal faces, pisofoam, pyramids splitting, salome


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] mesh distortion in OpenFOAM of a model created in Salome 4lrdyD OpenFOAM Meshing & Mesh Conversion 1 February 7, 2022 17:40
Map of the OpenFOAM Forum - Understanding where to post your questions! wyldckat OpenFOAM 10 September 2, 2021 05:29
[Salome] import mesh from salome to openfoam dome90 OpenFOAM Meshing & Mesh Conversion 2 April 20, 2016 23:58
Suggestion for a new sub-forum at OpenFOAM's Forum wyldckat Site Help, Feedback & Discussions 20 October 28, 2014 09:04
Converting Salome hybrid mesh to OpenFOAM Arnoldinho OpenFOAM 4 March 28, 2012 10:24


All times are GMT -4. The time now is 21:42.