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

[snappyHexMesh] External mesh crawls into car model. Holes in STL model?

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By lovecraft22

Reply
 
LinkBack Thread Tools Search this Thread 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: 177
Rep Power: 18
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
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
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: 283
Rep Power: 18
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: 177
Rep Power: 18
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: Stuttgart, Germany
Posts: 338
Rep Power: 18
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: 17
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: 460
Rep Power: 18
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
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
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: 460
Rep Power: 18
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


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
[Gmsh] Gmsh - External Flow Mesh Generation - Airfoil STL file Eefoe OpenFOAM Meshing & Mesh Conversion 2 August 22, 2017 10:27
[ANSYS Meshing] problem volume mesh with STL hadrien51 ANSYS Meshing & Geometry 0 June 5, 2013 11:34
What model of turbulence choose to study an external aerodynamics case raffale OpenFOAM 0 August 23, 2012 06:45
[Gmsh] 2D Mesh Generation Tutorial for GMSH aeroslacker OpenFOAM Meshing & Mesh Conversion 12 January 19, 2012 04:52
How to create a 3Ds Car Model importing to FLUENT? spysunny Main CFD Forum 1 January 11, 2012 00:40


All times are GMT -4. The time now is 20:13.