Modelling of microstructural effects on magnetic hysteresis properties