tag:blogger.com,1999:blog-4049389000246339680.post261348388680433114..comments2024-03-24T08:03:15.334-07:00Comments on lordvon's stuff: Hybrid structured/unstructured meshing with Gmshlordvonhttp://www.blogger.com/profile/05681123007982690331noreply@blogger.comBlogger23125tag:blogger.com,1999:blog-4049389000246339680.post-21827180505707776972016-09-11T17:12:52.388-07:002016-09-11T17:12:52.388-07:00dedeAnonymoushttps://www.blogger.com/profile/03325572530771021201noreply@blogger.comtag:blogger.com,1999:blog-4049389000246339680.post-52277019281473777292016-09-11T17:12:48.875-07:002016-09-11T17:12:48.875-07:00Hi! I am trying to generate an unstructured mesh f...Hi! I am trying to generate an unstructured mesh for mexico, in 10N,120W;10N,80W; 35N,120W; 35N,80W, but i don´t know what tools of GMSH to use for that, please, help!!Anonymoushttps://www.blogger.com/profile/03325572530771021201noreply@blogger.comtag:blogger.com,1999:blog-4049389000246339680.post-81537427750906331232016-09-11T17:12:20.021-07:002016-09-11T17:12:20.021-07:00Hi! I am trying to generate an unstructured mesh f...Hi! I am trying to generate an unstructured mesh for mexico, in 10N,120W;10N,80W; 35N,120W; 35N,80W, but i don´t know what tools of GMSH to use for that, please, help!!Anonymoushttps://www.blogger.com/profile/03325572530771021201noreply@blogger.comtag:blogger.com,1999:blog-4049389000246339680.post-24513662154485297022016-09-11T17:10:39.146-07:002016-09-11T17:10:39.146-07:00This comment has been removed by the author.Anonymoushttps://www.blogger.com/profile/03325572530771021201noreply@blogger.comtag:blogger.com,1999:blog-4049389000246339680.post-45783019117556847352015-12-04T02:27:39.252-08:002015-12-04T02:27:39.252-08:00Hi Lordvon,
Thanks for the fascinating post!
Sho...Hi Lordvon,<br /><br />Thanks for the fascinating post!<br /><br />Should this hybrid mesh principle work in 3D? I would like to have some sections of my mesh volume structured, and others unstructured.<br /><br />Thanks,<br />NicoleAnonymoushttps://www.blogger.com/profile/00435622195365599559noreply@blogger.comtag:blogger.com,1999:blog-4049389000246339680.post-51312891887340747292015-10-20T15:57:48.847-07:002015-10-20T15:57:48.847-07:00I think I figured it out.. rather than use Transfi...I think I figured it out.. rather than use Transfinite and Recombine to create boundary layers (as so many blogs, forums, and wikis suggest), it's way better to use Extrude Surface with no view specified so you get layers normal to, and offset from, the surface. Within the extrude function, you specify a series of progressively thicker layers to attain your y+ goal.<br />Thanks,<br />Henryhankhttps://www.blogger.com/profile/15094116471114125630noreply@blogger.comtag:blogger.com,1999:blog-4049389000246339680.post-63658681635958241242015-10-20T09:22:16.256-07:002015-10-20T09:22:16.256-07:00Hi Robert,
Would you mind explaining how you main...Hi Robert,<br /><br />Would you mind explaining how you maintain the progressive grid spacing between the transfinite boundaries? Every other example I have seen, including my own attempts, quickly returns to a more even grid spacing between the progressive boundaries. The tutorial t6.geo is one example.<br />Thanks so much for your help!<br /><br />Best Regards,<br />Henryhankhttps://www.blogger.com/profile/15094116471114125630noreply@blogger.comtag:blogger.com,1999:blog-4049389000246339680.post-80694684487648302042015-08-17T21:03:35.842-07:002015-08-17T21:03:35.842-07:00Hi Khrisna and Lordvon,
Thanks for your code exam...Hi Khrisna and Lordvon,<br /><br />Thanks for your code example and helps. I finally decided to use the standard transfinite function to generate the structured mesh. The result looks good, even though I still need time to find the best combination of parameters to generate a very high quality hybrid mesh. As you can see in the generated mesh, I still cannot control the mesh in leading edge well. Comparison with experimental data (I used SU2 code) shows that the lift coefficient value is still not correct yet (Mine is 0.68 while the experiment is 0.72). Still have to work on it. Here is the .geo file that I created, perhaps you could give some feedbacks:<br /><br />https://github.com/pramsatriapalar/test/blob/master/RAE2822gmsh.geo<br /><br />Anonymoushttps://www.blogger.com/profile/14917412640907184228noreply@blogger.comtag:blogger.com,1999:blog-4049389000246339680.post-82191798362402218812015-08-12T22:22:04.218-07:002015-08-12T22:22:04.218-07:00Hi Pram and Robert. I generated a decent NACA hybr...Hi Pram and Robert. I generated a decent NACA hybrid a few weeks back. I modified a certain octave script to generate the NACA co-ordinates in gmsh format. Heres the github to the NACA repository where both the .geo file and the octave script are available ----> https://github.com/pruthvi1991/gmsh/tree/master/NACA simply straight forwardhttps://www.blogger.com/profile/13520609421928896457noreply@blogger.comtag:blogger.com,1999:blog-4049389000246339680.post-40961747460815425282015-08-12T19:50:57.733-07:002015-08-12T19:50:57.733-07:00Hi Pram, you'll want to create two squares / r...Hi Pram, you'll want to create two squares / rectangle meshes at the trailing edge to get orthogonal cells there. So you have the boundary layer mesh wrapping the airfoil, then at each end of the wrap (the trailing edge) you will have a square / rectangle mesh (and these share a common boundary). Hope this helps.lordvonhttps://www.blogger.com/profile/05681123007982690331noreply@blogger.comtag:blogger.com,1999:blog-4049389000246339680.post-2442797876053418682015-08-12T19:44:09.345-07:002015-08-12T19:44:09.345-07:00Hi Robert,
Your hybrid mesh looks amazing. I am r...Hi Robert,<br /><br />Your hybrid mesh looks amazing. I am right now working on creating this kind of hybrid mesh for an airfoil with sharp trailing edge (with GMSH). I used the boundarylayer function, but there are always bad quality meshes near the trailing edge.. there is a fan-shape like mesh that spans from the trailing edge part of the upper to lower surface.<br /><br />Did you use this boundarylayer function to create the hybrid mesh or did you use the standard transfinite line function? <br /><br />Thanks!<br />PramAnonymoushttps://www.blogger.com/profile/14917412640907184228noreply@blogger.comtag:blogger.com,1999:blog-4049389000246339680.post-84622326813468210032015-05-20T01:06:46.839-07:002015-05-20T01:06:46.839-07:00I simulate flapping airfoils which have applicatio...I simulate flapping airfoils which have applications in energy harvesting and micro aerial vehicles. We developed an in house code based on the discreet vortex method. We are in the process of validating and improving it.simply straight forwardhttps://www.blogger.com/profile/13520609421928896457noreply@blogger.comtag:blogger.com,1999:blog-4049389000246339680.post-40079201203865418202015-05-19T17:14:33.607-07:002015-05-19T17:14:33.607-07:00Awesome! Glad I could help. Unfortunately Gmsh act...Awesome! Glad I could help. Unfortunately Gmsh acts buggy from time to time (though it is possible I have actually done something wrong). Just curious, what are you doing your simulations for?lordvonhttps://www.blogger.com/profile/05681123007982690331noreply@blogger.comtag:blogger.com,1999:blog-4049389000246339680.post-35853022647947458032015-05-19T10:40:22.126-07:002015-05-19T10:40:22.126-07:00Nice analysis Robert! You were right, there were n...Nice analysis Robert! You were right, there were non-conformal regions. I was able to fix the problem by changing the number of points on the transfinite line. Even now the error occurs if I change a progression from 1.02 to 1.03. I guess my meshing technique is not very smart since it creates a sudden jump in mesh size at surfaces 5 and 9. Thanks again!simply straight forwardhttps://www.blogger.com/profile/13520609421928896457noreply@blogger.comtag:blogger.com,1999:blog-4049389000246339680.post-79337886760176796732015-05-19T04:35:47.315-07:002015-05-19T04:35:47.315-07:00If I were you I would work on getting the extrusio...If I were you I would work on getting the extrusions of surfaces 5 and 9 right, and turn off the other extrusions.lordvonhttps://www.blogger.com/profile/05681123007982690331noreply@blogger.comtag:blogger.com,1999:blog-4049389000246339680.post-73142376195089240172015-05-19T04:33:53.625-07:002015-05-19T04:33:53.625-07:00Hi Pruthvi,
I took a look at your mesh and it see...Hi Pruthvi,<br /><br />I took a look at your mesh and it seems the problem is there are non-conformal regions. If an internal face is recognized by openfoam and put into defaultfaces, then something is wrong, unless you intentionally made non-conformal regions and intend to use AMI or something.<br /><br />If you look at your mesh at the extrusions of surfaces 5 and 9, you can see that there is some weirdness going on. These surfaces are not extruded as you intend. Specifically, it seems the base surface has a different meshing than the extruded final surface somehow.<br /><br />That's all I can do right now, but hopefully that is a helpful lead. Let me know if you find the solution!<br /><br />-Robert<br /><br /> lordvonhttps://www.blogger.com/profile/05681123007982690331noreply@blogger.comtag:blogger.com,1999:blog-4049389000246339680.post-82301084207514026762015-05-19T03:59:09.198-07:002015-05-19T03:59:09.198-07:00Hi Robert,
I generated a hybrid mesh and I'm ...Hi Robert,<br /><br />I generated a hybrid mesh and I'm stuck with a problem. I'm not sure how to handle the internal faces generated by the different mesh regions(structured and unstructured). OpenFOAM declares them as default faces as follows<br /><br />defaultFaces<br />{<br />type patch;<br />nFaces 284; <br />startFace 562756;<br />}<br /><br />How did you handle this issue? Here is the github link https://github.com/pruthvi1991/gmsh/tree/master/pilot<br /><br />Here are pictures to help you see what I did https://drive.google.com/open?id=0B0O_EM6xOrebfm5FZE1TYUhqZXNUVlF2d1RfUUdxWU5KenJlbmV4dUN3dXUySnUyTG42WEk&authuser=0<br /><br />Thanks,<br />Pruthvi.simply straight forwardhttps://www.blogger.com/profile/13520609421928896457noreply@blogger.comtag:blogger.com,1999:blog-4049389000246339680.post-43261282109144482462015-05-14T07:11:49.648-07:002015-05-14T07:11:49.648-07:00I commented out the Recombine Surface line and tha...I commented out the Recombine Surface line and that was the problem. This is what happens when I use a tool without actually understanding the underlying principles. Once again thanks for sharing your work with everyone.simply straight forwardhttps://www.blogger.com/profile/13520609421928896457noreply@blogger.comtag:blogger.com,1999:blog-4049389000246339680.post-86539684851060837732015-04-30T22:53:14.899-07:002015-04-30T22:53:14.899-07:00Hello Robert,
This post helped me a lot since I n...Hello Robert,<br /><br />This post helped me a lot since I never heard about gmsh before. I went through the tutorials and tried to implement a structured mesh within an unstructured one just like you have. My mesh is OK except for a strange criss crossing in the structured part. I'm not sure what is causing this. Can you tell me where I'm going wrong?<br /><br />Point(1) = {-10, 10, 0, 1.0};<br />Point(2) = {10, 10, 0, 1.0};<br />Point(3) = {-10, -10, 0, 1.0};<br />Point(4) = {10, -10, 0, 1.0};<br />//Point(6) = {-1, 0.01, 0, 0.1};<br />//Point(7) = {1, 0.01, 0, 0.1};<br />//Point(8) = {-1, -0.01, 0, 0.1};<br />//Point(9) = {1, -0.01, 0, 0.1};<br />Point(10) = {-2, 1, 0, 0.1};<br />Point(11) = {2, 1, 0, 0.1};<br />Point(12) = {-2, -1, 0, 0.1};<br />Point(13) = {2, -1, 0, 0.1};<br /><br />Line(1) = {1, 2};<br />Line(2) = {2, 4};<br />Line(3) = {4, 3};<br />Line(4) = {3, 1};<br />Line(5) = {10, 11};<br />Line(6) = {11, 13};<br />Line(7) = {13, 12};<br />Line(8) = {12, 10};<br />//Line(9) = {6, 7};<br />//Line(10) = {7, 9};<br />//Line(11) = {9, 8};<br />//Line(12) = {8, 6};<br /><br />Line Loop(1) = {1,2,3,4}; //,5,6,7,8};<br />//Line Loop(2) = {9,10,11,12};<br />Line Loop(3) = {5,6,7,8};<br /><br />Plane Surface(1) = {1,3};<br />Plane Surface(2) = {3};<br /><br />Transfinite Line {5,7} = 10;<br />Transfinite Line {6,8} = 10;<br /><br />Transfinite Surface{2} = {10,13,12,11};<br /><br />//Recombine Surface{1};<br /><br />//Plane Surface(2) = {1,2};<br /><br />//Extrude {0, 0, 1}<br />// {<br />// Surface{1};<br />// Layers{1};<br />// Recombine;<br />// }simply straight forwardhttps://www.blogger.com/profile/13520609421928896457noreply@blogger.comtag:blogger.com,1999:blog-4049389000246339680.post-13622719824679861002014-11-04T17:48:53.321-08:002014-11-04T17:48:53.321-08:00Hi Sangeeth, you need 4-sided shapes to make trans...Hi Sangeeth, you need 4-sided shapes to make transfinite meshes with 4-sided cells. Align your circle and square points such that you can make 4, 4-sided shapes, and then do the transfinite process on each of them to get 4 transfinite meshes.lordvonhttps://www.blogger.com/profile/05681123007982690331noreply@blogger.comtag:blogger.com,1999:blog-4049389000246339680.post-39398742278170526272014-11-04T06:07:19.440-08:002014-11-04T06:07:19.440-08:00Dear Lordvon,
Thanks for the blog post. It is qu...Dear Lordvon, <br /><br />Thanks for the blog post. It is quite helpful.<br /><br />I have been trying to obtain a O grid around a cyclindrical configuration quite similar to yours. <br />I took help of t6.geo tutorial of Gmsh documentation. I have been unsuccessful so far. <br /><br />Attaching my .geo file below. Can you point out what change I must do to get the O gird as yours (A completely O gird is my requirement without any triangle elements!)<br /><br />// Gmsh project created on Tue Nov 4 19:03:02 2014<br />Point(1) = {0, 0, 0, 1.0};<br />Point(2) = {1, 0, 0, 1.0};<br />Point(3) = {1, 1, 0, 1.0};<br />Point(4) = {0, 1, 0, 1.0};<br />Point(5) = {0.25, 0.5, 0, 1.0};<br />Point(6) = {0.75, 0.5, 0, 1.0};<br />Point(7) = {0.5, 0.5, 0, 1.0};<br />Point(8) = {0.5, 0.25, 0, 1.0};<br />Point(9) = {0.5, 0.75, 0, 1.0};<br />Line(1) = {1, 2};<br />Line(2) = {2, 3};<br />Line(3) = {3, 4};<br />Line(4) = {4, 1};<br />Circle(5) = {9, 7, 5};<br />Circle(6) = {5, 7, 8};<br />Circle(7) = {8, 7, 6};<br />Circle(8) = {6, 7, 9};<br />Line Loop(9) = {3, 4, 1, 2};<br />Line Loop(10) = {5, 6, 7, 8};<br />Plane Surface(11) = {9, 10};<br /><br />Transfinite Line {5, 8, 7, 6} = 5 Using Progression 0.5;<br />Transfinite Line {3, 2, 1, 4} = 10 Using Progression 0.1;<br /><br />Transfinite Surface {11};<br />Recombine Surface {11};<br /><br />#####################<br />Thanks in advance :)Sangeeth Simonhttps://www.blogger.com/profile/04963968849654743917noreply@blogger.comtag:blogger.com,1999:blog-4049389000246339680.post-31501764863276046522012-04-20T09:35:29.427-07:002012-04-20T09:35:29.427-07:00Well my script is quite messy, and I doubt it will...Well my script is quite messy, and I doubt it will be helpful especially since you are a beginner. The tutorial files that I mentioned (t6.geo) that are available on the gmsh website is very helpful. Thats all I needed. I do have some airfoil cases that sometime soon I will upload, once I clean them up.lordvonhttps://www.blogger.com/profile/05681123007982690331noreply@blogger.comtag:blogger.com,1999:blog-4049389000246339680.post-12931038542380005482012-04-20T08:54:49.047-07:002012-04-20T08:54:49.047-07:00Hello,
I'm a gmsh beginner, and I'll have...Hello,<br /><br />I'm a gmsh beginner, and I'll have to build an hybrid mesh with a boundary layer. <br />I'd really be interested in getting your .geo file then, that could help me to begin.<br />Is there any chance that you upload it somewhere?<br /><br />Thanks.AGIRhttps://www.blogger.com/profile/08353696584057294903noreply@blogger.com