how to calculate mass of water in a cylinder