Pressure surge calculations. Optimization of single-run piping systems