There are a number of situations where the length of a pipe must be determined by means other than just measuring it with a ruler or tape measure. One is when the pipe is buried or submerged for much of its length, or otherwise inaccessible. Another might be that the pipe is too long for classic measurement means. It is possible to calculate pipe length by using other related measurements in either of these two scenarios.
Internal volume method
Define the pipe line in question. In this example, a butt-welded 1-inch Schedule 40 steel water pipeline of unknown length is run throughout an industrial facility. If it takes 9.24-gallons of water to completely fill the pipeline from empty, you can calculate pipe length.
Calculate the volume of one foot of 1-inch Schedule 40 steel pipe. Published data shows that the internal diameter is 1.05-inches. Using the volume formula for cylinders, V= (diameter/2)^2 X pi X length X 7.48 gallons/cubic foot. Substituting terms V = (1.05/2) ^squared X 3.1416 X 12 = 0.0449788-gallons/foot of pipe.
Calculate the length of the pipe by dividing its 9.24-gallon internal volume by 0.0449788-gallons/foot of pipe to yield 205.43-feet. Since the pipe is butt-welded from the outside, there are no fittings or intrusions to affect this volume, and the pipe can be considered uniformly smooth on the inside, and the 205.43-foot length accurate.
Flow Head-Loss Method
Define the pipe line in question. Using the same case as Section 1, a butt-welded 1-inch Schedule 40 steel water pipeline of unknown length is run throughout an industrial facility. When a precise 10-gallon-per-minute (gpm) flow is metered through the pipe, the 60-pound-per-square-inch (psi) entry flow drops by 5.91-psi. You can calculate pipe length from this information.
Look up the pressure-loss data for 1-inch Schedule 40 steel pipe. The chart shows that at 9.5-gpm, water loses 2.6-psi per 100-feet of pipe.
Adjust the published data for your measured example. Since the flow increases as a function of the square root of pressure difference, then (10 gpm/9.5-gpm)^2 (squared) = 1.108, or the proportionally greater pressure loss your length of pipe will see as a result of the greater flow. Multiplying 2.6-psi by 1.108 = 2.881 is the calculated loss for 100-feet of your pipe at 10 gpm.
Calculate your actual pipe length by dividing your measured 5.91-psi pressure drop by 2.881-psi/100 feet of pipe = 205.14-feet of pipe, based on pressure drop. This compares reasonably with the 205.43-foot calculated length of Section 1.