calc_bulk_density function

Calculate the bulk density