Magnetic Field Analysis of Permanent Magnet