Simulations of shear tests