|
[Sponsors] |
July 7, 2009, 01:23 |
gmsh usage - how to generate patterns?
|
#1 |
New Member
|
Hi All;
This is my first message. I am working with commercial tools every day and night. I would like to give opensource a try, to see the capabilities. I am not sure if this is the right thread to post. Please advise otherwise. I am experimenting with gmsh, to generate some simple mesh. I kind of liked the fact that it has scripting option. However I am stuck at simple operations. I would like to have a symmetry copy of a half sphere, which is shown on the left(structured): "> However not only the shape of the surfaces but also the mesh does not come out as expected. Any help/ideas are appreciated. I am using the following code: /************************************************** ******************* * * Gmsh tutorial 1 * * Variables, elementary entities (points, lines, surfaces), physical * entities (points, lines, surfaces) * ************************************************** *******************/ // The simplest construction in Gmsh's scripting language is the // `affectation'. The following command defines a new variable `lc': lc = 0.009; Point(1) = {0, 0, 0, lc}; Point(2) = {.1, 0, 0, lc} ; Point(3) = {.15, .125, 0, lc} ; Point(4) = {.1, .25, 0, lc} ; Point(5) = {0, .25, 0, lc}; Line(1) = {1,2} ; Spline(2) = {2,3,4} ; Line(3) = {4,5} ; Line(4) = {5,1} ; Line Loop(5) = {4,1,2,3} ; //Plane Surface(6) = {5} ; Physical Point(1) = {1,2} ; MyLine = 99; Physical Line(MyLine) = {1,2,4} ; Physical Surface("My fancy surface label") = {6} ; block_thickness = 0.3; // Create surface Plane Surface(6) = {5}; // Put 20 points with a refinement toward the extremities on curve 2 Transfinite Line{1} = 5;// Using Bump 0.05; // Put 20 points total on combination of curves l1, l2 and l3 Transfinite Line{2} = 10; Transfinite Line{3} = 5; Transfinite Line{4} = 10; // Put 30 points following a geometric progression on curve 1 // (reversed) and on curve 3 //Transfinite Line{-1,3} = 30 Using Progression 1.2; // Define the Surface as transfinite, by specifying the four corners // of the transfinite interpolation Transfinite Surface{6} = {1,2,4,5}; // (Note that the list on the right hand side refers to points, not // curves. When the surface has only 3 or 4 points on its boundary the // list can be omitted. The way triangles are generated can be // controlled by appending "Left", "Right" or "Alternate" after the // list.) // Recombine the triangles into quads Recombine Surface{6}; // Apply an elliptic smoother to the grid Mesh.Smoothing = 100; //Extrude {0,0,block_thickness} { // Surface{6}; Layers{ {4,2}, {0.5,1.0}};Recombine; //} Extrude {{0, 1, 0}, {0, 0, 0}, 1.0*Pi} { Surface{6}; Layers{ {4,4}, {0.5,1.0}};Recombine;} //Extrude {{0, 1, 0}, {0, 0, 0}, 1.0*Pi} { // Surface{117}; Layers{ {2,4}, {0.5,1.0}};Recombine;} //Symmetry {0, 0, 1, 0} { // Duplicata{Volume{1};} //} Symmetry {0, 0, 1, -.001} { Duplicata{Surface{116, 113, 6, 117, 109};} } Or alternatively: could you recommend some other/better open source, scriptable meshing tool? Regards... Last edited by canciger; July 7, 2009 at 01:27. Reason: added image |
|
Tags |
gmsh, mesh pattern, symmetry |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Gmsh] Problem with Gmsh | nishant_hull | OpenFOAM Meshing & Mesh Conversion | 23 | August 5, 2015 03:09 |
[Gmsh] How does Gmsh deal with overlap boundaries? | yuhai | OpenFOAM Meshing & Mesh Conversion | 1 | April 24, 2009 14:34 |
Generate a small boundary region near the wall | sarah_ron2002 | FLUENT | 3 | February 27, 2008 12:17 |
How to generate a atmospheric boundary layer | Morten Andersen | CFX | 3 | January 16, 2007 07:48 |
how to generate postscript file? | leo | Siemens | 6 | May 28, 2003 00:38 |