[Gmsh] Hexagonal Unit Cell
Philipp Metsch
philipp.metsch at tu-dresden.de
Mon Jun 11 14:24:28 CEST 2018
Hi,
I am using the following .geo-file to generate a hexagonal unit cell in
Gmsh. Unfortunately, the program always tells me that "edges from
different entitites share vertices" and I should "create a finer mesh"
when I am trying to mesh with quadratic elements. Refining the mesh by,
e.g., splitting does not help. Does somebody know what to do?
Thanks,Philipp
// Gmsh project created on Fri Apr 27 14:00:00
2018SetFactory("OpenCASCADE");Geometry.Tolerance=1e-12;
// Particle Radius and Distance:r=2;d=5;
// Derived Lengthsa=d;b=Sqrt(3)*d;h=d/(2*Sqrt(3));c=Sqrt(8/3)*d;
// Initial Entities:Box(1) = {-a/2, -b/2, 0, a, b, c};Sphere(2) = {0,
0, 0, r};Sphere(3) = {a/2, -b/2, 0, r};Sphere(4) = {a/2, b/2, 0,
r};Sphere(5) = {-a/2, b/2, 0, r};Sphere(6) = {-a/2, -b/2, 0,
r};Sphere(7) = {a/2, -h, c/2, r};Sphere(8) = {0, b/2-h, c/2,
r};Sphere(9) = {-a/2, -h, c/2, r};Sphere(10) = {0, 0, c, r};Sphere(11)
= {a/2, -b/2, c, r};Sphere(12) = {a/2, b/2, c, r};Sphere(13) = {-a/2,
b/2, c, r};Sphere(14) = {-a/2, -b/2, c, r};Sphere(15) = {0, -b/2-h,
c/2, r};
// Boolean Operations:nInc=14;Inclusions[]=BooleanIntersection{
Volume{1}; }{ Volume{ 2,3,4,5,6,7,8,9,10,11,12,13,14,15};
Delete;};Matrix[]=BooleanDifference{ Volume{ 1 }; Delete; }{
Volume{Inclusions[]}; };Coherence;
// Identify Boundary:Bnd[]=Abs(CombinedBoundary{ Volume{Matrix[]};
Volume{Inclusions[]}; });
// Physical Entities for MaterialsPhysical Volume("Material 1",1) = {
Matrix[] };Physical Volume("Material 2",2) = { Inclusions[] };Physical
Surface("Boundary",3) = { Bnd[] };
// Periodicity:Periodic Surface 13 { 13, 50, 24, 51, 31, 52, 38, 48,
53, 54 } = 1 { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };Periodic Surface 35 {
53, 54 } = 37 { 9, 10 };Periodic Surface 44 { 83, 84, 51 } = 45 { 85,
86, 4 };Periodic Surface 28 { 52, 72, 71 } = 29 { 6, 74, 73 };Periodic
Surface 25 { 68, 48, 69 } = 32 { 76, 8, 77 };Periodic Surface 40 { 79,
81, 50 } = 48 { 88, 89, 2 };
Periodic Surface 6 { 29, 30, 31, 32, 22, 28, 5, 33, 34 } = 2 { 11, 12,
13, 14, 15, 16, 1, 17, 18 };Periodic Surface 36 { 34 } = 51 { 18
};Periodic Surface 47 { 28, 87, 86 } = 49 { 16, 90, 88 };Periodic
Surface 30 { 75, 33, 73 } = 33 { 78, 17, 76 };Periodic Surface 26 { 70,
71, 30 } = 23 { 67, 68, 12 };Periodic Surface 43 { 84, 82, 32 } = 39 {
79, 80, 14 };
Periodic Surface 4 { 3, 21, 22, 23, 24, 25, 15, 19, 26 } = 8 { 7, 35,
29, 37, 38, 39, 11, 40, 41 };Periodic Surface 38 { 26 } = 22 { 41
};Periodic Surface 42 { 82, 83, 23 } = 27 { 70, 72, 37 };Periodic
Surface 41 { 25, 80, 81 } = 24 { 39, 67, 69 };Periodic Surface 50 { 89,
19, 90 } = 34 { 77, 40, 78 };Periodic Surface 46 { 85, 87, 21 } = 31 {
74, 75, 35 };
// Mesh OptionsMesh.ElementOrder=2;Mesh.Algorithm=5;
// Mesh Density:curPt=newp-1;Characteristic Length { 1:curPt } = 0.4;
Mesh 3;Coherence Mesh;
--
Dipl.-Ing. Philipp Metsch
Technische Universität Dresden
Fakultät Maschinenwesen
Institut für Festkörpermechanik
Professur für Numerische und Experimentelle Festkörpermechanik
01062 Dresden
Tel.: +49 (351) 463-33284
Fax: +49 (351) 463-37061
E-Mail: Philipp.Metsch at tu-dresden.de
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://onelab.info/pipermail/gmsh/attachments/20180611/bdec6939/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 6568 bytes
Desc: not available
URL: <http://onelab.info/pipermail/gmsh/attachments/20180611/bdec6939/attachment.p7s>
More information about the gmsh
mailing list