In order to maintain the magnetic field against ohmic decay (which would occur for the dipole field in 20,000 years), the outer core must be convecting. The convection is likely some combination of thermal and compositional convection. The mantle controls the rate at which heat is extracted from the core. Heat sources include gravitational energy released by the compression of the core, gravitational energy released by the rejection of light elements (probably sulfur, oxygen, or silicon) at the inner core boundary as it grows, latent heat of crystallization at the inner core boundary, and radioactivity of potassium, uranium and thorium.