de =  16.000 ;              // Electrode Spacing
re =   2*0.3048 /2 * Cos[0] ; // Radius of the electrode
le =  Sqrt[3]*de/2 ;        // Offset Spacing

i = 0;

p0 = 0.2 /  5 ;

/* defining the points */

x = re;
y =  0;
i = i+1;
Point(i)  = {x,y,0,p0};

x = de-re;
y =  0;
i = i+1;
Point(i)  = {x,y,0,p0};

x = de-re*Cos[Pi/3];
y =   +re*Sin[Pi/3];
i = i+1;
Point(i)  = {x,y,0,p0};


x = de/2 + re*Cos[Pi/3];
y =   le - re*Sin[Pi/3];
i = i+1;
Point(i)  = {x,y,0,p0};

x = de/2 - re*Cos[Pi/3];
y =   le - re*Sin[Pi/3];
i = i+1;
Point(i)  = {x,y,0,p0};

x = re*Cos[Pi/3];
y = re*Sin[Pi/3];
i = i+1;
Point(i)  = {x,y,0,p0};

x = 0;
y = 0;
i = i+1;
Point(i)  = {x,y,0,p0};

x = de;
y = 0;
i = i+1;
Point(i)  = {x,y,0,p0};

x = de/2;
y = le;
i = i+1;
Point(i)  = {x,y,0,p0};

// Define the centre extraction well - 5 Points
   x = de/2-re;
   y = 0;
   i = i+1;
   Point(i)  = {x,y,0,p0};

   x = de/2+re;
   y = 0;
   i = i+1;
   Point(i)  = {x,y,0,p0};

   x = de/2;
   y = 0;
   i = i+1;
   Point(i)  = {x,y,0,p0};


/* defining the lines */

Line(1) = {1, 10};
Line(2) = {11, 2};
Line(3) = {3, 4};
Line(4) = {5, 6};

Circle(5) = { 6,  7,  1};
Circle(6) = {11, 12, 10};
Circle(7) = { 2,  8,  3};
Circle(8) = { 4,  9,  5};

Line Loop(9) = {8, 4, 5, 1, -6, 2, 7, 3};
Plane Surface(10) = {9};

// The Oil Sands
   Physical Surface(101) = { 10 }; // Oil Sands

// Counter Clockwise boundaries of the tri element
   Physical Line(102) = { 4 };        // Side A to B
   Physical Line(103) = { 1, 6, 2 }; // Side B to C
   Physical Line(104) = { 3 };        // Side C to A

// Boundaries defining the electrode wells
   Physical Line(105) = { -8 }; // Electrode A
   Physical Line(106) = { 5 }; // Electrode B
   Physical Line(107) = { 7 }; // Electrode C

// Boundaries defining the extraction wells
   Physical Line(108) = { -6 }; // X-Well


Characteristic Length {6, 1, 10, 11, 2, 3, 4, 5} = 0.15;
