Energy stored in magnetic field