Modelling stellar coronal magnetic fields