Dear metengr,
I was not quite sure if the average of the terminal pressures will give the average pressure in the pipe. Since the system involves high pressure, I thought, the change in pressure over the length of the pipe might be non-linear and hence some complicated formula might be...