The width of the well at the bottom is 2.67 mm. and at the top (height, $H$, of 11.43 mm.) is 3.63 mm.
At a height, $H$, the cross section is a square of size $2.67 + (3.63 - 2.67)H/11.43$ mm.
In [1]:
using Polynomials, DataFrames, Gadfly
plen = Poly([2.67, 0.96 / 11.43]) # polynomial representing size of square
Out[1]:
In [2]:
parea = plen * plen
Out[2]:
The volume will be the integral from $0$ to $H$ of parea
In [3]:
pvol = polyint(parea)
Out[3]:
A plot of this function is
In [4]:
H = 0.:0.01:11.43;
d = DataFrame(H=H);
d[:V] = polyval(pvol,d[:H]);
first(d, 6)
Out[4]:
In [5]:
last(d, 6)
Out[5]:
In [6]:
plot(d,x="H",y="V",Geom.line)
Out[6]:
In [7]:
real(roots(pvol - 10.)[1])
Out[7]:
In [8]:
real(roots(pvol -12.)[1])
Out[8]:
In [9]:
real(roots(pvol - 20.)[1])
Out[9]:
The cylindrical wells have a depth of 11.47 mm and a diameter (top/bottom) of 5.0/4.5 mm., corresponding to a radius of 2.5/2.25 mm.
The radius $r$ at a height $H$ will be $2.25 + (0.25)*H/11.47$ mm
In [10]:
pradius = Poly([2.25, (0.25)/(11.47)])
Out[10]:
Just to make sure that I got that right.
In [11]:
polyval(pradius,[0.,11.47])
Out[11]:
In [12]:
parea = π * pradius * pradius
Out[12]:
In [13]:
polyval(parea,[0.,11.47])
Out[13]:
In [14]:
pvol = polyint(parea)
Out[14]:
In [15]:
H = collect(0.:0.01:12.);
In [16]:
plot(x=H,y=polyval(pvol,H),Geom.line,
Guide.XLabel("Height above well bottom (mm)"),
Guide.YLabel("Volume (cubic mm)"))
Out[16]:
In [17]:
real(roots(pvol - 50.)[1])
Out[17]:
In [18]:
real(roots(pvol - 100.)[1])
Out[18]:
In [19]:
real(roots(pvol - 150.)[1])
Out[19]:
As a table
In [21]:
H = 0.0:0.1:12.0;
[H polyval(pvol,H)]
Out[21]: