Pressure surges during filling of partially empty undulating pipelines