Modelling the electricity consumption of cities: effect of urban density