Magnetic fields problem

"A research lab has a magnetic facility, which can produce intense, pulsed magnetic fields. In 1 experiment, a B-field of 40 T is to be produced over a cylindrical volume, 40 cm in length and 20 cm in diameter.

The energy required to pulse the magnet is supplied by a flywheel, constructed from a set of circular plates, 5 m in diameter and with a total mass of 10^5 kg, rotating at 500 RPM."

Estimate the reduction in angular velocity of the flywheel needed in order to supply energy necessary to produce the required B-field. Assume conversion from rotational energy to magnetic energy is 100% efficient.

Here I'm stuck. If the conversion is 100% efficient, why can't I use KE(rot) = U, with KE(rot) = (1/2)Iω^2?