Modelling Mercury's magnetosphere and plasma entry through the dayside magnetopause