Mathematical modelling of the mechanics of core drilling in geomaterials