CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Bugs

SnappyHexMesh plane surface bounding box

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 8, 2008, 10:06
Default Good morning, using snappyH
  #1
Senior Member
 
Pierre-Olivier Dallaire
Join Date: Mar 2009
Location: Montreal, Quebec, Canada
Posts: 192
Rep Power: 17
podallaire is on a distinguished road
Good morning,

using snappyHexMesh, I was able to mesh compilcated surfaces - great tool !

I just found out that if one of the stl files is a perfect plane surface that sits on one of the 3 orthogonal planes (X-Y, Y-Z, or X-Z), the bounding box detector creates an error. Here is an example :

...
Determining initial surface intersections
-----------------------------------------

Edge intersection testing:
Number of edges : 725100
Number of edges to retest : 725100
sh: gaddr2line: command not found
sh: gaddr2line: command not found
sh: gaddr2line: command not found
sh: gaddr2line: command not found
sh: gaddr2line: command not found
sh: gaddr2line: command not found
sh: gaddr2line: command not found
sh: gaddr2line: command not found
sh: gaddr2line: command not found
sh: gaddr2line: command not found
sh: gaddr2line: command not found


Badly formed bounding box-0.500637 -11.25 1.99967) (0.500362 -11.25 3.00077)#0 Foam::error::printStack(Foam:stream&) addr2line failed
#1 Foam::error::abort() addr2line failed
#2 Foam::indexedOctree<foam::treedatatrisurface>::div ide(Foam::treeBoundBox const&, Foam::DynamicList<foam::list<int>, 0u, 2u, 1u>&, int) const addr2line failed
#3 Foam::indexedOctree<foam::treedatatrisurface>::ind exedOctree(Foam::treeDataTriSu rface const&, Foam::treeBoundBox const&, int, double, double) addr2line failed
...

Regards,

Pierre-Olivier
podallaire is offline   Reply With Quote

Old   August 11, 2008, 05:22
Default Hi Pierre-Olivier, the (axi
  #2
Senior Member
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26
mattijs is on a distinguished road
Hi Pierre-Olivier,

the (axis-aligned) octree used for doing geometric tests on surfaces does not like 2D axis-aligned geometries (planes, lines, points). You could try perturbing your surface or rotate the whole lot. Anything that causes the bounding box to be non 2d-axis-aligned should work.
mattijs is offline   Reply With Quote

Old   August 11, 2008, 22:43
Default Yes, it worked - thanks !
  #3
Senior Member
 
Pierre-Olivier Dallaire
Join Date: Mar 2009
Location: Montreal, Quebec, Canada
Posts: 192
Rep Power: 17
podallaire is on a distinguished road
Yes, it worked - thanks !
podallaire is offline   Reply With Quote

Old   November 12, 2008, 06:38
Default Hi, I was able to use snappyH
  #4
New Member
 
Pal Schmitt
Join Date: Mar 2009
Posts: 28
Rep Power: 17
waterboy is on a distinguished road
Hi,
I was able to use snappyHexmesh on geometries I created myself with SALOME. When trying another STL file, created with some unknown program it fails with a segmentation fault. Blender refuses to open it,but Paraview can read it alright. Are there any known STL format issues? Recommendations how to check/repair such a STL file?
Thanks for any advice,
Regards,
Pal
waterboy is offline   Reply With Quote

Old   November 12, 2008, 07:29
Default Hi, you can have a look at
  #5
Member
 
norman1981's Avatar
 
Norman Del Puppo
Join Date: Mar 2009
Location: Hinwil, CH
Posts: 57
Rep Power: 17
norman1981 is on a distinguished road
Hi,

you can have a look at this very useful tutorial:

http://www.cfditalia.org/software/preprocessing/preparazione_del_modello_snappyh exmesh

I know that it is written in Italian but you can figure out how to use these things reading the reported "command box"!

In any case Blender should open your file so I think that something wrong is present there...

Have a nice day!

Norman
norman1981 is offline   Reply With Quote

Old   November 12, 2008, 09:38
Default Is the STL binary? Binary STL
  #6
Senior Member
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26
mattijs is on a distinguished road
Is the STL binary? Binary STL is not very well defined. If it is Ascii snappedHexMesh should not fail. What kind of error do you get? Can you run e.g. surfaceCheck on the surface?
mattijs is offline   Reply With Quote

Old   November 17, 2008, 17:30
Default Great Thanks Norman and Mattij
  #7
New Member
 
Pal Schmitt
Join Date: Mar 2009
Posts: 28
Rep Power: 17
waterboy is on a distinguished road
Great Thanks Norman and Mattijs,
In prefer spanish but will see how far I get with italian:-) The STL is ASCII... Will see for any error message tomorow and check that surfaceCheck. Sorry for being so slow but as a student I only work part time on FOAM...
Have a nice day/night:-)
Pal
waterboy is offline   Reply With Quote

