External mesh crawls into car model. Holes in STL model?
Hi.
I have a geometry of a car in STL and I have generated a blockMesh around it with cell-aspect ratio of unity. I can generate a snappyHexMesh without problems, except for the following: I can only surface-refine up to around level (2 2). If I go to higher refinement ratios (say level (5 5)), the mesh crawls into my geometry and fills the inside of the car as well as the outside. I am not entirely sure that my STL file is completely watertight but I can't SEE any holes so if they are there, they must be VERY small. The STL is quite coarse though. I am going to make a small program which checks my STL for holes but before that I was wondering if you guys had any hints on this. Thanks in advance, it would be a GREAT help. /Mads ps. I already read the STL into meshLab and "closed holes" without any more luck pps. I've made a test-cube out of 12 simple STL surfaces and that one I can surface-refine to "infinity". |
Hi Mads,
My experience with snappyHexMesh is still a bit limited, but there are two other reasons that come to mind that could influence the mesh leaking inside:
Best regards, Bruno |
Hi mads,
I would say that there must be a hole somewhere. It is sometime difficult to find, but there must be one. The last time I had a similar problem I used the program AdMesh which is free. With the option --fill-holes, it worked for me and gave me a watertight surface. You can give it a try. Regards, Vincent |
Hi Vincent.
Seems like a good tool, thanks for the info! Regards Mads |
Thanks Vincent,
Admesh solved that "hole" problem and provided me with the translate option which I had been looking for all weekend! -Louis |
Hi,
only two small points that I want to add: 1.) with transformPoints you've a lot of functions in OF directly as well 2.) find a hole is quite easy as you define two points (one inside the domain that should be meshed, and one outside) and just write a small program that finds a way to connect those two points. (For very nice programming with only medium skills in c++ you should plan 1-2 days for it) Perhaps I will put my program online some day but at the moment I can't because of company restrictions. Best Regards, Peter |
Hi Peter,
Would you mind sharing some details on what your script does roughly? What's the concept at the bottom of it to try and connect the two points? Thanks! |
Greetings to all!
@lovecraft22: If I'm not mistaken, as of OpenFOAM 2.0.0, there is a utility in OpenFOAM named surfaceClean which can help close holes, as well as fixing some other issues in STL files. Best regards, Bruno |
Thanks Bruno. I'm not using OpenFoam at the moment. I found such a function in ANSA 14.x but I was interested in making such a script by myself anyway.
|
All times are GMT -4. The time now is 13:05. |