Numerical modeling of the magnetization of a permanent magnet and its effect on the electromechanical performance of a brushless direct current motor