Integrate with Units
Calculate the diameter needed to empty a conical tank with a known coefficient of discharge.
area = Integrate[Boole[x ^ 2 + y ^ 2 ≤ ((d0 / 2) + ((d1 - d0) / (2 * h0)) * h) ^ 2], {x, -Infinity, Infinity}, {y, -Infinity, Infinity}, Assumptions -> {d0 > 0, d1 > d0, h > 0, h0 > 0}];
rules = Rationalize[{cd -> 0.6, g -> UnitConvert[Quantity["earth gravity"]], d0 -> Quantity[1.22, "Meters"], d1 -> Quantity[ 2.44, "Meters"], h0 -> Quantity[3.05, "Meters"]}, 0];lhs = Integrate[(area / Sqrt[2 * g * h]) /. rules, {h, Quantity[0, "Meters"], Quantity[3.05, "Meters"]}];
rhs = Integrate[(cd * (Pi * d ^ 2) / 4), {t, 0, Quantity[360, "Seconds"]}] /. rules;radius = QuantityMagnitude[d /. First[Solve[{lhs == rhs, d > 0}, d]]];RegionPlot3D[x ^ 2 + y ^ 2 ≤ (1.22 / 2) + (2.44 / (2 * 3.05)) * z && (x ^ 2 + y ^ 2 ≥ radius / 2 || z > 1), {x, -2, 2}, {y, -2, 2}, {z, 0, 3.05}, PlotPoints -> 25, ViewPoint -> {1.3, -2.4, 2.}, PlotLabel -> Style[Row[{TraditionalForm[d], Quantity[radius, "Meters"]}, "="], FontFamily -> "Verdana"], ViewPoint -> {-2.2, -0.9, -2.3}, ViewVertical -> {-.87, -.39, -0.29}, PlotStyle -> Directive[Specularity[White, 40], Orange], Mesh -> None]