[Gmsh] Notched rectangle -- mesh on overlaping edges
Roman Putanowicz
putanowr at l5.pk.edu.pl
Sun Feb 3 23:56:50 CET 2013
Dear Gmsh Users,
In version 2.5.0 of gmsh I have used to build a mesh for notched
rectangle by creating a compound surface. What I wanted to achieve
was a mesh with duplicated nodes on the notch line. In the attachment
you will find a sample geometry file and images of the generated mesh
(on two images you can see nodes generated on the overlapping line,
you can also see mesh elements crossing internal horizontal boundary
but not the notch vertical line. The best illustration of the feature
I want to achieve is notch1_selectiverefine.png where you can see meshes
of different densities generated on the overlapping edge for the left
and right hand surfaces).
Unfortunately this example does not work with gmsh 2.6 (apparently
also not in 2.4.2).
I would be most grateful if someone could confirm that gmsh 2.6 is
generating errors for the sample geometry.
Also I would much appreciate if you have any idea how to achieve
duplicated nodes over a line (well, I could separate the line geometrically
and in post processing step make the nodes to overlap, but I wonder
if I can get such effect purely in gmsh). I was really happy to generate
meshes mentioned above in gmsh 2.5 as this feature is very useful for
the models I deal with.
With kind regards,
Roman Putanowicz
--
Roman Putanowicz, PhD < putanowr at l5.pk.edu.pl >
Institute for Computational Civil Engng (L-5)
Dept. of Civil Engng, Cracow Univ. of Technology
www.l5.pk.edu.pl, tel. +48 12 628 2569, fax 2034
-------------- next part --------------
lc = 0.15; // desired mesh edge length parameter
pts[]={};
/* Vertex numbering */
/* 1 0
4 3 2
7 6/8 5
*/
Geometry.AutoCoherence = 0; // prevent gluing nodes with the same position
pts[]+=newp;
Point(newp) = {1, 1, 0, lc};
pts[]+=newp;
Point(newp) = {-1, 1, 0, lc};
pts[]+=newp;
Point(newp) = {1, 0.5, 0, lc};
pts[]+=newp;
Point(newp) = {0, 0.5, 0, lc};
pts[]+=newp;
Point(newp) = {-1, 0.5, 0, lc};
pts[]+=newp;
Point(newp) = {1, 0, 0, lc};
pts[]+=newp;
Point(newp) = {0, 0, 0, lc};
pts[]+=newp;
Point(newp) = {-1, 0, 0, lc};
pts[]+=newp;
Point(newp) = {0, 0, 0, lc};
edges[]= {};
edges[]+=newl;
Line(newl) = { pts[0], pts[1] };
edges[]+=newl;
Line(newl) = { pts[1], pts[4] };
edges[]+=newl;
Line(newl) = { pts[4], pts[3]};
edges[]+=newl;
Line(newl) = { pts[3], pts[2] };
edges[]+=newl;
Line(newl) = { pts[2], pts[0]};
edges[]+=newl;
Line(newl) = { pts[4], pts[7]};
edges[]+=newl;
Line(newl) = { pts[7], pts[6]};
edges[]+=newl;
Line(newl) = { pts[6], pts[3]};
edges[]+=newl;
Line(newl) = { pts[3], pts[8]};
edges[]+=newl;
Line(newl) = { pts[8], pts[5]};
edges[]+=newl;
Line(newl) = { pts[5], pts[2]};
ll1 = newll;
Line Loop(newll) = {edges[0], edges[1], edges[2], edges[3], edges[4]};
s1 = news;
Plane Surface(news) = {ll1};
ll2 = newll;
Line Loop(newll) = {edges[5], edges[6], edges[7], -edges[2]};
s2 = news;
Plane Surface(news) = {ll2};
ll3 = newll;
Line Loop(newll) = {edges[8], edges[9], edges[10], -edges[3]};
s3 = news;
Plane Surface(news) = {ll3};
Compound Surface(news) = {s1, s2, s3};
Hide {Surface{s1, s2, s3}; }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: notch1.png
Type: image/png
Size: 18927 bytes
Desc: not available
URL: <http://www.geuz.org/pipermail/gmsh/attachments/20130203/081b9ca7/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: notch1_selectiverefine.png
Type: image/png
Size: 26538 bytes
Desc: not available
URL: <http://www.geuz.org/pipermail/gmsh/attachments/20130203/081b9ca7/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: notch1_lines.png
Type: image/png
Size: 18880 bytes
Desc: not available
URL: <http://www.geuz.org/pipermail/gmsh/attachments/20130203/081b9ca7/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: notch1_lin8.png
Type: image/png
Size: 3980 bytes
Desc: not available
URL: <http://www.geuz.org/pipermail/gmsh/attachments/20130203/081b9ca7/attachment-0003.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: notch1_lin9.png
Type: image/png
Size: 4083 bytes
Desc: not available
URL: <http://www.geuz.org/pipermail/gmsh/attachments/20130203/081b9ca7/attachment-0004.png>