Dynamo effect (hydromagnetic dynamo), the self-excitation of magnetic fields by the motion of a conducting liquid or a gaseous plasma. The dynamo effect is invoked to explain the origin and the maintenance of the magnetic fields of the Earth and of other planets with a liquid core, of the Sun and of the stars. Suppose that the magnetic field of a cosmic body contains as its components a poloidal field (with lines of force directed along the meridians, as in a dipole) and a toroidal field (with field lines directed along the parallels). Then, if the body rotates differentially (its layers at different depths having different angular velocities of rotation), a line of force of the poloidal field that passes through the different layers is twisted: some of its parts run ahead of others. As a result the toroidal field is strengthened. Its energy grows at the expense of the energy of rotation of the layers of the body, and therefore, as the toroidal field grows, the relative rotation of the layers must be retarded unless something else maintains it. The strengthening of the toroidal field may lead to the strengthening of the poloidal field, or may prevent it from decaying, if there is feedback between them. Such a coupling may be produced, for example, by thermal convection, and the convective motions must not be axisymmetric (in an axisymmetric system the dynamo effect is impossible). For the Earth the latter condition is fulfilled (the axis of rotation of the Earth and its magnetic axis do not coincide). For the Earth the dynamo effect is associated with the convective motion of the conducting matter of its liquid core and with the rising of lighter impurities in this medium under the action of the Archimedean force. The convective motions lift the lines of force of the toroidal field, and under certain conditions these can form loops, which then merge with the poloidal field and strengthen it. The theory of the dynamo effect also leads to the possibility of a self-reversal of the magnetic axis (a reversal of the polarity of the Earth's magnetic field) and of long-period oscillations of the geomagnetic field (secular variations), which reflects the real properties of the Earth's magnetic field. The magnetic fields of the Sun and the stars as a whole, and also their local fields, for example the fields of spots and of active regions, can in principle also be explained by the dynamo effect.