Water hammer flow simulation

Hi,

I saw a youtube video where someone simulated the water hammer effect. Can someone please explain to me how I can simulate this. I currently have a car muffler shaped tube with holes inside and i would like to see if pressure is disipated. Thank you.

SolidworksFlow Simulation