MortenA has given the source from where you can get the necessary equations. Generally, water hammer or surge in liquid line occurs, when there is a sudden closure of a valve (mostly ESD valve) on the downstream end of a pipe. The parameters of critical importance are the length of the pipe...