Old   November 18, 2008, 07:35
Default Hi, Back to work I tried agai
  #8
New Member
 
Pal Schmitt
Join Date: Mar 2009
Posts: 28
Rep Power: 17
waterboy is on a distinguished road
Hi,
Back to work I tried again and yes, the STL was bad. After processing it with admesh surfaceCheck tells me

Dumping bad quality faces to "badFaces"
Paste this into the input for surfaceSubset

...
Edges:
min 0.000141144 for edge 113249 points (53.4499 9.918 2.5517e-06)(53.4499 9.91786 2.40737e-06)
max 160.585 for edge 124347 points (149.285 0 16.5)(-11.2999 0.0101797 16.5)

Checking for points less than 1E-6 of bounding box ((162.57 27.5 16.5) meter) apart.
Found 0 nearby points.

Surface is closed. All edges connected to two faces.

Number of unconnected parts : 1

Number of zones (connected area with consistent normal) : 333194
More than one normal orientation.

Checking self-intersection.
Surface is not self-intersecting

End

Seems OK to me. With blockMesh I tried to put a box around and the locationinMesh point inside, quite similar to the racing car example. snappyHexmesh now segfaults:-(

Create time

Create mesh for time = 0

Read mesh in = 1.58 s
Reading refinement surfaces.
Read refinement surfaces in = 3.24 s

Reading refinement shells.
#0 Foam::error::printStack(Foam:stream&) in "/home/pasch/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libOpenFOAM.so"
#1 Foam::sigSegv::sigSegvHandler(int) in "/home/pasch/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libOpenFOAM.so"
#2 Uninterpreted: [0xffffe420]
#3 Foam::triSurfaceMesh::isSurfaceClosed() const in "/home/pasch/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libmeshTools.so"
#4 Foam::triSurfaceMesh::hasVolumeType() const in "/home/pasch/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libmeshTools.so"
#5 Foam::shellSurfaces::setAndCheckLevels(double, Foam::List<foam::tuple2<double,> > const&) in "/home/pasch/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libautoMesh.so"
#6 Foam::shellSurfaces::shellSurfaces(Foam::searchabl eSurfaces const&, Foam::dictionary const&) in "/home/pasch/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libautoMesh.so"
#7 main in "/home/pasch/OpenFOAM/OpenFOAM-1.5/applications/bin/linuxGccDPOpt/snappyHexMesh"
#8 __libc_start_main in "/lib/tls/libc.so.6"
#9 Foam::regIOobject::writeObject(Foam::IOstream::str eamFormat, Foam::IOstream::versionNumber, Foam::IOstream::compressionType) const in "/home/pasch/OpenFOAM/OpenFOAM-1.5/applications/bin/linuxGccDPOpt/snappyHexMesh"
Segmentation fault


Any clue?
Thanks in advance,
Pal
waterboy is offline   Reply With Quote

Old   November 18, 2008, 09:40
Default Thanks a lot, its running....
  #9
New Member
 
Pal Schmitt
Join Date: Mar 2009
Posts: 28
Rep Power: 17
waterboy is on a distinguished road
Thanks a lot, its running....
waterboy is offline   Reply With Quote

Old   November 19, 2008, 03:11
Default Dear SnappyHex Users, i have
  #10
erik023
Guest
 
Posts: n/a
Dear SnappyHex Users,
i have a bit of trouble getting nice results when using interfoam in combination with snappy. I try to simulate a sphere with water flowing around it. what i see is that, when looking at the gamma 0.5 isosurface i have an area that looks very bumpy, like the region was made up from triangles (some polygons in 3d i guess) and that the isosurface is following them. i have been given the indication that this might just be a fault in paraview (and ensight) but could there also be another explination. i cant find anywhere how to turn of the spliting of hexcells by drawing a diagonal through them as is done in snappy. is there a way around this, or do i simply need to make a finer mesh? finer background mesh?

thanks
Erik
  Reply With Quote

Old   November 19, 2008, 05:07
Default foamToVTK/paraFoam/foamToEnsig
  #11
Senior Member
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26
mattijs is on a distinguished road
foamToVTK/paraFoam/foamToEnsight all will decompose any cell which is not a pure hex into pyramids and tetrahedra and this can lead to low quality isosurfaces.

(a pure hex is a cell with 6 quad faces. Even a single edge being split will cause the cell to become a polyhedron and be decomposed)

Solutions:
- make sure your iso surface does not go through any refinement region.
- map the solution onto a pure hex mesh.
- write a small utility to do double averaging - cell to point and then point to cell. This will produce very smooth isosurfaces but will lose precision so is a cheat.
mattijs is offline   Reply With Quote

Old   November 19, 2008, 07:28
Default Ah, many thanks to Niklas Wiks
  #12
erik023
Guest
 
Posts: n/a
Ah, many thanks to Niklas Wikström who gave me pretty much the same explication.

Mattijs - I like the idea of mapping the solution, it there a utility to do this or would I write it myself?
I need not to Worry then about the quality of the solution if I understand it right, just the graphical output!?

thank you both!
  Reply With Quote

Old   November 25, 2008, 03:53
Default Hi, I noticed that snappyHexm
  #13
New Member
 
Pal Schmitt
Join Date: Mar 2009
Posts: 28
Rep Power: 17
waterboy is on a distinguished road
Hi,
I noticed that snappyHexmesh fails with a segmentation fault if the refinement level of a region is higher than the one specified at the surface. Although I can't imagine why anyone might want to do this , a clear message may be helpful to users and should be very easy to implement. Or is this supposed to work?
waterboy is offline   Reply With Quote

Old   November 25, 2008, 04:13
Default Sorry, I posted false informat
  #14
New Member
 
Pal Schmitt
Join Date: Mar 2009
Posts: 28
Rep Power: 17
waterboy is on a distinguished road
Sorry, I posted false information above.
My case fails with a floating point exception if the refinement level is higher than 5 in either the region or the surface... I don't really need such a high resolution but it shouldn't fail just like that, I believe.
Pal
waterboy is offline   Reply With Quote

Old   November 25, 2008, 07:01
Default No it shouldn't fail with norm
  #15
Senior Member
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26
mattijs is on a distinguished road
No it shouldn't fail with normal input. Do you have a testcase? You can send it to me directly (domain opencfd.co.uk, user m.janssens)
mattijs is offline   Reply With Quote

Old   November 25, 2008, 07:07
Default I assume you are using 1.5.x ?
  #16
Senior Member
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26
mattijs is on a distinguished road
I assume you are using 1.5.x ? It has got various fixes in snappyHexMesh.
mattijs is offline   Reply With Quote

Old   November 25, 2008, 09:33
Default Hi Mattijs, Yes, I am using v
  #17
New Member
 
Pal Schmitt
Join Date: Mar 2009
Posts: 28
Rep Power: 17
waterboy is on a distinguished road
Hi Mattijs,
Yes, I am using version 1.5.
I need to ask wether I am allowed to share the geometry.
If not I will try to reproduce the error with another case and send You the setup. Right now it is running with a refinement level of 5 in the refinement region and seems fine.
Confused...
Thanks a lot,
Pal
waterboy is offline   Reply With Quote

Old   November 25, 2008, 11:53
Default Hi again, Someone smart told
  #18
New Member
 
Pal Schmitt
Join Date: Mar 2009
Posts: 28
Rep Power: 17
waterboy is on a distinguished road
Hi again,
Someone smart told me snappyHexmesh might fail due to old data from previous runs. Is that true? I have been cleaning my case before every new calculation since then and my problems seem to be gone.. Can anyone verify? Is it the existing timesteps?...
Cheers,
Pal
waterboy is offline   Reply With Quote

Old   November 25, 2008, 13:57
Default Yes that can be the case. It r
  #19
Senior Member
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26
mattijs is on a distinguished road
Yes that can be the case. It reads a starting mesh to start refining from. Usually this comes from constant/polyMesh but it can also come from a time directory. The starting mesh consists of the usual faces,points,etc. files but also two special files, pointLevel and cellLevel and these have to be consistent with the mesh.
mattijs is offline   Reply With Quote

Old   August 21, 2009, 04:08
Default
  #20
New Member
 
andres
Join Date: Aug 2009
Posts: 15
Rep Power: 16
andresbh is on a distinguished road
Hi all,

I have a question regarding the snappyhexmesh. My domain is as large as 1mm^3 with a couple of bodies inside. snappyhexmesh refines the surface intersection to the domain created with blockmesh but it does not remove the volume of the body. I have tried reducing the property

minVol

to a very small value. But the results are the same.

do you have any advice for this case?

many thanks

Andres
andresbh 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
[snappyHexMesh] Surface boundary mesh in snappyHexMesh bastil OpenFOAM Meshing & Mesh Conversion 7 February 3, 2012 07:37
[CAD formats] Tool for Surface Preparation for SnappyHexMesh bastil OpenFOAM Meshing & Mesh Conversion 18 November 17, 2008 16:49
[Commercial meshers] Import Surface from HyperMesh to snappyHexMesh bastil OpenFOAM Meshing & Mesh Conversion 7 October 7, 2008 07:32
postprocessing - surface - plane Brujo FLUENT 2 March 1, 2008 10:36
Making boundary profile on a surface in xz- plane varghese FLUENT 6 May 3, 2002 08:38


All times are GMT -4. The time now is 19:18.