-
Notifications
You must be signed in to change notification settings - Fork 0
/
PBG.geo
60 lines (60 loc) · 2.2 KB
/
PBG.geo
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
// Gmsh project created on Tue Jul 26 15:40:16 2022
SetFactory("OpenCASCADE");
//+
Point(1) = {0, 0, 0, 0.25};
//+
Circle(1) = {0, 0, 0, 54, 0, 2*Pi};
//+
Circle(2) = {0, 0, 0, 50, 0, 2*Pi};
//+
Pitch=10;
R=3;
//Ring1
x1={1,0.5,-0.5,-1,-0.5,0.5};
y1={0,0.866025403784439,0.866025403784439,0,-0.866025403784439,-0.866025403784439};
For i In {1:6}
Circle(i+2) = {Pitch*x1[i-1], Pitch*y1[i-1], 0, R, 0, 2*Pi};
EndFor
//Ring2
x2={2,1.5,1,0,-1,-1.5,-2,-1.5,-1,0,1,1.5};
y2={0,0.866025403784439,1.732050807568877,1.732050807568877,1.732050807568877,0.866025403784439,0,-0.866025403784439,-1.732050807568877,-1.732050807568877,-1.732050807568877,-0.866025403784439};
For i In {1:12}
Circle(i+8) = {Pitch*x2[i-1], Pitch*y2[i-1], 0, R, 0, 2*Pi};
EndFor
//Ring3
x3={3,2.5,2,1.5,0.5,-0.5,-1.5,-2,-2.5,-3,-2.5,-2,-1.5,-0.5,0.5,1.5,2,2.5};
y3={0,0.866025403784439,1.732050807568877,2.598076211353316,2.598076211353316,2.598076211353316,2.598076211353316,1.732050807568877,0.866025403784439,0,-0.866025403784439,-1.732050807568877,-2.598076211353316,-2.598076211353316,-2.598076211353316,-2.598076211353316,-1.732050807568877,-0.866025403784439};
For i In {1:18}
Circle(i+20) = {Pitch*x3[i-1], Pitch*y3[i-1], 0, R, 0, 2*Pi};
EndFor
//Ring4
x4={4.0,3.5,3.0,2.5,2.0,1.0,0.0,-1.0,-2.0,-2.5,-3.0,-3.5,-4.0,-3.5,-3.0,-2.5,-2.0,-1.0,0.0,1.0,2.0,2.5,3.0,3.5};
y4={0.0,0.866025,1.73205,2.59808,3.4641,3.4641,3.4641,3.4641,3.4641,2.59808,1.73205,0.866025,0.0,-0.866025,-1.73205,-2.59808,-3.4641,-3.4641,-3.4641,-3.4641,-3.4641,-2.59808,-1.73205,-0.866025};
For i In {1:24}
Circle(i+38) = {Pitch*x4[i-1], Pitch*y4[i-1], 0, R, 0, 2*Pi};
EndFor
//+
For i In {1:62}
Curve Loop(i) = {i};
EndFor
//+
Plane Surface(1) = {2:62};
Physical Surface("Cladding", 1) = {1};
Transfinite Curve {1} = 421 Using Progression 1;
Plane Surface(2) = {1,2};
Physical Surface("PML", 2) = {2};
Transfinite Curve {2} = 321 Using Progression 1;
For i In {3:62}
Plane Surface(i) = {i};
Transfinite Curve {i} = 37 Using Progression 1;
EndFor
Physical Surface("DopedInclusion", 3) = {3:62};
//+
Physical Curve("Edge", 1) = {1};
//+
Physical Point("Edge", 1) = {2};
//+
Physical Point("Center", 2) = {1};
//+
Point{1} In Surface{1};
//+