A finite element model for the analysis of pile driving