Comparison of buoyancy and surface tension in a square cavity