Exchange spring magnet
The magnetostatic energy is the energy stored in the field generated by a material's magnetic moments. The magnet's field reaches its maximum intensity if all the magnetic moments orient in one direction; this is what occurs in a hard magnet. In order to prevent building up the magnetic field, sometimes magnetic moments tend to form loops. That way, the energy stored in the magnetic field can be constrained; this is what occurs in a soft magnet. What determines whether a magnet is hard or soft is the dominant term of its magnetic energy. For hard magnets, the anisotropy constant is relatively large, making the magnetic moments align with easy axis. The opposite case applies to soft magnets, in which the magnetostatic energy is dominant.
Earth's magnetic field
The Earth and most of the planets in the Solar System, as well as the Sun and other stars, all generate magnetic fields through the motion of electrically conducting fluids. The Earth's field originates in its core. This is a region of iron alloys extending to about 3400 km (the radius of the Earth is 6370 km). It is divided into a solid inner core, with a radius of 1220 km, and a liquid outer core. The motion of the liquid in the outer core is driven by heat flow from the inner core, which is about , to the core-mantle boundary, which is about . The heat is generated by potential energy released by heavier materials sinking toward the core (planetary differentiation, the iron catastrophe) as well as decay of radioactive elements in the interior. The pattern of flow is organized by the rotation of the Earth and the presence of the solid inner core.