Numerical modeling of deformation and failure of sandstone specimens