What causes the pressure change in a horizontal pipe with no energy input. Is it the head loss? If so, how?
We take the case of a horizontal pipe open on one end and driven with a pressure source on the other, flow is subsonic, fluid is newtonian, and incompressible.
Pressure diminishes with length away from the source due to frictional dissipation from viscosity. This is commonly referred to as "head loss". In the absence of energy input- that is, we stop the pump- then there is no flow, the viscosity terms are zero, no energy is dissipated, and there is no head loss.