|
[Sponsors] |
October 27, 2010, 12:27 |
SnappyHexMesh..
|
#1 |
Senior Member
Samuele Z
Join Date: Oct 2009
Location: Mozzate - Co - Italy
Posts: 520
Rep Power: 19 |
Dear All,
I have a question: is it possible to generate a volume mesh inside a certain surface? I mean, I have a non-simple stl geometry (the reconstruction of nasal cavity) and I wanna mesh the inside volume. If my file is called nasal_cavity.stl, how can I set a good snappyHexMeshDict file in order to generate my mesh inside the surface?? It is a closed surface. The only problem is that is presents some loops. I hope this is not a problem. Here is my snappyHexMeshDict file: Code:
geometry { nasal_cavity.stl // STL filename { type triSurfaceMesh; } box // User defined region name { type searchableBox; // region defined by bounding box min (-0.0422 -0.0880 -0.576); max (-0.0338 0.00583 -0.479); } }; Code:
samiam@penrose: ~/Desktop/naso_ok/test > snappyHexMesh snappyHexMeshDict Usage: snappyHexMesh [-overwrite] [-parallel] [-case dir] [-help] [-doc] [-srcDoc] --> FOAM FATAL ERROR: Wrong number of arguments, expected 0 found 1 FOAM exiting samiam@penrose: ~/Desktop/naso_ok/test > blockMesh snappyHexMeshDict Usage: blockMesh [-dict dictionary] [-case dir] [-blockTopology] [-region name] [-help] [-doc] [-srcDoc] --> FOAM FATAL ERROR: Wrong number of arguments, expected 0 found 1 FOAM exiting samiam@penrose: ~/Desktop/naso_ok/test > Samuele |
|
October 29, 2010, 08:23 |
volume mesh inside a region
|
#2 |
New Member
CFD user
Join Date: Apr 2010
Location: Germany
Posts: 28
Rep Power: 16 |
Hi samiam,
Did you use the locationInMesh to specify the portion of your geometry you wanted to keep? You can find the details about its usage in the User guide.
__________________
Thanks, |
|
October 29, 2010, 08:33 |
|
#3 |
Senior Member
Samuele Z
Join Date: Oct 2009
Location: Mozzate - Co - Italy
Posts: 520
Rep Power: 19 |
What does this mean? Also, could you link me the SnappyHexMesh user guide, please??
Do you mean the OpenFOAM u'sg?? Thanks a lot, Samuele |
|
October 29, 2010, 08:34 |
|
#4 |
Senior Member
Join Date: Aug 2010
Location: Groningen, The Netherlands
Posts: 216
Rep Power: 19 |
Hi
two things: 1) as mentioned in the previous post the location in mesh entry is a point in the part of the mesh that will be kept 2) the correct command is >this/is/your/case/directory>snappyHexMesh and maybe one of the arguments specified in your failure message. You don't have to tell sHM that your are using a Dict-file. The stl you probably have here: >this/is/your/case/directory/constant/triSurface and the sHMD file here >this/is/your/case/directory/system then everything should be alright hope that helps regards Colin Edit: yes he is refering to the OF userguide, where sHM is explained Edit2: Have you heard about the motorbike tutorial? maybe you should try that first and then adapt your case to that one. Last edited by colinB; October 29, 2010 at 08:38. Reason: Add Edit and Edit 2 |
|
October 29, 2010, 08:36 |
|
#5 |
Senior Member
Samuele Z
Join Date: Oct 2009
Location: Mozzate - Co - Italy
Posts: 520
Rep Power: 19 |
Dear Collin,
thanks for your answer. Well, just 1 more question: 1. where should I add the line with a point that I wanna include in the meshed region? Thanks. Samuele |
|
October 29, 2010, 08:40 |
|
#6 |
Senior Member
Join Date: Aug 2010
Location: Groningen, The Netherlands
Posts: 216
Rep Power: 19 |
in your snappyHexMeshDict file line 160
locationInMesh (X Y Z); this point must be in the area you want to keep (in your pipe what ever) and must not coincidence with a face! |
|
October 29, 2010, 08:48 |
|
#7 |
Senior Member
Samuele Z
Join Date: Oct 2009
Location: Mozzate - Co - Italy
Posts: 520
Rep Power: 19 |
I think I did a mistake then..
My snappyHexMeshDict file is no bigger than 20 lines.. Code:
geometry { nasal_cavity.stl // STL filename { type triSurfaceMesh; } box // User defined region name { type searchableBox; // region defined by bounding box min (-0.0422 -0.0880 -0.576); max (-0.0338 0.00583 -0.479); } }; |
|
October 29, 2010, 09:05 |
|
#8 |
Senior Member
Join Date: Aug 2010
Location: Groningen, The Netherlands
Posts: 216
Rep Power: 19 |
Oh that is a problem.
I assumed its not bigger than 20 lines but I really hoped that you just quoted parts of your sHMD. Well then I highly recommend like I did it in one of my previous posts the motorbike- tutorial and the user guide. the motorbike tutorial you find here: openFoam171/tutorials/incompressible/simpleFoam/motorBike have a look in the system folder there you find an example file for the sHMD the user guide you find here good look with it and if you have further questions just ask regards |
|
October 29, 2010, 09:13 |
|
#9 |
Senior Member
Samuele Z
Join Date: Oct 2009
Location: Mozzate - Co - Italy
Posts: 520
Rep Power: 19 |
I'll work hard on it.
Thanks a lot. Just one more question before beginning: in the motorbike tutorial (the Dict file!) I can find different "zones" to describe the surface.. But I do not need them. Can I delete that part, right?? |
|
October 29, 2010, 09:17 |
|
#10 |
Senior Member
Join Date: Aug 2010
Location: Groningen, The Netherlands
Posts: 216
Rep Power: 19 |
yes you can delete them
|
|
October 29, 2010, 15:39 |
|
#11 |
Senior Member
Join Date: Mar 2009
Location: My oyster
Posts: 124
Rep Power: 17 |
Samuele, you might want to read up on sHM in the user's manual. There you'll find a nicely commented simple case.
|
|
November 10, 2010, 17:09 |
|
#12 |
Senior Member
Samuele Z
Join Date: Oct 2009
Location: Mozzate - Co - Italy
Posts: 520
Rep Power: 19 |
Dear All,
it's again from me. I read the tutorials and I followed your advice. However, there is a point I can not find anywhere. I have a complicated geometry and I have its internal mesh. The point is that I don't know how to set which is the inlet and which is the outlet. Of course, I can not write the cell numbers, manually. Is there an automatic tool to find the inlet and the outlet section(s)?? Thanks, Samuele |
|
November 11, 2010, 05:36 |
|
#13 |
Senior Member
Join Date: Aug 2010
Location: Groningen, The Netherlands
Posts: 216
Rep Power: 19 |
Hi
ususally this is done by the blockMesh background mesh. Otherwise you have to specify different regions in your stl file so you get different patches and then assign in the files listed in the 0 folder different BC eg inlet outlet to these patches. check for this the different layers of the motorBike tutorial, but in this case to all of the layers the BC describing them as a wall are assigned regards Colin |
|
November 11, 2010, 09:53 |
|
#14 |
Senior Member
Samuele Z
Join Date: Oct 2009
Location: Mozzate - Co - Italy
Posts: 520
Rep Power: 19 |
Dear Colin,
thanks for answering. I will try to have a look. I guess that your second solution (layers!) is the best one. Bu I am not sure to be able to define different regions in the stl files.. But I will try to do my best. Thanks again, Samuele |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[CAD formats] Creating waterproof STL using snappyHexMesh or salome | Tobi | OpenFOAM Meshing & Mesh Conversion | 58 | May 13, 2020 07:01 |
[snappyHexMesh] Running snappyHexMesh in parallel - optimizing | peterhess | OpenFOAM Meshing & Mesh Conversion | 2 | January 3, 2018 03:54 |
[snappyHexMesh] Tutorial crashes: snappyHexMesh floating point exception. | jasv | OpenFOAM Meshing & Mesh Conversion | 4 | May 10, 2016 03:55 |
[snappyHexMesh] snappyhexmesh doesn't creat mesh in parallel issue? | klausb | OpenFOAM Meshing & Mesh Conversion | 1 | March 7, 2015 12:55 |
[snappyHexMesh] stitchMesh and snappyHexMesh | gdbaldw | OpenFOAM Meshing & Mesh Conversion | 0 | December 23, 2009 03:09 |