Studies of magnetotail dynamics and energy evolution during substorms using MHD simulations