waveguide2D.geo 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. xlength = 2;
  2. ylength = 2;
  3. width = 0.2;
  4. radius = 0.04;
  5. // Decrease this to have a finer mesh in the x-y plane:
  6. lc = 0.02;
  7. Point(1) = {-xlength/2, -width/2, 0, lc};
  8. Point(2) = {xlength/2, -width/2, 0, lc};
  9. Point(3) = {xlength/2, width/2, 0, lc};
  10. Point(4) = {-xlength/2, width/2, 0, lc};
  11. Point(5) = {-width/2, -ylength/2, 0, lc};
  12. Point(6) = {width/2, -ylength/2, 0, lc};
  13. Point(7) = {width/2, ylength/2, 0, lc};
  14. Point(8) = {-width/2, ylength/2, 0, lc};
  15. Point(9) = {-width/2, -width/2, 0, lc};
  16. Point(10) = {width/2, -width/2, 0, lc};
  17. Point(11) = {width/2, width/2, 0, lc};
  18. Point(12) = {-width/2, width/2, 0, lc};
  19. Point(13) = {-radius*0.70710678, -radius*0.70710678, 0, lc};
  20. Point(14) = {radius*0.70710678, -radius*0.70710678, 0, lc};
  21. Point(15) = {radius*0.70710678, radius*0.70710678, 0, lc};
  22. Point(16) = {-radius*0.70710678, radius*0.70710678, 0, lc};
  23. Point(17) = {0, 0, 0, lc};
  24. Line(1) = {4, 1};
  25. Line(2) = {1, 9};
  26. Line(3) = {9, 5};
  27. Line(4) = {5, 6};
  28. Line(5) = {6, 10};
  29. Line(6) = {10, 2};
  30. Line(7) = {2, 3};
  31. Line(8) = {3, 11};
  32. Line(9) = {11, 7};
  33. Line(10) = {7, 8};
  34. Line(11) = {8, 12};
  35. Line(12) = {12, 4};
  36. Line(13) = {9, 10};
  37. Line(14) = {10, 11};
  38. Line(15) = {11, 12};
  39. Line(16) = {12, 9};
  40. Line(17) = {9, 13};
  41. Line(18) = {10, 14};
  42. Line(19) = {11, 15};
  43. Line(20) = {12, 16};
  44. Circle(21) = {13, 17, 16};
  45. Circle(22) = {16, 17, 15};
  46. Circle(23) = {15, 17, 14};
  47. Circle(24) = {14, 17, 13};
  48. Line Loop(25) = {2, -16, 12, 1};
  49. Plane Surface(26) = {25};
  50. Line Loop(27) = {3, 4, 5, -13};
  51. Plane Surface(28) = {27};
  52. Line Loop(29) = {6, 7, 8, -14};
  53. Plane Surface(30) = {29};
  54. Line Loop(31) = {15, -11, -10, -9};
  55. Plane Surface(32) = {31};
  56. Line Loop(33) = {15, 20, 22, -19};
  57. Plane Surface(34) = {33};
  58. Line Loop(35) = {23, -18, 14, 19};
  59. Plane Surface(36) = {35};
  60. Line Loop(37) = {18, 24, -17, 13};
  61. Plane Surface(38) = {37};
  62. Line Loop(39) = {21, -20, 16, 17};
  63. Plane Surface(40) = {39};
  64. Line Loop(41) = {24, 21, 22, 23};
  65. Plane Surface(42) = {41};
  66. Recombine Surface(26);
  67. Recombine Surface(28);
  68. Recombine Surface(30);
  69. Recombine Surface(32);
  70. Recombine Surface(34);
  71. Recombine Surface(36);
  72. Recombine Surface(38);
  73. Recombine Surface(40);
  74. Recombine Surface(42);
  75. Physical Line(1) = {1};
  76. Physical Line(2) = {12, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 21, 24, 23, 22};
  77. Physical Surface(3) = {26, 32, 30, 28, 38, 36, 34, 40};