A transient flow or surge analysis is necessary during the planning phase of a pumping system when the pipeline characteristics and operating conditions suggest a high risk of water hammer damage. This includes pipelines with long lengths, low flow rates, and unsupported sections. A thorough analysis can help identify potential issues and inform design decisions to mitigate water hammer risks.