Hi,
All my thanks go to the developers for developing such a nice software.
I have a quite simple problem. I have a surface meshed with quad
elements, I could not accomplish to plot the node numbers from the GUI.
Any help appreciated.(attached the files also)
Best
Umut
/*********************************************************************
*
* 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;
// This variable can then be used in the definition of Gmsh's simplest
// `elementary entity', a `Point'. A Point is defined by a list of
// four numbers: three coordinates (X, Y and Z), and a characteristic
// length (lc) that sets the target element size at the point:
Point(1) = {0, 0, 0, lc};
// The distribution of the mesh element sizes is then obtained by
// interpolation of these characteristic lengths throughout the
// geometry. Another method to specify characteristic lengths is to
// use a background mesh (see `t7.geo' and `bgmesh.pos').
// We can then define some additional points as well as our first
// curve. Curves are Gmsh's second type of elementery entities, and,
// amongst curves, straight lines are the simplest. A straight line is
// defined by a list of point numbers. In the commands below, for
// example, the line 1 starts at point 1 and ends at point 2:
Point(2) = {0.4572, 0, 0, lc} ;
Point(3) = {0.4572, 0.4572, 0, lc};
Point(4) = {0, 0.4572, 0, lc};
Line(1) = {1,2} ;
Line(2) = {2,3} ;
Line(3) = {3,4} ;
Line(4) = {4,1} ;
// The third elementary entity is the surface. In order to define a
// simple rectangular surface from the four lines defined above, a
// line loop has first to be defined. A line loop is a list of
// connected lines, a sign being associated with each line (depending
// on the orientation of the line):
Line Loop(1) = {1,2,3,4} ;
// We can then define the surface as a list of line loops (only one
// here, since there are no holes--see `t4.geo'):
Plane Surface(1) = {1} ;
// At this level, Gmsh knows everything to display the rectangular
// surface 6 and to mesh it. An optional step is needed if we want to
// associate specific region numbers to the various elements in the
// mesh (e.g. to the line segments discretizing lines 1 to 4 or to the
// triangles discretizing surface 6). This is achieved by the
// definition of `physical entities'. Physical entities will group
// elements belonging to several elementary entities by giving them a
// common number (a region number), and specifying their orientation.
// We can for example group the points 1 and 2 into the physical
// entity 1:
// Physical Point(1) = {1,2} ;
// Consequently, two punctual elements will be saved in the output
// mesh file, both with the region number 1. The mechanism is
// identical for line or surface elements:
bcLine = 11 ;
Physical Line(bcLine) = {1} ;
quadSurf = 44 ;
Physical Surface(quadSurf) = {1} ;
// All the line elements created during the meshing of lines 1, 2 and
// 4 will be saved in the output mesh file with the region number 99;
// and all the triangular elements resulting from the discretization
// of surface 6 will be given an automatic region number (100,
// associated with the label "My fancy surface label").
// Note that if no physical entities are defined, then all the
// elements in the mesh will be saved "as is", with their default
// orientation.
/*********************************************************************
*
* Gmsh tutorial 6
*
* Transfinite meshes
*
*********************************************************************/
// Let's use the geometry from the first tutorial as a basis for this
// one
Include "simpleplate.geo";
// Put 20 equidistant points on curve 4
Transfinite Line{1} = 10 ;
// Put 20 points with a refinement toward the extremities on curve 2
// Transfinite Line{2} = 20 Using Bump 0.05;
// my addition
Transfinite Line{2} = 10;
Transfinite Line{3} = 10;
Transfinite Line{4} = 10;
// Define the Surface as transfinite, by specifying the four corners
// of the transfinite interpolation
Transfinite Surface{1} = {1,2,3,4};
// (Note that the list on the right hand side refers to points, not
// curves. The way triangles are generated can be controlled by
// appending "Left", "Right" or "Alternate" after the list.)
// Recombine the triangles into quads
Recombine Surface{1};
// Apply an elliptic smoother to the grid
Mesh.Smoothing = 100;
// uncomment this line and write the mesh in
// binary format
// Mesh.MshBinary = 1 ;
// Mesh.MshBinary = true ;
// Nastran bdf format : option value is 31 for BDF output
// Mesh.Format = 31 ;
Show "*";
Show "*";
Show "*";
_______________________________________________
gmsh mailing list
[email protected]
http://www.geuz.org/mailman/listinfo/gmsh