/** * Trevor P. Irons, XRI Geophysics, LLC * Test of Coloumbic Magnetic Potential */ lc = 1e-2; // Target element size R = .05; // Magnet Radius D0 = 10; // Top of magnet D1 = 11; // Bottom of magnet // Total Solution Space X0 = -2.; X1 = 2.; Y0 = -2.; Y1 = 2.; Z0 = 9.; Z1 = 12.; //////////////////////////////////// // North Pole /* Point(0) = { 0, 0, D0, lc}; Point(1) = { R, 0, D0, lc}; Point(2) = { 0, R, D0, lc}; Point(3) = {-R, 0, D0, lc}; // Connect up the points Circle(4) = {1, 0, 3}; Line(5) = {3,1}; Line Loop(6) = {4,5}; Plane Surface(7) = {6}; */ //////////////////////////////////// // South Pole Point(8) = { 0, -0.0001, D0, lc}; Point(9) = { R, -0.0001, D0, lc}; Point(10) = { 0, -R, D0, lc}; Point(11) = {-R, -0.0001, D0, lc}; // Connect up the points Circle(12) = {11, 8, 9}; Line(13) = {9, 11}; Line Loop(14) = {12, 13}; Plane Surface(15) = {14}; ////////////////////////////////////// // Extrude magnet //Extrude {0, 0, D1-D0} { Surface{7}; } Extrude {0, 0, D1-D0} { Surface{15}; } /* // Large Bounding box Point(116) = {X0, Y0, Z0}; Point(117) = {X1, Y0, Z0}; Point(118) = {X1, Y1, Z0}; Point(119) = {X0, Y1, Z0}; Line(120) = {116,117}; Line(121) = {117,118}; Line(122) = {118,119}; Line(123) = {119,116}; Line Loop(124) = {120, 121, 122, 123}; Plane Surface(125) = {124}; Extrude {0, 0, Z1-Z0} { Surface{125}; } */ ////////////////////////////////////// // Volumes Physical Volume("plus") = {2}; Physical Volume("minus") = {1}; //Physical Volume("background") = {3};