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

[Technical] How to hex mesh geometry in STL format?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 12, 2009, 07:10
Default How to hex mesh geometry in STL format?
  #1
Super Moderator
 
bigphil's Avatar
 
Philip Cardiff
Join Date: Mar 2009
Location: Dublin, Ireland
Posts: 1,089
Rep Power: 34
bigphil will become famous soon enoughbigphil will become famous soon enough
Hi,


I have geometry in the STL format, and I would like to hex mesh it.


Has any done this before, starting from a STL and finishing with a hex mesh?


Any advice would be much appreciated,
Philip
bigphil is offline   Reply With Quote

Old   May 12, 2009, 07:34
Default
  #2
Senior Member
 
santos's Avatar
 
Jose Luis Santos
Join Date: Mar 2009
Location: Portugal
Posts: 215
Rep Power: 18
santos is on a distinguished road
Send a message via Skype™ to santos
Hi Philip,

Have you tried snappyHexMesh? It does exactly what you need. Have a look in the User Guide to see how it can be used.

Regards,
Jose Santos
santos is offline   Reply With Quote

Old   May 12, 2009, 08:26
Default
  #3
Super Moderator
 
bigphil's Avatar
 
Philip Cardiff
Join Date: Mar 2009
Location: Dublin, Ireland
Posts: 1,089
Rep Power: 34
bigphil will become famous soon enoughbigphil will become famous soon enough
Hi Jose,

I read through snappyHexMesh in the manual.

Is it possible to use snappyHexMesh for meshing the geometry itself, as apposed to around the geometry like in the snappyHesMesh example?

I have a femur (thigh bone) which I would like to mesh.


Thanks for you reply,
If snappyHexMesh suits, that would be great!

Philip
bigphil is offline   Reply With Quote

Old   May 12, 2009, 09:15
Default
  #4
Senior Member
 
santos's Avatar
 
Jose Luis Santos
Join Date: Mar 2009
Location: Portugal
Posts: 215
Rep Power: 18
santos is on a distinguished road
Send a message via Skype™ to santos
Yes, its possible. You need to define the locationInMesh point in the region you are interested in, ie, inside the femur in you case.

Regards,
Jose Santos
santos is offline   Reply With Quote

Old   May 12, 2009, 09:21
Thumbs up
  #5
Super Moderator
 
bigphil's Avatar
 
Philip Cardiff
Join Date: Mar 2009
Location: Dublin, Ireland
Posts: 1,089
Rep Power: 34
bigphil will become famous soon enoughbigphil will become famous soon enough
Jose,


That's great. I didn't realise I could use snappyHexMesh to hex mesh objects.

I shall head off now, and try to learn snappyHexMesh.


Thanks very much for the advice,
it is much appreciated.

Best Regards,
Philip

bigphil is offline   Reply With Quote

Old   June 30, 2009, 22:55
Default
  #6
Member
 
xianghong wu
Join Date: Mar 2009
Posts: 57
Rep Power: 17
wendywu is on a distinguished road
Hi, Jose,
Now I am facing a weird problem.
I am going to hex mesh the flow field in a screw extruder.
I blockMeshed the barrel back ground . it worked.
I then tried to snappyHexMesh the field between the screw and the barrel.
I defined the location in mesh , but when I run sHM, it always exited with saying:
Point (x x x) is not inside the mesh or on a face or edge.
Bounding box of the mesh-13.1 -13.1 0) (13.1 13.1 197)
I tried several point , even though I pretend to mesh the area inside the screw.
it does so also. I have tried to avoid the point on the face or edge.
I can not solve the problem. Would you give me some hint?
Thank you.

Wendy
wendywu is offline   Reply With Quote

Old   July 1, 2009, 04:37
Default
  #7
Senior Member
 
santos's Avatar
 
