If the fill level is h, so the weighted average of the mass is at h/2,then
E = m * g * h / 2
m = V * r
V = A * h
E = A * r * g * h^2 / 2
m2 * kg/m3 * m/s2 * m2 = kg m2 / s2 = J