how do you calculate how much water is in a pipe?
For a pipe use its length instead of height: pipe volume = π * radius² * length , where radius = inner diameter/2 . The volume of a pipe is equal to the volume of a liquid inside (if a pipe is fully filled with it).