Modelling degradation of medical implants made of biodegradable polymers