The Transformation of Magnetic Field Energy