123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100 |
- /**
- * Trevor P. Irons, XRI Geophysics, LLC
- * Test of Coloumbic Magnetic Potential
- */
-
- lc = .01; // Target element size
- R = .25; // Magnet Radius
- D0 = 10; // Top of magnet
- D1 = 11; // Bottom of magnet
-
- // Total Solution Space
- X0 = -1.;
- X1 = 1.;
- Y0 = -1.;
- Y1 = 1.;
- Z0 = 9.5;
- Z1 = 11.5;
-
- ////////////////////////////////////
- // North Pole
- p = newp;
- dd = 5;
- d = lc/(1*dd);
- Point(p) = { 0, 0, D0, lc/dd};
- Point(p+1) = { R, d, D0, lc/dd};
- Point(p+2) = { R, -d, D0, lc/dd};
- Point(p+3) = {-R, d, D0, lc/dd};
- Point(p+4) = {-R, -d, D0, lc/dd};
-
- // Connect up the points
- c = newc;
- Circle(c) = {p+3, p, p+1};
-
- c2 = newc;
- Circle(c2) = {p+4, p, p+2};
-
- ss = news;
- ss = Extrude {0, 0, D1-D0} { Line{c}; };
-
- ss2 = news;
- ss2 = Extrude {0, 0, D1-D0} { Line{c2}; };
-
-
- //Symmetry { 1.0, 1.0, 1.0, 0.0 }{Duplicata{Surface{ss[1]};}}
- //lcs = newl;
- //lcs = Symmetry { 0.0, 0.0,.0001, 0.0 }{Duplicata{Line{c};}};
- //lcs =
- //Symmetry { 0.0, 1.0, 0.0, 0.0 }{Duplicata{Line{c};}}
-
- //Symmetry {0, 0, 120, 0} {
- // Duplicata{Surface{ss[1]};}
- //}
-
-
-
-
- //ss2 = news;
- //ss = Extrude {0, 0, D1-D0} { Line{c, lcs}; };
- //ss2 = Extrude {0, 0, D1-D0} { Line{l, lcs}; };
-
- //Symmetry {1,0,0,0}{ Duplicata{Surface{ss[1]};}};
- //Symmetry{ expression-list }{ transform-list }:
-
- //ss2 = news;
- //ss2 = Extrude {0, 0, D1-D0} { Line{c2, l2}; };
-
- /////////////////////////////////////
- // Large Bounding box
- pp = newp;
- Point(pp) = {X0, Y0, Z0, lc};
- Point(pp+1) = {X1, Y0, Z0, lc};
- Point(pp+2) = {X1, Y1, Z0, lc};
- Point(pp+3) = {X0, Y1, Z0, lc};
-
-
- lv = newl;
- Line(lv) = {pp,pp+1};
- Line(lv+1) = {pp+1,pp+2};
- Line(lv+2) = {pp+2,pp+3};
- Line(lv+3) = {pp+3,pp};
- Line Loop(lv+4) = {lv, lv+1, lv+2, lv+3};
-
- // Hard coded doom
- Plane Surface(125) = {lv+4};
-
- //v = newv;
- v[] = Extrude {0, 0, Z1-Z0} { Surface{125}; };
-
- Surface{ss[1]} In Volume{v[1]};
- Surface{ss2[1]} In Volume{v[1]};
-
- Physical Volume(1) = {v[1]};
-
- //Physical Volume("minus") = {1};
- //Physical Volume("background") = {3};
- //Coherence;
-
- //Coherence;
-
- //Mesh.RecombineAll = 1;
|