|
[Sponsors] |
March 22, 2016, 12:08 |
error in snappyHexMesh
|
#1 |
Member
Justin Maris L. Natividad
Join Date: Mar 2016
Posts: 38
Rep Power: 10 |
Good day. I am a new user of OpenFoam and I am trying to use OpenFoam to simulate flow in an airplane. Now i found a tutorial which shows how to do it. I am now on the snappyHexMesh part. I copied the code given in the tutorial, replaced the names with the model that I am using. When I run it, this error occurs (see image attached). I also attached the code I've copied. Thank you for your consideration
|
|
March 22, 2016, 13:21 |
|
#2 |
Senior Member
Saideep
Join Date: Apr 2015
Location: INDIA
Posts: 203
Rep Power: 11 |
Hi,
Did the tutorial also provide you with the .stl file? If yes, use that .stl and check if you can run snappyHexMesh. If you are using your own .stl file (I assume this is the case), you need to check the location of your .stl in Cartesian plane (use can do this by loading the .stl in paraview and use a Source -> Sphere) and also check a co-ordinate which you are interested to retain or remove which is mentioned at locationInMesh (-0.051 -0.04 -0.08); line of the code. Saideep |
|
March 23, 2016, 02:17 |
|
#3 |
Member
Justin Maris L. Natividad
Join Date: Mar 2016
Posts: 38
Rep Power: 10 |
Hello, sir. First of all thank you for the info. I tried to do the things you've said. The sphere was outside of the model when I used the coordinates found on the locationInMesh. I just wanted to know if what part of the geometry must I look for the location in the cartesian coordinate plane. Thank you again
|
|
March 23, 2016, 02:24 |
|
#4 |
Senior Member
Join Date: Aug 2013
Posts: 407
Rep Power: 15 |
Hi,
If you are talking about how to define your locationInMesh point, it depends on what you want to mesh with snappy. As an example, let us say you have a cylinder (as stl) that you have put in a big domain and you are planning to mesh this with snappy. 1. If you want to mesh the domain from which the cylinder is removed, then you can specify any point in the domain, as long as it is not inside the cylinder. 2. If you want to mesh within the cylinder only (highly unlikely, but here for completeness sake), then your locationInMesh will be within the cylinder. Also, to add on to what Saideep has said, if you want to check your domain extents, you can look into the "Information" tab, at least in the newer versions (>4) of Paraview. The tab lists the extents as well as the dimensions in the three cartesian directions. Hope this helps. Cheers, Antimony |
|
March 23, 2016, 03:29 |
|
#5 |
Member
Justin Maris L. Natividad
Join Date: Mar 2016
Posts: 38
Rep Power: 10 |
Hello. Thank you for the info. Honestly I don't know what to do since I am a new user in OpenFoam. I just followed what's in the tutorial. Since I don't have the model the tutorial describes, i just used another model since it is said that it can be applied to other models (the tutorial about fluid dynamics of a very light aircraft). I am already in the process of snappyHexMesh (I adjusted the blockMeshDict since the model that I have imported is outside the box produced by blockMesh). So now with the infos that you gave me. I tried to edit the coordinates in locationInMesh (the coordinates i've used are inside the model) but still it's not working. How will I utilize the info in the information tab, and is there something I've missed, because I guess since my model is different from the model described in the tutorial, I neesd to adjust something. Thank you again
|
|
March 23, 2016, 04:29 |
|
#6 |
New Member
Join Date: Feb 2016
Posts: 28
Rep Power: 10 |
Hi,
Have you tried to have a look at the motorbike tutorial for example? The structure of the snappyHexMesh file seems a little bit different at the beginning than yours. It could be the reason of your problem as your region patch0 seems to be undefined. Usually, I run only blockMesh at the beginning and then I visualise the result with paraFoam. Then I open the stl file and I see if the domain is well defined. Hope it is useful. mqsim |
|
March 23, 2016, 11:39 |
|
#7 |
Member
Justin Maris L. Natividad
Join Date: Mar 2016
Posts: 38
Rep Power: 10 |
Hi again. I tried using the snappyHexMeshDict in the motorbike tutorial, made some changes based on my case. and the picture attached is the result. so I guess it worked? Anyways thank you for the infos
|
|
March 24, 2016, 05:18 |
|
#8 |
New Member
Join Date: Feb 2016
Posts: 28
Rep Power: 10 |
Hi,
Well, I can't say if it worked with only the snappyHexMesh message and I don't know what you expect. So now you have to check with paraFoam and checkMesh. mqsim |
|
March 24, 2016, 12:26 |
|
#9 |
Member
Justin Maris L. Natividad
Join Date: Mar 2016
Posts: 38
Rep Power: 10 |
Hmm I checked it using checkMesh, and it says its ok. Anyways thank you for the infos
|
|
March 27, 2016, 07:42 |
|
#10 |
Senior Member
Saideep
Join Date: Apr 2015
Location: INDIA
Posts: 203
Rep Power: 11 |
hi,
just in case if you are still struggling. snappyhexmesh is a great tool to model a complex structure. {Starting with it is complex but iver time you will get over it!!} Step1: develop your .stl file. {Also SHM can read other files like .obj etc can be seen in user guide}. Place it in your constants/triSurface folder. Just to be sure if the .stl is as expected, check your .stl file in paraview. As I mentioned earlier feel free to know the domains of your model using a sphere, ruler etc. This is important as there is always a possibility you remove/ retain the portion that you arent interested in. Step1.1: If you are comfortable using terminal also you have specific comments to know the domain range and also it is possible to scale your model and write te scaled model as a new .stl file. {if you need this let me know I can send them. I think so, commands are filename.stl domainCheck, filename.stl -scale 0.001}. Step2: Once you have your .stl, you need to create a blockMesh file. Basically the idea is to overlap the .stl over your blockMesh model. To be safe, run blockMeshDict and open both your .stl and blockMeshFile together. They should be overlapped at the central portion and your blockMesh boundary must possibly be within te .stl boundary. Step3: open your snappyHexMesh file in systems folder and add your .stl name and also mention the portion that you want to retain by specifying a point tat exists within the .stl. Step4: Running SHM should give what you are trying for. HTH, Saideep |
|
March 28, 2016, 12:31 |
|
#11 |
Member
Justin Maris L. Natividad
Join Date: Mar 2016
Posts: 38
Rep Power: 10 |
Thank you for the tips. And thank you for all the infos. I think I got the result I wanted. I compared it with the motorbike tutorial, edited the snappyhexmesh and the stl itself using gedit. After I run snappyhexmesh, the result I got is the same when I run the motorbike using snappyhexmesh. =)
|
|
|
|
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 06:01 |
[snappyHexMesh] Running snappyHexMesh in parallel - optimizing | peterhess | OpenFOAM Meshing & Mesh Conversion | 2 | January 3, 2018 02:54 |
[snappyHexMesh] Tutorial crashes: snappyHexMesh floating point exception. | jasv | OpenFOAM Meshing & Mesh Conversion | 4 | May 10, 2016 02:55 |
[snappyHexMesh] snappyhexmesh doesn't creat mesh in parallel issue? | klausb | OpenFOAM Meshing & Mesh Conversion | 1 | March 7, 2015 11:55 |
[snappyHexMesh] stitchMesh and snappyHexMesh | gdbaldw | OpenFOAM Meshing & Mesh Conversion | 0 | December 23, 2009 02:09 |