In order to study the effects of pile diameter,lateral movement velocity and sand porosity on the contact force of the pile and the soil around the pile during the displacement of sand soil,a PFC2D discrete element model was established to analyze the interaction mechanism between pile and soil during the lateral displacement of sand and soil.The results show that with the increase of soil lateral displacement,a dense area is formed on the frontal side of the pile foundation,and a loose area is formed on the backsoil side.With the increase of pile diameter and loading speed,the dense area on the frontal side and the loose area on the back soil side of the pile foundation will expand,and the maximum pile-soil force will increase linearly.With the decrease of soil porosity,the range of loose zone will decrease,and the dense zone will increase,and the pile-soil force after reaching the stability stage will increase approximately linearly with the decrease of porosity.