CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Surface Check and Repair Utilities - Need Explanation

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By Yann

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 28, 2021, 14:00
Default Surface Check and Repair Utilities - Need Explanation
  #1
Senior Member
 
Alan w
Join Date: Feb 2021
Posts: 276
Rep Power: 6
boffin5 is on a distinguished road
Finally I was able to get my multiRegion case to run, and my long ordeal is over. The problem was with the meshes in both the fluid and solid regions. I was able to fix the fluid region, and Yann was kind enough to repair the body in the solid region. Thanks, Yann!


In the case setup, I had to create a heat exchanger with named faces so that I could assign BCs to the inlet and outlet. I can see a couple of ways to do this, and have outlined them in the attached Powerpoint file. In Method1, individual faces are created in CAD, and imported for assembly into a body. In Method2, a body.stl is imported, and Paraview functions are used to extract and rename the faces.


I used Method1 in the multiRegion case, and the result required Yann's help to fix. Also, I have played with Method2, and apparently the results again need fixing.



But, when I tried to reproduce the functions that Yann used, I couldn't figure out how to use them. I am looking for help understanding these utilities and their use. They are, unless I have missed one:


surfaceCheck inputfile.stl - In the results of this, what are the indicators that further repairs to the volume are necessary?



surfacePointMerge inputfile.stl distance outputfile.stl - Assuming that surfaceCheck has made this function necessary, how do I know what distance to use?


surfaceHookUp distance - This one is especially confusing. The documentation does not show any argument associated with the command. How does it now which surface is to be acted on? And what is the distance to use? Does it need an additional Dict file?


With the community's help, if I can understand how to use these functions, I will be in fat city!
Attached Files
File Type: pptx volume-with-named-faces.pptx (76.8 KB, 16 views)
boffin5 is offline   Reply With Quote

Old   November 28, 2021, 14:12
Default
  #2
Senior Member
 
Alan w
Join Date: Feb 2021
Posts: 276
Rep Power: 6
boffin5 is on a distinguished road
I mean 'know'. Amazing, I review the post a dozen times, and stuff like this still gets through!
boffin5 is offline   Reply With Quote

Old   December 2, 2021, 12:52
Default
  #3
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,097
Rep Power: 26
Yann will become famous soon enough
Hi Alan,
  1. SurfaceCheck: checks your STL quality. In your specific case, what you are looking for is: is your volume closed or not? it it's not closed, you need to play with surfacePointMerge and surfaceHookUp to fix it.
  2. surfacePointMerge: used to merge points in your STL file. The merge distance depends on your geometry size and surface mesh. In your case, your issue is related to duplicated points at the same coordinates (more or less the tolerance / write precision of the file) so a small merge distance should do (e.g. 1e-4m)
  3. surfaceHookUp: hook up surface boundary edges. Requires a surfaceHookUpDict which is basically the list of the files to process.
Here is the surfaceCheck message showing your issue:

Code:
Checking for points less than 1e-6 of bounding box ((0.14321 0.3048 0.108345) metre) apart.
    close unconnected points 4 (2.2079 -0.05 0.0940112) and 8 (2.2079 -0.05 0.094011) distance:2.01166e-07
    close unconnected points 6 (2.2079 -0.3548 0.0940112) and 9 (2.2079 -0.3548 0.094011) distance:2.01166e-07
Found 2 nearby points.

Surface is not closed since not all edges connected to two faces:
    connected to one face : 6
    connected to >2 faces : 0
Conflicting face labels:6
Dumping conflicting face labels to "problemFaces"
Paste this into the input for surfaceSubset
And what you should get after fixing it:

Code:
Checking for points less than 1e-6 of bounding box ((0.14321 0.3048 0.108345) metre) apart.
Found 0 nearby points.

Surface is closed. All edges connected to two faces.
Alternative method (ParaView):


You can open your STL file in paraView, then use the "feature edges" filter and tick only the "Boundary Edges" option. If your STL file is not a closed volume, the filter will show which edges are not connected.


Cheers,
Yann
hogsonik likes this.
Yann is offline   Reply With Quote

Reply


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
Problem extracting volume in a turbocharger Jambond STAR-CCM+ 54 January 31, 2017 07:49
[ICEM] Fixing tetra Surface Orientations after prism generation siw ANSYS Meshing & Geometry 14 December 1, 2015 15:54


All times are GMT -4. The time now is 01:37.