Modelling the size of the very dynamic diamagnetic cavity of comet 67P/Churyumov–Gerasimenko