[Gmsh] periodic mesh problem

Christophe Geuzaine cgeuzaine at ulg.ac.be
Fri Mar 11 22:13:48 CET 2016


> On 11 Mar 2016, at 17:03, LU Xiaoxin <Xiaoxin.Lu at u-pem.fr> wrote:
> 
> Dear sir,
> 
> I have a problem when I use 'Periodic plane' method to get periodic meshes. It could not work when I have corresponding lines on the boundaries and use 'Line In Surface command' (Surface has intersection with boundary). 
> My code is attached below, could you please give me some ideas about how to creat periodic mesh in this case?
> 

Indeed, embedded lines/surfaces are not yet handled in periodic meshing constraints. You'll have to subdivide your surfaces/volumes "the old way" (i.e. such that the embedded entities are part of the boundary of some other entities).


> PS: I have tried 'extrude' command, but sometimes it did not work well.
> Thank you very much.
> ..............................
> ...................................................................................................
> lc1 = 4;
> lc2 = 3;
> 
> // We proceed by defining some elementary entities describing a cube:
> 
> Point(1) = {0,0,0,lc1};
> Point(2) = {50,0,0,lc1};
> Point(3) = {50,50,0,lc1};
> Point(4) = {0,50,0,lc1};
> Point(5) = {0,0,50,lc1};
> Point(6) = {50,0,50,lc1};
> Point(7) = {50,50,50,lc1};
> Point(8) = {0,50,50,lc1};
> 
>  Point(9)={1.718938e+01,0,0,lc2};
>  Point(10)={4.769079e+01,0,0,lc2};
>   Line(30)={1,9};
>   Line(31)={9,10};
>   Line(32)={10,2};
>  Point(11)={50,3.326221e+01,0,lc2};
>  Point(12)={50,4.166568e+01,0,lc2};
>   Line(33)={2,11};
>   Line(34)={11,12};
>   Line(35)={12,3};
>  Point(13)={4.769079e+01,50,0,lc2};
>  Point(14)={1.718938e+01,50,0,lc2};
>   Line(36)={3,13};
>   Line(37)={13,14};
>   Line(38)={14,4};
>  Point(15)={0,4.166568e+01,0,lc2};
>  Point(16)={0,3.326221e+01,0,lc2};
>   Line(39)={4,15};
>   Line(40)={15,16};
>   Line(41)={16,1};
>  Point(17)={1.718938e+01,0,50,lc2};
>  Point(18)={4.769079e+01,0,50,lc2};
>   Line(42)={5,17};
>   Line(43)={17,18};
>   Line(44)={18,6};
>  Point(19)={50,3.326221e+01,50,lc2};
>  Point(20)={50,4.166568e+01,50,lc2};
>   Line(45)={6,19};
>   Line(46)={19,20};
>   Line(47)={20,7};
>  Point(21)={4.769079e+01,50,50,lc2};
>  Point(22)={1.718938e+01,50,50,lc2};
>   Line(48)={7,21};
>   Line(49)={21,22};
>   Line(50)={22,8};
>  Point(23)={0,4.166568e+01,50,lc2};
>  Point(24)={0,3.326221e+01,50,lc2};
>   Line(51)={8,23};
>   Line(52)={23,24};
>   Line(53)={24,5};
>  Point(25)={0,0,1.923511e+01,lc2};
>   Line(54)={1,25};
>   Line(55)={25,5};
>  Point(26)={50,0,1.923511e+01,lc2};
>   Line(56)={2,26};
>   Line(57)={26,6};
>  Point(27)={50,50,1.923511e+01,lc2};
>   Line(58)={3,27};
>   Line(59)={27,7};
>  Point(28)={0,50,1.923511e+01,lc2};
>   Line(60)={4,28};
>   Line(61)={28,8};
> Line Loop(62)={51,52,53,-55,-54,-41,-40,-39,60,61};
> Plane Surface(14)={62};
> Line Loop(63)={-47,-46,-45,-57,-56,33,34,35,58,59};
> Plane Surface(16)={63};
> Line Loop(64)={51,52,53,42,43,44,45,46,47,48,49,50};
> Plane Surface(18)={64};
> Line Loop(65)={39,40,41,30,31,32,33,34,35,36,37,38};
> Plane Surface(20)={65};
> Line Loop(66)={-55,-54,30,31,32,56,57,-44,-43,-42};
> Plane Surface(22)={66};
> Line Loop(67)={-61,-60,-38,-37,-36,58,59,48,49,50};
> Plane Surface(24)={67};
> Periodic Surface 14{51,52,53,-55,-54,-41,-40,-39,60,61}=16 {-47,-46,-45,-57,-56,33,34,35,58,59};
> Periodic Surface 18{51,52,53,42,43,44,45,46,47,48,49,50}=20 {39,40,41,30,31,32,33,34,35,36,37,38};
> Periodic Surface 22{-55,-54,30,31,32,56,57,-44,-43,-42}=24 {-61,-60,-38,-37,-36,58,59,48,49,50};
> Physical Surface(1)={20};
> Physical Surface(2)={18};
> Physical Surface(3)={22};
> Physical Surface(4)={24};
> Physical Surface(5)={14};
> Physical Surface(6)={16};
> Surface Loop(1)={18,14,22,24,20,16};
> Volume(1)={1};
> Physical Volume(1)={1};
>    //n=1; 
>  Point(5000)={2.346600e+01,3.924900e+01,3.162200e+01,lc2};
>  Point(5001)={1.424700e+01,4.774790e+01,2.338900e+01,lc2};
>  Point(5002)={1.993606e+01,50,1.934264e+01,lc2};
>  Point(5003)={2.843243e+01,50,1.739416e+01,lc2};
>  Point(5004)={3.509900e+01,4.385430e+01,2.334700e+01,lc2};
>   Line(5005)={5000,5001};
>   Line(5006)={5001,5002};
>   Line(5007)={5002,5003};
>   Line(5008)={5003,5004};
>   Line(5009)={5004,5000};
>   Line{5007}  In Surface{24};
> Line Loop(5010)={5005,5006,5007,5008,5009};
> Plane Surface(5011)={5010};
> Physical Surface(11)={5011};
> Surface{5011}  In Volume{1};
>  Point(5012)={1.993606e+01,0,1.934264e+01,lc2};
>  Point(5013)={2.588000e+01,2.353000e+00,1.511500e+01,lc2};
>  Point(5014)={2.843243e+01,0,1.739416e+01,lc2};
>   Line(5015)={5012,5013};
>   Line(5016)={5013,5014};
>   Line(5017)={5014,5012};
>  Line{5017}  In Surface{22};
> Line Loop(5018)={5015,5016,5017};
> Plane Surface(5019)={5018};
> Physical Surface(12)={5019};
> Surface{5019}  In Volume{1};
> ...........................................................................................................................
> best regards,
> Xiaoxin
> _______________________________________________
> gmsh mailing list
> gmsh at onelab.info
> http://onelab.info/mailman/listinfo/gmsh

-- 
Prof. Christophe Geuzaine
University of Liege, Electrical Engineering and Computer Science 
http://www.montefiore.ulg.ac.be/~geuzaine

Tetrahedron V, July 4-5 2016: http://tetrahedron.montefiore.ulg.ac.be
Free software: http://gmsh.info | http://getdp.info | http://onelab.info




More information about the gmsh mailing list