Extended MHD simulation of resonant magnetic perturbations