Pipe is generally cylindrical and the dimension refers to the inside diameter. One cubic foot contains 7.48 gallons. The volume of a one foot long 20" diameter pipe is: pi(1.667/2)^2 = 2.18 cubic...
1 gallon = 231 cubic inches Volume of the 1-foot cylinder = pi R2 L = pi (7)2 (12) = 1,847.26 cubic inches = 7.997 gallons (rounded) That's 0.4 ounce less than 8 gallons, per foot.