CFD Online URL
[Sponsors]
Home > Forums > OpenFOAM Native Meshers: snappyHexMesh and Others

External mesh crawls into car model. Holes in STL model?

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree1Likes
  • 1 Post By lovecraft22

Reply
 
LinkBack Thread Tools Display Modes
Old   April 6, 2010, 10:33
Default External mesh crawls into car model. Holes in STL model?
  #1
Senior Member
 
MadsR's Avatar
 
Mads Reck
Join Date: Aug 2009
Location: Copenhagen, Denmark
Posts: 175
Rep Power: 8
MadsR is on a distinguished road
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".
__________________
Online free airfoil-mesher for OpenFOAM here
MadsR is offline   Reply With Quote

Old   April 6, 2010, 14:29
Default
  #2
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 7,514
Blog Entries: 33
Rep Power: 74
wyldckat is a jewel in the roughwyldckat is a jewel in the roughwyldckat is a jewel in the roughwyldckat is a jewel in the rough
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:
  • there should be a tolerance setting for point/line proximity in snappyHexMeshDict, which will aid sHM to assume if two or more points are actually the same. Sadly, I don't know what is the name of the variable
  • there might be a strict alignment between the base mesh and some edges in the solid. Try rotating the STL a few (3-5) degrees and/or changing the base mesh limits and number of divisions.
The latter is a guess based on the comment that the user manual has on how to define the point that indicated which part should be meshed, internal or external... which has to be strictly inside a cell of the mesh, even after various levels of refining! Uhm... this could also be it... the point you're using for defining the exterior falls on an edge of the mesh, but I think sHM would complain about that!

Best regards,
Bruno
wyldckat is offline   Reply With Quote

Old   April 7, 2010, 03:16
Default
  #3
Senior Member
 
Vincent RIVOLA
Join Date: Mar 2009
Location: France
Posts: 272
Rep Power: 8
vinz is on a distinguished road
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
vinz is offline   Reply With Quote

Old   April 7, 2010, 04:45
Default
  #4
Senior Member
 
MadsR's Avatar
 
Mads Reck
Join Date: Aug 2009
Location: Copenhagen, Denmark
Posts: 175
Rep Power: 8
MadsR is on a distinguished road
Hi Vincent.

Seems like a good tool, thanks for the info!

Regards
Mads
__________________
Online free airfoil-mesher for OpenFOAM here
MadsR is offline   Reply With Quote

Old   May 12, 2010, 14:30
Default
  #5
Senior Member
 
louisgag's Avatar
 
Louis Gagnon
Join Date: Mar 2009
Location: Québec, QC, Canada
Posts: 178
Rep Power: 7
louisgag is on a distinguished road
Send a message via ICQ to louisgag
Thanks Vincent,

Admesh solved that "hole" problem and provided me with the translate option which I had been looking for all weekend!


-Louis
louisgag is offline   Reply With Quote

Old   May 27, 2010, 11:04
Default
  #6
New Member
 
Peter Wiemeyer
Join Date: Sep 2009
Location: Germany, Munich
Posts: 22
Rep Power: 7
peterwy is on a distinguished road
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
peterwy is offline   Reply With Quote

Old   October 22, 2013, 06:34
Default
  #7
Senior Member
 
lore
Join Date: Mar 2010
Location: Italy
Posts: 454
Rep Power: 8
lovecraft22 is on a distinguished road
Send a message via Skype™ to lovecraft22
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!
lovecraft22 is offline   Reply With Quote

Old   October 26, 2013, 06:07
Default
  #8
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 7,514
Blog Entries: 33
Rep Power: 74
wyldckat is a jewel in the roughwyldckat is a jewel in the roughwyldckat is a jewel in the roughwyldckat is a jewel in the rough
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
wyldckat is offline   Reply With Quote

Old   October 26, 2013, 11:21
Default
  #9
Senior Member
 
lore
Join Date: Mar 2010
Location: Italy
Posts: 454
Rep Power: 8
lovecraft22 is on a distinguished road
Send a message via Skype™ to lovecraft22
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.
wyldckat likes this.
lovecraft22 is offline   Reply With Quote

Reply

Tags
car, external flow, snappyhexmesh

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Mesh and initial conditions for k-omega model Martin Main CFD Forum 3 March 29, 2012 20:58
IGES Solid Model for ICEM Tet Mesh Samer Main CFD Forum 1 September 17, 2008 13:33
2D mesh export of an original 3D model Yogendra Shastri Main CFD Forum 0 February 22, 2008 14:14
k-e model and mesh sensitivity raj calay Main CFD Forum 13 July 28, 1999 16:48
unstructured vs. structured grids Frank Muldoon Main CFD Forum 1 January 5, 1999 11:09


All times are GMT -4. The time now is 08:22.