[Gmsh] Help with making a volume mesh

Brian Drawert brian at drawert.net
Sat Jan 30 18:20:00 CET 2016


Hi Vincent,
Thank you so much for you help.  It was very educational, and I was able to complete my mesh.

Thanks,
  Brian

> On Jan 30, 2016, at 6:08 AM, Vincent Huber <vincent.huber at cemosis.fr> wrote:
> 
> Hello Brian,
> 
> It is not crystal clear to me what you want to do.
> But you’ll find in the following a working geometry (with comments).
> By the way, I guess the wrong command on your code is the Layers in the extrude section.
> Last remark: I think it is easier to construct the first 2 volumes (say on the left) and then make the symmetry.
> 
> I’m pretty sure you will reach your goal with that.
> 
> mcl = 0.25;
> // You should consider using p1 = newp; Point (p1) = ...; p2 = newp .... That helps a lot !
> Point(1000) = {9.40, 5.5, 0, mcl};
> Point(1003) = {9.40, 6.6, 0, mcl};
> Point(1004) = {8.68, 6.6, 0, mcl};
> Point(1005) = {7.91, 5.5, 0, mcl};
> Point(1006) = {8.25, 6.6, 0, mcl};
> Point(1007) = {7.83, 6.6, 0, mcl};
> Point(1008) = {7.39, 6.6, 0, mcl};
> Point(1009) = {6.84, 6.6, 0, mcl};
> Point(1010) = {5.97, 6.6, 0, mcl};
> Point(1011) = {4.89, 6.6, 0, mcl};
> Point(1012) = {3.71, 6.6, 0, mcl};
> Point(1013) = {3.43, 6.0, 0, mcl};
> Point(1014) = {4.05, 5.5, 0, mcl};
> Point(1015) = {5.45, 5.5, 0, mcl};
> Point(1016) = {6.1, 5.5, 0, mcl};
> Point(1017) = {6.93, 5.5, 0, mcl};
> Point(1018) = {7.20, 5.5, 0, mcl};
> Point(1019) = {7.52, 5.5, 0, mcl};
> Point(1020) = {8.5, 5.5, 0, mcl};
> Point(1021) = {9.4, 1.82, 0, mcl};
> Point(1022) = {6.12, 2.27, 0, mcl};
> Point(1023) = {3.22, 3.63, 0, mcl};
> Point(1024) = {2.02, 6.11, 0, mcl};
> Point(1025) = {3.15, 8.27, 0, mcl};
> Point(1026) = {5.5, 9.0, 0, mcl};
> Point(1027) = {8.2, 9.5, 0, mcl};
> Point(1028) = {9.4, 9.75, 0, mcl};
> 
> // Idem here: l1 = newl; Line (l1) = ....
> // First outer line
> Line(1036) = {1003, 1004};
> Spline(1037) = {1004, 1006, 1007, 1008, 1009};
> Spline(1038) = {1009, 1010, 1011, 1012, 1013, 1014, 1015, 1016};
> Line(1039) = {1016, 1017};
> Line(1040) = {1017, 1018};
> Spline(1041) = {1018, 1019, 1005, 1020};
> Line(1042) = {1020, 1000};
> 
> //Second outer line
> // I'll write FirstLL[] += newl; Spline(FirstLL[#FirstLL[]-1]) = ....
> Spline(1030) = {1021, 1022, 1023, 1024, 1025, 1026};
> Spline(1031) = {1026, 1027, 1028};
> 
> // Actually, we should duplicates contour by contour to let us write
> // ll1 = newll; Line Loop(ll1) = {FirstLL[], ll1[]};
> ll[] += Symmetry {1.0, 0.0, 0.0, -9.4} { Duplicata{Line{1031,1030,1036,1037,1038,1039,1040,1041,1042};} };
> For i In {0:#ll[]-1}
>   Printf("ll[%g] = %g",i,ll[i]);
> EndFor
> 
> ll1 = newll; Line Loop(ll1) = {1030,1031,-1043,-1044};
> ll2 = newll; Line Loop(ll2) = {1036,1037,1038,1039,1040,1041,1042,-1051,-1050,-1049,-1048,-1047,-1046,-1045};
> 
> // Only two surfaces
> // If you want 4 (to produce 4 volumes) you only have to modify the upper line loops)
> s1 = news; Plane Surface(s1) = {ll1,-ll2};
> s2 = news; Plane Surface(s2) = {ll2};
> 
> // one extrusion to produce two volumes.
> Extrude {0, 0, 10} {
>   Surface{s1,s2};
>   Layers{10};
>   Recombine;
> }
> All the best,
> 
> VH
> 
> 
> 2016-01-29 21:00 GMT+01:00 Brian Drawert <brian at drawert.net <mailto:brian at drawert.net>>:
> Hi Gmsh mailing list,
> 
> I am kinda new to Gmsh, and have yet to find a good resource to answer my questions.  I am hoping that someone on the list can help me.
> 
> I have attached a mesh.  It it, I am making a mesh that have 4 volumes, and is symmetric along the YZ plane, and uniform along the z-axis.  On each side, there is an inner volume that inside the outer volume.  I am drawing the points along the left z=0 surface, mirroring to the right side, then extruding the surfaces to make the volumes.  However, when try to mesh with a 3D mesh, I get lots of errors about “Could not find extruded vertex” (41 errors), and I am not extruding the right side.  When this is done the mesh looks unphysical (see attached screenshot v2.11 on OSX).
> 
> I also tried to make this mesh using a surface loop, but I was unable to figure out how to use translate or symmetry to duplicate a line loop, so I could not make a complete surface.
> 
> Any assistance or pointers to where I might find documentation on how to compete this process would be greatly appreciated.
> 
> Thanks,
>   Brian
> 
> 
> 
> 
> 
> 
> _______________________________________________
> gmsh mailing list
> gmsh at onelab.info <mailto:gmsh at onelab.info>
> http://onelab.info/mailman/listinfo/gmsh <http://onelab.info/mailman/listinfo/gmsh>
> 
> 
> 
> 
> -- 
> Docteur Ingénieur de recherche
> CeMoSiS <http://www.cemosis.fr/> - vincent.huber at cemosis.fr <mailto:vincent.huber at cemosis.fr>
> Tel: +33 (0)3 68 85 02 06
> IRMA - 7, rue René Descartes
> 67 000 Strasbourg
> 
> 
> _______________________________________________
> gmsh mailing list
> gmsh at onelab.info
> http://onelab.info/mailman/listinfo/gmsh

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://onelab.info/pipermail/gmsh/attachments/20160130/f7a37436/attachment-0001.html>


More information about the gmsh mailing list