The solar dynamo is the physical process that generates the Sun's magnetic field. The Sun is permeated by an overall dipole magnetic field, as are many other celestial bodies such as the Earth. The dipole field is produced by a circular electric current flowing deep within the star, following Ampère's law. The current is produced by shear (stretching of material) between different parts of the Sun that rotate at different rates, and the fact that the Sun itself is a very good electrical conductor (and therefore governed by the laws of magnetohydrodynamics).
Any electrically conducting fluid can form a dynamo simply by shear within the fluid itself, because of a consequence of Lenz's law of induction: moving the fluid through a pre-existing magnetic field will induce electrical currents in the fluid that distort the pre-existing magnetic field. The direction of the distortion is such that the existing field lines tend to be dragged along with the fluid, like threads of dye embedded in taffy or syrup. If the flow has a strong shear component then the individual field lines are stretched by the flow, amplifying the existing magnetic field. Such systems are called MHD dynamos.
Depending on the structure of the flow, the dynamo may be self-exciting and stable, self-exciting and chaotic, or decaying. The Sun's dynamo is self-exciting: the direction of the field reverses itself about every 11 years, causing the sunspot cycle as ropes of magnetic field lines rise to the surface of the Sun and manifest as sunspots on the surface. The solar dynamo is thought to be located at the tachocline, a region inside the Sun that exhibits a very large shear profile.
The detailed mechanism of the solar dynamo is not known and is the subject of current research.
 See also
|This article related to the Sun is a stub. You can help Wikipedia by expanding it.|