Jose Luis Santos
Join Date: Mar 2009
Location: Portugal
Posts: 215
Rep Power: 18
santos is on a distinguished road
Send a message via Skype™ to santos
Make sure the dimensions of blockMesh and STL meshes are consistent (eg. m or mm). Its hard to help without extra info on your mesh!

Regards,
Jose Santos
santos is offline   Reply With Quote

Old   July 2, 2009, 11:40
Default
  #8
Member
 
xianghong wu
Join Date: Mar 2009
Posts: 57
Rep Power: 17
wendywu is on a distinguished road
Now the problem is, when I run sHM, it stops with the error information:
#0 Foam::error:rintStack(Foam::Ostream&) in "/home/xhw/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libOpenFOAM.so"
#1 Foam::sigFpe::sigFpeHandler(int) in "/home/xhw/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libOpenFOAM.so"
#2 Uninterpreted: [0xb8076400]
#3 Foam::meshRefinement::markSurfaceCurvatureRefineme nt(double, int, Foam::List<int> const&, Foam::Field<Foam::Vector<double> > const&, Foam::List<int>&, int&) const in "/home/xhw/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libautoMesh.so"
#4 Foam::meshRefinement::refineCandidates(Foam::Vecto r<double> const&, double, Foam::PtrList<Foam::featureEdgeMesh> const&, Foam::List<int> const&, bool, bool, bool, bool, int, int) const in "/home/xhw/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libautoMesh.so"
#5 Foam::autoRefineDriver::surfaceOnlyRefine(Foam::re finementParameters const&, int) in "/home/xhw/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libautoMesh.so"
#6 Foam::autoRefineDriver::doRefine(Foam::dictionary const&, Foam::refinementParameters const&, bool) in "/home/xhw/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libautoMesh.so"
#7 main in "/home/xhw/OpenFOAM/OpenFOAM-1.5/applications/bin/linuxGccDPOpt/snappyHexMesh"
#8 __libc_start_main in "/lib/tls/i686/cmov/libc.so.6"
#9 Foam::regIOobject::writeObject(Foam::IOstream::str eamFormat, Foam::IOstream::versionNumber, Foam::IOstream::compressionType) const in "/home/xhw/OpenFOAM/OpenFOAM-1.5/applications/bin/linuxGccDPOpt/snappyHexMesh"
Floating point exception

I am considering if it is caused by shortage of memory space?
Thank you.

Wendy
wendywu is offline   Reply With Quote

Old   July 2, 2009, 23:36
Default
  #9
Member
 
xianghong wu
Join Date: Mar 2009
Posts: 57
Rep Power: 17
wendywu is on a distinguished road
I just tried another simpler case. it is just a cylinder inside a bigger rectangular container.

when sHM for several iterations, it stoped with information: killed.
no sHM results created.
Anybody has such experience?
Thank you.

Wendy
wendywu is offline   Reply With Quote

Old   July 6, 2009, 12:29
Default sHM , refinement level
  #10
Member
 
xianghong wu
Join Date: Mar 2009
Posts: 57
Rep Power: 17
wendywu is on a distinguished road
I modified refinement level , it worked finally.
but what is the problem that it works well with lower level and doesn't work with higher level? I still want to get better mesh so I would prefer higher refinement level.
Many thanks to any advice.

Wendy
wendywu 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
decomposePar problem: Cell 0contains face labels out of range vaina74 OpenFOAM Pre-Processing 37 July 20, 2020 05:38
[mesh manipulation] Importing Multiple Meshes thomasnwalshiii OpenFOAM Meshing & Mesh Conversion 18 December 19, 2015 18:57
Moving mesh Niklas Wikstrom (Wikstrom) OpenFOAM Running, Solving & CFD 122 June 15, 2014 06:20
[ICEM] Automatic geometry preparation for hex mesh and circle curve splitting waiter120 ANSYS Meshing & Geometry 2 May 5, 2013 11:00
[Workbench] Meshing and export mesh from STL geometry alerfreire ANSYS Meshing & Geometry 0 March 26, 2013 09:25


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