Width of Cylinder 1:

Width of Cylinder 2:

Height of Cylinder 1:

Height of Cylinder 2:

Starting Water Level:

Starting Water Level:

Turn on Water

Reset

swlevel2 = 0
width2 = 2
Fill = 0 (slider from 0 to MaxWater, step 0.001)
swlevel1 = 0
width1 = 1
inputBox1 = Textfield(width1)
height1 = 5
height2 = 5
inputBox2 = Textfield(width2)
inputBox3 = Textfield(height1)
inputBox4 = Textfield(height2)
A1 = (0, 0)
c1base: ((x - width1 / 2 + x(A1)) / (width1 / 2))^(2) + (y / (width1 / 4))^(2) = 1
c1top: ((x - width1 / 2 + x(A1)) / (width1 / 2))^(2) + ((y - height1) / (width1 / 4))^(2) = 1
polyc1edge, a1, a, b, c_1 = Polygon(A1, (x(A1) + width1, y(A1)), (x(A1) + width1, y(A1) + height1), (x(A1), y(A1) + height1))
TapWater = 1500
wheight1: Fill / ((π * (width1 / 2)^(2))) + swlevel1
polyc1water, a1_1, d, e, f = Polygon(A1, (x(A1) + width1, y(A1)), (x(A1) + width1, y(A1) + wheight1), (x(A1), y(A1) + wheight1))
polyc1full, a1_2, g, h, i = Polygon(A1, (x(A1) + width1, y(A1)), (x(A1) + width1, y(A1) + height1), (x(A1), y(A1) + height1))
c1watertop: ((x - width1 / 2 + x(A1)) / (width1 / 2))^(2) + ((y - wheight1) / (width1 / 4))^(2) = 1
c1watertopedge: ((x - width1 / 2 + x(A1)) / (width1 / 2))^(2) + ((y - wheight1) / (width1 / 4))^(2) = 1
c1waterfull: ((x - width1 / 2 + x(A1)) / (width1 / 2))^(2) + ((y - height1) / (width1 / 4))^(2) = 1
c1waterbase: ((x - width1 / 2 + x(A1)) / (width1 / 2))^(2) + (y / (width1 / 4))^(2) = 1
G2A: (Fill, wheight1)
A2: (x(A1) + width1 + 1, 0)
c2base: ((x - width2 / 2 - x(A2)) / (width2 / 2))^(2) + (y / (width2 / 4))^(2) = 1
c2top: ((x - width2 / 2 - x(A2)) / (width2 / 2))^(2) + ((y - height2) / (width2 / 4))^(2) = 1
polyc2edge, a2, j, k, l = Polygon(A2, (x(A2) + width2, y(A2)), (x(A2) + width2, y(A2) + height2), (x(A2), y(A2) + height2))
wheight2: Fill / ((π * (width2 / 2)^(2))) + swlevel2
polyc2full, a2_1, m, n, p = Polygon(A2, (x(A2) + width2, y(A2)), (x(A2) + width2, y(A2) + height2), (x(A2), y(A2) + height2))
polyc2water, a2_2, q, r, s = Polygon(A2, (x(A2) + width2, y(A2)), (x(A2) + width2, y(A2) + wheight2), (x(A2), y(A2) + wheight2))
c2waterfull: ((x - width2 / 2 - x(A2)) / (width2 / 2))^(2) + ((y - height2) / (width2 / 4))^(2) = 1
c2watertop: ((x - width2 / 2 - x(A2)) / (width2 / 2))^(2) + ((y - wheight2) / (width2 / 4))^(2) = 1
c2waterbase: ((x - width2 / 2 - x(A2)) / (width2 / 2))^(2) + (y / (width2 / 4))^(2) = 1
c2watertopedge: ((x - width2 / 2 - x(A2)) / (width2 / 2))^(2) + ((y - wheight2) / (width2 / 4))^(2) = 1
G2B: (Fill, wheight2)
inputBox6 = Textfield(swlevel1)
inputBox7 = Textfield(swlevel2)
MaxWater = Max(((π * (width1 / 2)^(2)) * height1) - ((π * (width1 / 2)^(2)) * swlevel1), ((π * (width2 / 2)^(2)) * height2) - ((π * (width2 / 2)^(2)) * swlevel2))