Magnetic device simulation modelling and optimisation for scale control