rring=5.0e-2;
rcore=1.0e-2;
rcoil=1.1e-2;
lc = 5e-4;

odia = (rring+rcoil)*1.1;
Point(12) = {1.1*odia,0,0,lc*8};
Point(14) = {0,1.1*odia,0,lc*8};
Point(15) = {0,0,0,lc*8};

Circle(12) = {12,15,14};

Point(16) = {0,odia,0,lc*4};
Point(17) = {odia,0,0,lc*4};

Circle(14) = {17,15,16};

Line(19) = {17,12};
Line(20) = {16,14};

Point(106) = {0,-odia,0,lc*4};
Point(107) = {0,-1.1*odia,0,lc*4};

Line(61) = {106,107};
Circle(62) = {106,15,17};
Circle(63) = {107,15,12};

Line(64) = {16,15};
Line(65) = {15,106};



//this is the torus
Point(108) = {rring,0,0,lc};
Point(109) = {rring+rcore,0,0,lc};
Point(110) = {rring-rcore,0,0,lc};
Point(111) = {rring,rcore,0,lc};
Point(112) = {rring,-rcore,0,lc};
Point(113) = {rring,-rcoil,0,lc};
Point(114) = {rring,+rcoil,0,lc};
Point(116) = {rring+rcoil,0,0,lc};
Point(117) = {rring-rcoil,0,0,lc};
Circle(201) = {109,108,111};
Circle(202) = {111,108,110};
Circle(203) = {110,108,112};
Circle(204) = {112,108,109};

Line Loop(205) = {202,203,204,201};
Plane Surface(206) = {205};

//this is the coil wound around the torus
Circle(301) = {116,108,114};
Circle(302) = {114,108,117};
Circle(303) = {117,108,113};
Circle(304) = {113,108,116};
Line Loop(305) = {301,302,303,304};
Plane Surface(306) = {305,205};


Line Loop(66) = {12,-20,-14,19};
Plane Surface(67) = {66};
Line Loop(68) = {19,-63,-61,62};
Plane Surface(69) = {68};
Line Loop(70) = {64,65,62,14};
Plane Surface(71) = {70,305};

Physical Surface(1000) =  {67,69};//AirInf
Physical Surface(2000) =  {71}; //Air
Physical Line(3000) = { 20,61,64,65}; // Axis
Physical Surface(4000) =  {206}; //core
Physical Surface(5000) =  {306}; //coil


