The energy performances of a rotary permanent magnet magnetic refrigerator