|
[Sponsors] |
![]() |
![]() |
#1 | |
Member
Federico Zabaleta
Join Date: May 2016
Posts: 47
Rep Power: 10 ![]() |
Hello everyone,
I am writing to ask for some help with geometry preparation in order to use it in snappyHexMesh I've been following the recommendations made by Tobias Holzzman ((1),and (2)), but I am still having trouble ending with a closed STL. Small edges, sharp faces, and probably other things that I am not aware of are always giving me problems. For example, I've been trying to use the geometry of a submarine I got online (STEP file) and transform it into an STL. I put the STEP file in Salome, mesh it with the same size (following the procedure recommended in (2)), and then exported it to STL, but when I perform surfaceCheck I get the following message: Quote:
Any help will be really appreciated!!! Files: https://drive.google.com/open?id=0B4...3o0X3lMLVlucW8 (STL file is quite heavy) (1): https://www.youtube.com/watch?v=RFJN...L3CN4WA&t=237s (2): https://www.cfd-online.com/Forums/op...sh-salome.html |
||
![]() |
![]() |
![]() |
![]() |
#2 |
Senior Member
Paulo Vatavuk
Join Date: Mar 2009
Location: Campinas, Brasil
Posts: 200
Rep Power: 18 ![]() |
Hi Frederico,
You could try two programs: MeshMixer and MeshLab. Perhaps one of them can repair your surface. Best regards, Paulo |
|
![]() |
![]() |
![]() |
![]() |
#3 |
Senior Member
|
Hi,
I recently encountered this problem, and the problem I had, I think it's the same as yours. As you said you downloaded a file, you have to check that you have not any double edges defining your patches. To explain what I'm saying, load into salome the following dumpFile (copy and paste into a new file and save it with .py extension) Code:
import sys import salome salome.salome_init() theStudy = salome.myStudy import salome_notebook notebook = salome_notebook.NoteBook(theStudy) sys.path.insert( 0, r'/home/winuntu/Desktop') import GEOM from salome.geom import geomBuilder import math import SALOMEDS geompy = geomBuilder.New(theStudy) O = geompy.MakeVertex(0, 0, 0) OX = geompy.MakeVectorDXDYDZ(1, 0, 0) OY = geompy.MakeVectorDXDYDZ(0, 1, 0) OZ = geompy.MakeVectorDXDYDZ(0, 0, 1) Vertex_1 = geompy.MakeVertex(0, 0, 0) Vertex_2 = geompy.MakeVertex(0.77, 0, 0) Vertex_3 = geompy.MakeVertex(1, 0, 0) Vertex_4 = geompy.MakeVertex(1, 1, 0) Vertex_5 = geompy.MakeVertex(0, 1, 0) Vertex_6 = geompy.MakeVertex(0, -1, 0) Vertex_7 = geompy.MakeVertex(1, -1, 0) Line_1 = geompy.MakeLineTwoPnt(Vertex_6, Vertex_1) Line_2 = geompy.MakeLineTwoPnt(Vertex_1, Vertex_2) Line_3 = geompy.MakeLineTwoPnt(Vertex_2, Vertex_3) Line_4 = geompy.MakeLineTwoPnt(Vertex_3, Vertex_7) Line_1_vertex_2 = geompy.GetSubShape(Line_1, [2]) Line_5 = geompy.MakeLineTwoPnt(Vertex_7, Line_1_vertex_2) Face_1 = geompy.MakeFaceWires([Line_1, Line_2, Line_3, Line_4, Line_5], 1) Line_6 = geompy.MakeLineTwoPnt(Vertex_1, Vertex_5) Line_7 = geompy.MakeLineTwoPnt(Vertex_5, Vertex_4) Line_8 = geompy.MakeLineTwoPnt(Vertex_4, Vertex_3) Line_9 = geompy.MakeLineTwoPnt(Vertex_3, Vertex_1) Face_2 = geompy.MakeFaceWires([Line_6, Line_7, Line_8, Line_9], 1) geompy.addToStudy( O, 'O' ) geompy.addToStudy( OX, 'OX' ) geompy.addToStudy( OY, 'OY' ) geompy.addToStudy( OZ, 'OZ' ) geompy.addToStudy( Vertex_1, 'Vertex_1' ) geompy.addToStudy( Vertex_2, 'Vertex_2' ) geompy.addToStudy( Vertex_3, 'Vertex_3' ) geompy.addToStudy( Vertex_4, 'Vertex_4' ) geompy.addToStudy( Vertex_5, 'Vertex_5' ) geompy.addToStudy( Vertex_6, 'Vertex_6' ) geompy.addToStudy( Vertex_7, 'Vertex_7' ) geompy.addToStudy( Line_1, 'Line_1' ) geompy.addToStudy( Line_2, 'Line_2' ) geompy.addToStudy( Line_3, 'Line_3' ) geompy.addToStudy( Line_4, 'Line_4' ) geompy.addToStudyInFather( Line_1, Line_1_vertex_2, 'Line_1:vertex_2' ) geompy.addToStudy( Line_5, 'Line_5' ) geompy.addToStudy( Face_1, 'Face_1' ) geompy.addToStudy( Line_6, 'Line_6' ) geompy.addToStudy( Line_7, 'Line_7' ) geompy.addToStudy( Line_8, 'Line_8' ) geompy.addToStudy( Line_9, 'Line_9' ) geompy.addToStudy( Face_2, 'Face_2' ) import SMESH, SALOMEDS from salome.smesh import smeshBuilder smesh = smeshBuilder.New(theStudy) Face_1_1 = smesh.Mesh(Face_1) Regular_1D = Face_1_1.Segment() Local_Length_1 = Regular_1D.LocalLength(0.05,None,1e-07) NETGEN_2D_ONLY = Face_1_1.Triangle(algo=smeshBuilder.NETGEN_2D) Face_2_1 = smesh.Mesh(Face_2) status = Face_2_1.AddHypothesis(Local_Length_1) Regular_1D_1 = Face_2_1.Segment() NETGEN_2D_ONLY_1 = Face_2_1.Triangle(algo=smeshBuilder.NETGEN_2D) isDone = Face_1_1.Compute() isDone = Face_2_1.Compute() ## Set names of Mesh objects smesh.SetName(Regular_1D.GetAlgorithm(), 'Regular_1D') smesh.SetName(NETGEN_2D_ONLY.GetAlgorithm(), 'NETGEN_2D_ONLY') smesh.SetName(Local_Length_1, 'Local Length_1') smesh.SetName(Face_1_1.GetMesh(), 'Face_1') smesh.SetName(Face_2_1.GetMesh(), 'Face_2') if salome.sg.hasDesktop(): salome.sg.updateObjBrowser(1) Even If I set the same local lenght hypotesis, point of the triangles are not matching, where ONE edge of face2 is matching TWO edges of face1. If you want find out where these "not matching" triangles are, you can use surfaceSubsetDict. Cheers |
|
![]() |
![]() |
![]() |
![]() |
#4 |
Senior Member
|
There's also a poor-man way to look for faces that give you problem.
Open the problemFaces file. Top number is total number of faces, other numbers are numbered faces of the mesh. Now run paraview and import your stl file. Open on the side a spreadsheet view and select to look for cellData, scroll to your faces and use filter extract selections. This will produce an extraction of the problemFaces. I attach a picture. Cheers |
|
![]() |
![]() |
![]() |
![]() |
#5 |
Member
Federico Zabaleta
Join Date: May 2016
Posts: 47
Rep Power: 10 ![]() |
Thank you all for your suggestions.
I've followed your advice and I found that the problem are a few small faces that are giving me trouble. The problem I am having right now is that if I remove them, then my solid will not be closed, but if I try to mesh them, salome gives me an error. ![]() ![]() Then.. how can I do to deal with this? Thanks in advance!! |
|
![]() |
![]() |
![]() |
![]() |
#6 |
Senior Member
|
Hi,
I make you note that your problem can be threated as symmetric, so you should mesh half of the volume...you will considerably reduce your computational effort. Further more, I have not run surfaceCheck but you should reconsider your starting geometry, as you may remove your capital letters USBN 70 and there are many small fillets (slivering faces?) I think you can remove (see example in picture), these are quite hard to be captured by SHM. I haven't try to reproduce your errors in Salome, maybe try to post the faces you would to remove and let's see if for my above suggestions these are needed or not. Regards |
|
![]() |
![]() |
![]() |
![]() |
#7 | |
New Member
Pavlos Semelides
Join Date: Jul 2019
Posts: 5
Rep Power: 7 ![]() |
Quote:
I used this method and was able to identify the problem faces. I then went back to CAD and filleted the edges of the problem faces. Problem solved! |
||
![]() |
![]() |
![]() |
![]() |
#8 |
Senior Member
TWB
Join Date: Mar 2009
Posts: 403
Rep Power: 19 ![]() |
Hi, I think you can try 3D builder in the windows store. It's a 1 click repair which works for my case. Note that your output may be shifted after that, if it lies in the negative coordinates.
|
|
![]() |
![]() |
![]() |
Tags |
geometry, openfoam, salome, snappyhexmesh |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
[ICEM] Volume Meshing Problem; YOUR GEOMETRY HAS A HOLE | mariachi | ANSYS Meshing & Geometry | 5 | May 30, 2018 02:52 |
Question about Geometry vs. Meshes | EphemeralMemory | ANSYS Meshing & Geometry | 2 | December 8, 2016 13:02 |
How to scale and translate the grid of particle data and STL geometry | Saidul | Tecplot | 1 | January 11, 2015 21:15 |
Running CFD parallel. There is no geometry file! | CrashLaker | SU2 | 6 | April 10, 2014 03:08 |
[CAD formats] translating geometry from Abaqus to OpenFOAM | skuznet | OpenFOAM Meshing & Mesh Conversion | 3 | January 10, 2014 13:49 |