I have done some water hammer analysis (a.k.a surge analysis/transient analysis) modeling in the past. I have done this for water and liquid propane and have had accurate results for both. A good software to use is AFT Impulse- it's easy to use and their manual provides enough info to get started. The attached document describes the basics of the phenomenon, analysis and there is a plethora of other documentation you can find via Google (including a free demo of AFT Impulse).
As for compressor surge, I don't have a lot of experience with it but my understanding is that as a centrifugal compressor discharge is restricted, the discharge pressure rises and this can result in a flow reversal through the compressor (e.g. pressure moves from discharge through compressor to suction). As a result, there is a pressure wave that will move back and forth through the compressor. To prevent this, most large centrifugal compressors have surge control systems that prevent the compressor from operating too far back on its curve- this is done by opening a recycle valve/flow path when flows and pressures reach certain criteria (i.e. min flow or high discharge pressure).
Hope this helps.