Dip-Stick Problem
This was a difficult problem to solve
Of course you have to assume the tank is level.
This is d1.nb1
a1
Enter Diameter of Tank => 4 feet
a2
Enter # of Gallons it holds => 3000 Gallons
a3
Enter # of inches on the Dip-Stick => 22 inches
This is d3.nb1
01
r = (a1/2) => Diameter to Radius
02
x = a3/12 => inches to feet
03
b1 = a2/7.48 => Gallons to Cubic Feet
04
b2 = Math.pow(r,2) => r Squared = r*r
05
b3 = 3.14159 => Pi = 3.14159
06
b4 = b2*b3 => Solving for length of tank
07
b5 = b1/b4 => Lenth of Tank in Feet
08
b6 = (r/1 - x/1) => one side of triangle
09
b7 = r*r/1 - b6*b6 => Pythagorean Theorem
10
b8 = Math.pow(b7,.5) => Other side of triangle
11
b9 = b8/b6 => Tangent of the angle
12
b10 = Math.atan(b9) => Calculate angle b10 = Math.atan(b9);
13
b11 = 2*b10 => Calculate circle angle
14
b12 = Math.sin(b11) => Get sin of the angle
15
b13 = (b11/1 - b12/1)/2 => part of formula
16
b14 = b13*r*r;
17
b15 = b5*b14 => Part of formula
18
b16 = b15*7.48 => Convert to Gallons
19
c3 = Reference # => input inches minus middle point
20
b17 = a2/2 - b16/1 => middle point minus input inches
21
b18 = a2/2 + b17/1 => Total Gallons => middle point plus difference
22
23
24
Let A = Angle
Let R = Radius
Formula:
Area = (((A - Sin(A))/2)*R*R