On the relationship between coronal heating, magnetic flux, and the density of the solar wind