Modelling weathering effects on the mechanical behaviour of rocks