CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Main CFD Forum

gmsh usage - how to generate patterns?

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   July 7, 2009, 00:23
Default gmsh usage - how to generate patterns?
  #1
New Member
 
Can Ozcan
Join Date: Jul 2009
Location: Istanbul
Posts: 4
Rep Power: 8
canciger is on a distinguished road
Send a message via Skype™ to canciger
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 00:27. Reason: added image
canciger is offline   Reply With Quote

Reply

Tags
gmsh, mesh pattern, symmetry

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with Gmsh nishant_hull Open Source Meshers: Gmsh, Netgen, CGNS, ... 19 Yesterday 05:10
How does Gmsh deal with overlap boundaries? yuhai Open Source Meshers: Gmsh, Netgen, CGNS, ... 1 April 24, 2009 13: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 CD-adapco 6 May 27, 2003 23:38


All times are GMT -4. The time now is 08:20.