CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Mesh Utilities

Mesh stl

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

Reply
 
LinkBack Thread Tools Display Modes
Old   December 8, 2008, 05:02
Default Hi dear fomers I have a questi
  #1
Member
 
fabrizio
Join Date: Mar 2009
Posts: 33
Rep Power: 7
fabrizio is on a distinguished road
Hi dear fomers I have a question for you; I use SnappyHexMesh utility to simulate a wind tunnel application, starting from a stl geometry to create the cavity inside a mesh created with blockmesh. My question is the following: can I mesh the stl geometry with Snappy? Or can I extract the mesh only on stl surface?

Thank you very much for help

Fabrizio
fabrizio is offline   Reply With Quote

Old   December 9, 2008, 02:30
Default Hey Fab Yes thats the whole
  #2
Senior Member
 
linnemann's Avatar
 
Niels Nielsen
Join Date: Mar 2009
Location: NJ - Denmark
Posts: 438
Rep Power: 13
linnemann will become famous soon enough
Hey Fab

Yes thats the whole idea with snappyhexmesh.

It's actually not intended as a 2d mesh tool as far as I know. The userguide example is only in 2d for easier understanding. If you look at the two tutorials in the snappyhexmesh folder where yout tutorial files are located you will get a better idea of the approach.

For clarification the .stl file is actually a mesh or an interpretation of the surface using triangles so you have a surface mesh from which you build your internal/external mesh.

Regards Niels
__________________
Linnemann

PS. I do not do personal support, so please post in the forums.
linnemann is offline   Reply With Quote

Old   December 9, 2008, 11:41
Default Hi Niels thanks to your sugges
  #3
Member
 
fabrizio
Join Date: Mar 2009
Posts: 33
Rep Power: 7
fabrizio is on a distinguished road
Hi Niels thanks to your suggestion I can now obtain internal and external mesh, thank you! I only can't understand how to extract the pressure insisting on the surface of the stl geometry. Another question: I have to rebuild the mesh of the stl (so the internal mesh) in term of point and cells, but the 'cells' files I have in the OF directory is only a list of faces; I expected to find something like that:

hex(0 1 2 3 4 5 6 7), so a list of nodes

but I have this

hex(0 1 2 3 4 5) that is a list of faces.

Can you help me?

Thank you again

Fabrizio
fabrizio is offline   Reply With Quote

Old   December 10, 2008, 02:30
Default Hey Fab I can try. :-) I
  #4
Senior Member
 
linnemann's Avatar
 
Niels Nielsen
Join Date: Mar 2009
Location: NJ - Denmark
Posts: 438
Rep Power: 13
linnemann will become famous soon enough
Hey Fab

I can try. :-)

In order to have the pressure on a face you need to have that face as a separate patch on which you can do the pressure calculations.

To have a separate patch for that you need to split your .stl file into more "solids". Opening the .stl file with a text editor (only if its ASCII .stl) you will have the first line like so

solid somename_of_the_face

If you have exported the .stl as one geometry you will most likely only have one of these lines containing the solid line. You need to split your .stl into more solids and these solids can also be faces but not all cad programs support this.

When you have done this creating your mesh will create patches based on the names you have given each solid. Now you should be able to calculate the pressure on the wanted patch/face.

have a look at this description maybe it will help you further.

http://www.cfd-online.com/OpenFOAM_D...tml?1228743815

Regards Niels
__________________
Linnemann

PS. I do not do personal support, so please post in the forums.
linnemann is offline   Reply With Quote

Old   December 10, 2008, 04:06
Default Hi Niels I've tried with a sim
  #5
Member
 
fabrizio
Join Date: Mar 2009
Posts: 33
Rep Power: 7
fabrizio is on a distinguished road
Hi Niels I've tried with a simple geometry and all went fine!
My problem is now that I can't mesh the stl of a complex geometry; I can obtain the cavity, but not the internal mesh of the geometry.
If you want I can send you my SnappyHexMeshDict and the stl file, so you can give a look.
Tell if you have time to spend for a quite new foam user...
Thank you again

Fabrizio
fabrizio is offline   Reply With Quote

Old   December 10, 2008, 05:55
Default Hey Fab Unfortunately I don
  #6
Senior Member
 
linnemann's Avatar
 
Niels Nielsen
Join Date: Mar 2009
Location: NJ - Denmark
Posts: 438
Rep Power: 13
linnemann will become famous soon enough
Hey Fab

Unfortunately I don't have time right now to look into your case.

I haven't used snappyhexmesh with both internal and external mesh at the same time only one of them, so I don't know how it behaves in such cases.

But you possibly have to search the forum about internal faces/patches I remember seeing something about that, but I don't have the link.

Regards Niels
__________________
Linnemann

PS. I do not do personal support, so please post in the forums.
linnemann is offline   Reply With Quote

Old   December 10, 2008, 05:59
Default Just reread the post you made
  #7
Senior Member
 
linnemann's Avatar
 
Niels Nielsen
Join Date: Mar 2009
Location: NJ - Denmark
Posts: 438
Rep Power: 13
linnemann will become famous soon enough
Just reread the post you made and in order to get the internal mesh you have to place the point inside your geometry. If you place i outside snappyhexmesh will generate mesh outside your geometry.

Its this line you have to edit in SnappyHexMeshDict

locationInMesh (4.25 5.25 6.25);

This is in absolute x y z coordinates.

Hope this helps.

regards
__________________
Linnemann

PS. I do not do personal support, so please post in the forums.
linnemann is offline   Reply With Quote

Old   December 11, 2008, 03:50
Default Hi I've solved the problem abo
  #8
Member
 
fabrizio
Join Date: Mar 2009
Posts: 33
Rep Power: 7
fabrizio is on a distinguished road
Hi I've solved the problem about inside/outside mesh, it was due to the axes origin I've considered...
My last problem is extracting pressure on the stl surface; I read the post you suggested and this is very useful for me, but I'm not allowed to modify the stl file. The problem is that I don't know what command/utility I have to use to extract pressure. I'd like now to try to calculate the pressure on a patch; infact in the boundary file I have a new patch of type wall created by SnappyHexMesh after it has build the mesh. Is it possible?

Thanks

Fabrizio
fabrizio is offline   Reply With Quote

Old   February 16, 2009, 08:15
Default hi fabrizio , for extractin
  #9
Senior Member
 
Wolfgang Heydlauff
Join Date: Mar 2009
Location: Germany
Posts: 136
Rep Power: 7
wolle1982 is on a distinguished road
hi fabrizio ,

for extracting the pressure on the surface you can use the "sample"-Tool (see other thread). therefor eyou must have the koordinates of the surface already.
wolle1982 is offline   Reply With Quote

Reply

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
Create fine mesh that grows to coarse mesh (Urgent CZ FLUENT 1 January 3, 2009 10:36
Oscillatory mesh motion setup mesh flux ERROR jaswi OpenFOAM Running, Solving & CFD 5 August 23, 2007 04:41
Icemcfd 11: Loss of mesh from surface mesh option? Joe CFX 2 March 26, 2007 18:10
dynamic mesh - structured or cooper mesh Manoj Kumar FLUENT 2 November 11, 2005 01:18
How to convert STAR mesh into FLUENT mesh ? Jihwan CD-adapco 8 November 10, 2004 04:11


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