|
[Sponsors] |
[snappyHexMesh] SnappyHexMesh for internal Flow |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
November 15, 2009, 22:53 |
SnappyHexMesh for internal Flow
|
#1 |
Member
vishwanath somashekar
Join Date: Apr 2009
Posts: 41
Rep Power: 17 |
Hi all,
I have taken a look at the tutorial in OF user's guide...I managed to run it without any issues. My model is a pipe of diameter D. I made the cylinder using a CAD program in this case, SolidWorks. I then exported the model as a STL file. I have a question here.. How do I name the inlet and outlet of the pipe for using them as boundaries later in OF? Now, I need to make a box using blockMesh with encloses the pipe geometry. Which I something I have no trouble doing. The next thing is the user guide is written for an external flow. If I understand the guide correctly, to mesh the inside of the pipe in my case, the locationInMesh should be point inside the pipe. Am I right? Best Regards, Vishwa |
|
November 16, 2009, 21:18 |
|
#2 |
Member
vishwanath somashekar
Join Date: Apr 2009
Posts: 41
Rep Power: 17 |
Hi,
I hope that I will find the solution to my problem using snappyhexmesh. To make a test run, I made a cube of dimension 1mm center at the origin. I saved this as a stl file and then in the blockMeshDict, I made the mesh for 2mm cube centered around the origin. for the locationInmesh, I gave 0,0,0 as i want the mesh for the inner cube. When I run the snappyhexmesh tool after the blockmesh, i don't get any errors, but i get a message saying Marked for refinement due to refinement shells : 0 cells. I am not sure what is it that I am missing. Any help would be helpful. Regards, vishwa |
|
November 16, 2009, 22:44 |
|
#3 |
Member
Stephen
Join Date: Mar 2009
Posts: 48
Rep Power: 17 |
Vishwa
CAELINUX has a tutorial about flow in a Y shaped pipe it doesnt use SnappyHexmesh but may be of some help Let me know if you cant find it ,,,I have it somewhere Stephen |
|
November 16, 2009, 22:55 |
|
#4 |
Member
vishwanath somashekar
Join Date: Apr 2009
Posts: 41
Rep Power: 17 |
Hi Stephen,
I did look at the tutorial and i didn't have any problems making the 3D object. I then followed tutorial where you can pick the faces that you want to use may be like boundaries and use the explode command. All this went well. I exported it as an stl. I had no control over how many triangles it uses for the given geometry, nevertheless, i was able to export. I then made the outbox using blockMesh and it surrounded the the geometry that i made in SALOME. Now when i pick the locationInMesh like 0,0,0 which is the center of the cube that I made in SALOME, i get the message says no cells selected. I am sure this must be something simple that I have missed up..but can't figure out what that is.. If it helps, I can just paste the stl files, blockMesh and the snappyhexMeshdict here.. Regards, vishwa |
|
November 16, 2009, 23:12 |
|
#5 | |||
Member
vishwanath somashekar
Join Date: Apr 2009
Posts: 41
Rep Power: 17 |
Hi, here is the posting of blockMesh, snappyhexmeshdict and the log file when i ran snappy
BlockMeshDict Quote:
Quote:
SnappyhexmeshDict Quote:
Vishwa |
||||
November 16, 2009, 23:12 |
part2 containing snappy log and stl file
|
#6 | |
Member
vishwanath somashekar
Join Date: Apr 2009
Posts: 41
Rep Power: 17 |
SnappyHexmesh log
Quote:
solid facet normal -1.000000e+00 -0.000000e+00 -0.000000e+00 outer loop vertex -5.000000e-01 5.000000e-01 5.000000e-01 vertex -5.000000e-01 5.000000e-01 -5.000000e-01 vertex -5.000000e-01 -5.000000e-01 -5.000000e-01 endloop endfacet facet normal -1.000000e+00 0.000000e+00 0.000000e+00 outer loop vertex -5.000000e-01 -5.000000e-01 -5.000000e-01 vertex -5.000000e-01 -5.000000e-01 5.000000e-01 vertex -5.000000e-01 5.000000e-01 5.000000e-01 endloop endfacet facet normal 1.000000e+00 0.000000e+00 0.000000e+00 outer loop vertex 5.000000e-01 -5.000000e-01 -5.000000e-01 vertex 5.000000e-01 5.000000e-01 -5.000000e-01 vertex 5.000000e-01 5.000000e-01 5.000000e-01 endloop endfacet facet normal 1.000000e+00 0.000000e+00 0.000000e+00 outer loop vertex 5.000000e-01 5.000000e-01 5.000000e-01 vertex 5.000000e-01 -5.000000e-01 5.000000e-01 vertex 5.000000e-01 -5.000000e-01 -5.000000e-01 endloop endfacet facet normal 0.000000e+00 -1.000000e+00 0.000000e+00 outer loop vertex -5.000000e-01 -5.000000e-01 5.000000e-01 vertex -5.000000e-01 -5.000000e-01 -5.000000e-01 vertex 5.000000e-01 -5.000000e-01 -5.000000e-01 endloop endfacet facet normal 0.000000e+00 -1.000000e+00 0.000000e+00 outer loop vertex 5.000000e-01 -5.000000e-01 -5.000000e-01 vertex 5.000000e-01 -5.000000e-01 5.000000e-01 vertex -5.000000e-01 -5.000000e-01 5.000000e-01 endloop endfacet facet normal 0.000000e+00 1.000000e+00 -0.000000e+00 outer loop vertex 5.000000e-01 5.000000e-01 -5.000000e-01 vertex -5.000000e-01 5.000000e-01 -5.000000e-01 vertex -5.000000e-01 5.000000e-01 5.000000e-01 endloop endfacet facet normal -0.000000e+00 1.000000e+00 0.000000e+00 outer loop vertex -5.000000e-01 5.000000e-01 5.000000e-01 vertex 5.000000e-01 5.000000e-01 5.000000e-01 vertex 5.000000e-01 5.000000e-01 -5.000000e-01 endloop endfacet facet normal 0.000000e+00 0.000000e+00 -1.000000e+00 outer loop vertex 5.000000e-01 -5.000000e-01 -5.000000e-01 vertex -5.000000e-01 -5.000000e-01 -5.000000e-01 vertex -5.000000e-01 5.000000e-01 -5.000000e-01 endloop endfacet facet normal 0.000000e+00 0.000000e+00 -1.000000e+00 outer loop vertex -5.000000e-01 5.000000e-01 -5.000000e-01 vertex 5.000000e-01 5.000000e-01 -5.000000e-01 vertex 5.000000e-01 -5.000000e-01 -5.000000e-01 endloop endfacet facet normal -0.000000e+00 0.000000e+00 1.000000e+00 outer loop vertex -5.000000e-01 5.000000e-01 5.000000e-01 vertex -5.000000e-01 -5.000000e-01 5.000000e-01 vertex 5.000000e-01 -5.000000e-01 5.000000e-01 endloop endfacet facet normal 0.000000e+00 -0.000000e+00 1.000000e+00 outer loop vertex 5.000000e-01 -5.000000e-01 5.000000e-01 vertex 5.000000e-01 5.000000e-01 5.000000e-01 vertex -5.000000e-01 5.000000e-01 5.000000e-01 endloop endfacet endsolid Sorry for the really long post.. Regards, Vishwa |
||
November 19, 2009, 15:21 |
|
#7 |
Senior Member
|
Dear Vishwa,
I have no experiance with snappyhex for meshing an internal flow, but at the last Stammtisch in Stuttgart there was an engrid presentation http://78.140.120.226/cms/index.php?id=4 or http://sourceforge.net/projects/engrid/ it is opensource with some funding by esa. It uses STL as CAD source as well. You have sometimes to use Blender (or it makes meshing easier using blender to select Inlets/outlets etc.). But it is quite powerful as the developer pointet out. Maybe you can ask for the presentation (to evalueate capabilaties) from the stuttgart stammtisch if you ask => info[at]engits.com Or just install via script see more http://78.140.120.226/phpBB3/viewtopic.php?f=2&t=62 hope this helps elvis |
|
January 12, 2010, 10:10 |
|
#8 |
Senior Member
Claus Meister
Join Date: Aug 2009
Location: Wiesbaden, Germany
Posts: 241
Rep Power: 18 |
Hello Vishwa,
I found your posts because I am facing the same problem. I want to ask if you have made it to get snappyHexMesh for internal flows going. If so, I want to please you if you could send me or post your snappyHexMeshDict. I want to learn from it. Thanks a lot in advance! Claus |
|
January 12, 2010, 21:00 |
|
#9 |
Senior Member
Claus Meister
Join Date: Aug 2009
Location: Wiesbaden, Germany
Posts: 241
Rep Power: 18 |
Hey folks! Is me again!
Should anybody how to mesh a inter flow, e.g. pipe, with snappyHexMesh please post the procedure to follow. I have the problem: When I have meshed with snappy a pipe then the pipe is meshed, but also the environment. What did I wrong? Cheers, Claus |
|
January 13, 2010, 14:17 |
|
#10 |
Senior Member
Francesco Del Citto
Join Date: Mar 2009
Location: Zürich Area, Switzerland
Posts: 237
Rep Power: 18 |
snappyHexMesh keeps everything that is connected to the point you specify. If the pipe is opened, then it keeps everything.
Close the pipe with two surfaces (STL) and you should get only the internal mesh. Francesco |
|
January 13, 2010, 19:30 |
|
#11 |
Senior Member
Claus Meister
Join Date: Aug 2009
Location: Wiesbaden, Germany
Posts: 241
Rep Power: 18 |
I do not understand!
I generated a pipe (cylinder) in SALOME an exported it via STL to OpenFOAM. In the blockMeshDict I specified a box just around the cylinder. In the snappyHexMeshDict I set locationInMesh to a point which is definitly in the cylinder. After running the snappyHexMesh -overwrite proceuder I obtain the mesh cylinder sourrounded by the box specefied in blockMeshDict which was also totally meshed. Have I properly set the box around the cylinder (pipe) wrong? Cheers, Claus |
|
January 14, 2010, 01:15 |
|
#12 |
New Member
|
@ Claus Meister
I think Francesco answered your question.......... Just to rephrase If the surfaces to me meshed form a closed region then you won't get the mesh outside the cylinder, assuming that locationInMesh is a point inside the cylinder.... -- Amol |
|
January 14, 2010, 04:07 |
|
#13 |
Senior Member
Claus Meister
Join Date: Aug 2009
Location: Wiesbaden, Germany
Posts: 241
Rep Power: 18 |
Hey folks!
I fixed the problem. I reduced in my blockMeshDict the numbers of cells for each direction in the box then I ran snappy again and I had my desired result. More precisely at first I had: hex (0 1 2 3 4 5 6 7) (40 40 80) simpleGrading (1 1 1) end now: hex (0 1 2 3 4 5 6 7) (10 10 10) simpleGrading (1 1 1) Cheers, Claus |
|
January 14, 2010, 14:57 |
|
#14 |
Senior Member
Francesco Del Citto
Join Date: Mar 2009
Location: Zürich Area, Switzerland
Posts: 237
Rep Power: 18 |
I guess you have a gap (even a tiny gap) between the STL of your cylinder side and the caps at the two ends of it. Or you did not have the caps at all!
But at least you have your mesh now, if you are happy with it... Francesco |
|
January 15, 2010, 15:17 |
|
#15 |
Senior Member
Claus Meister
Join Date: Aug 2009
Location: Wiesbaden, Germany
Posts: 241
Rep Power: 18 |
Not total!
Whats left to do is to assign the patches at the right places. That's gonna be the next level to make it. Cheers, Claus |
|
January 15, 2010, 17:57 |
|
#16 |
Senior Member
Claus Meister
Join Date: Aug 2009
Location: Wiesbaden, Germany
Posts: 241
Rep Power: 18 |
Hey folks!
Could anybody explain how I can delete the patches for bounding box which was defined via blockMeshDict. If not, you can I handle it? Kinda regards Claus |
|
January 16, 2010, 04:21 |
|
#17 |
Senior Member
Francesco Del Citto
Join Date: Mar 2009
Location: Zürich Area, Switzerland
Posts: 237
Rep Power: 18 |
If they are empty (0 faces in them), a possible solution is to edit polyMesh/boundary file and delete the entries (do not forget to update the number of the patches at the top of the list).
Francesco |
|
January 16, 2010, 05:15 |
|
#18 |
Senior Member
Claus Meister
Join Date: Aug 2009
Location: Wiesbaden, Germany
Posts: 241
Rep Power: 18 |
Hello Francesco,
I did so, but the next problem was that I got an error message by using of decomposePar. It said something like: "for patch xxx is no ...". Anyway, I solved the problem by specifying that the bounding box is wall and so I extended all entries in 0-Folder with zeroGradient at the that wall. I know; It is a DIRTY SOLUTION, but should someone have a more elegante please post! kinda regards Claus |
|
February 5, 2010, 05:15 |
|
#19 | |
Member
Wolfram Kretzschmar
Join Date: Dec 2009
Posts: 71
Rep Power: 16 |
Hi everybody,
Quote:
My geometry is exported from CAD (outer surfaces), imported in CAD again (as faces only) and merged as a solid volume, then exported again. Imported in Salome and split up into faces. So I assume, the faces should make a closed volume. The faces are then exported to STL and preprocessed in order to work with snappy. With small geometries this works very well. Now, I'm processing a rather large geometry and running out of virtual memory. This is why I try to set the refinement levels low and start working with refinement boxes in oder to keep the cell number small. The locationInMesh is located in the internal mesh. I checked the vertice orders in blockMeshDict and this seems to be ok. However snappy finds the point inside the mesh and eventually keeps ALL cells, i.e. inside and outside. Now my question: Could snappyHexMesh itself produce gaps between faces (i.e. a non-closed volume) due to cell removement in a mesh of low refinement level? Cheers Wolle
__________________
CAELinux 2010 -- OpenFOAM 1.7 |
||
February 7, 2010, 05:45 |
|
#20 |
Senior Member
Francesco Del Citto
Join Date: Mar 2009
Location: Zürich Area, Switzerland
Posts: 237
Rep Power: 18 |
The answer to your question is "no", i.e., in my experience every time I had the mesh where I didn't expect it, I had a leakage somewhere in the surface STL mesh. Sometimes is very hard to find those gaps and they could be related to the triangulation the CAD software (Salome in your case) does before exporting. Just as an example, if a curved line is shared by two surfaces but they are considered not connected by the cad, the number of point, or simply their position, used to represent that curved edge when exporting the two surfaces might be different, and this may be enough to find an unexpected hole.
Usually, if you go finer with your mesh, you have more chances that any possible imperfection creates a leakage. A while ago (I don't remember when nor with which version of the code, unfortunately) there was a bug in the code and the mesh was refined on the wrong side, when using refinement boxes. That bug has been fixed and many new features and enhancements have been added to snappyHexMesh recently. I suggest you to download the latest 1.6.x version from the git repository (there's a big update of this mesher released no more than a week ago) and try again with it. If this doesn't work, check your STL geometry carefully. I use Ansa for it, which is not bad in this task, even if I know better software for STL handling. I use snappyHexMesh on big and complex models almost every day. It works, once you get used with it! Hope this helps, Francesco |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
transient, impregnating flow problem | fgommer | FLUENT | 0 | February 29, 2012 17:10 |
[snappyHexMesh] Pipe flow / Internal fluid dynamics with SnappyHexMesh | denner | OpenFOAM Meshing & Mesh Conversion | 3 | October 13, 2011 10:24 |
Flow meter Design | CD adapco Group Marketing | Siemens | 3 | June 21, 2011 09:33 |
potential flow vs. Euler flow | curious ... | Main CFD Forum | 23 | July 21, 2006 08:40 |
Plug Flow | Franck | Main CFD Forum | 3 | September 4, 2003 06:57 |