I would recommend reading about this further in a good textbook (e.g. Fluid Transient in Pipeline Systems by A.R.D. Thorley).
My 2c is that underground pipes are usually restrained against axial movement by thrust blocks at major changes in direction…