Water hammer often happens in liquid-pipelines,and impulsive forces of water hammer often damage pipelines and affect the safety of pipeline systems.In this paper,one spring-pipeline is studied.The ANSYS/LS-DYNA,a finite-element codes,is used to simulate the response of pipelines under impulsive force.The response of pipes within the air and the water are compared.The results show that the velocity and displacement are quickly declined within the water.Though importing the same water hammer force in inlet and outlet,the results show that the system responsed from the flexible pipe are stronger and the vibration time is also longer.The results are the same as the previous experimental ones.