Mythbusters made a lead balloon and I wanted to reproduce it.
using Unitful
using GeometryBasics
using PeriodicTable
using PhysicalConstants.CODATA2018: g_n
struct Shell
inner
thickness
end
struct Object
shape
material
end
GeometryBasics.volume(s::Sphere) = (4/3)ฯ * s.r^3
GeometryBasics.volume(s::Shell) = volume(Sphere(p0, s.inner.r + s.thickness)) - volume(s.inner)
buoyancy(x::Object) = volume(x.shape) * x.material.density * g_n
p0 = Point(0.0u"m", 0.0u"m", 0.0u"m")
radius = 2u"m"
thickness = .0007u"inch"
substance = elements["lead"]
fluid = elements["helium"]
balloon = Object(Shell(Sphere(p0, radius), thickness), substance)
interior = Object(balloon.shape.inner, fluid)
upreferred.([buoyancy(balloon), buoyancy(interior)])
julia> upreferred.([buoyancy(balloon), buoyancy(interior)])
2-element Array{Quantity{Float64,๐ ๐ ๐^-2,Unitful.FreeUnits{(kg, m, s^-2),๐ ๐ ๐^-2,nothing}},1}:
99.38920184883817 kg m s^-2
58692.24563097477 kg m s^-2
I thought these two numbers would be the net force on the balloon and the contents, respectively, and that they would be similar. What did I do wrong?