# Demonstrate magnets adhere to conservation of energy pursuant to the laws of thermodynamics

I am looking for a way to demonstrate that magnets adhere to the laws of thermodynamics, in particular the requirement that energy in a closed system be conserved.

To adhere to the requirement that energy not be lost, I would expect that the energy required to create a magnet would be offset by the energy exerted when that magnet exerts force.

My (elementary, if you will pardon the pun) understanding of magnets is that they exhibit a magnetic field because of a kind of polarization of the electrons, that looks something like this for a "perfectly" magnetized metal:

---------------------
---------------------
---------------------


whereas an unmagnetized object would not have this polarization (if that is the right word), and might "look" something like this:

|\/-/-\|-/|\/-/-\|-/
/|--/-\|-/|\/-|\\|\-
\-/-/-\-/|\/-|/-\|-\


The former object would exhibit the maximum force possible for the given material. The latter object would exhibit no magnetic force.

One would expect that the energy required to align the electrons would never exceed (but where inefficient it may be less than) the force that is exerted by the magnetic field.

As an example, suppose the polarization of a magnet from a completely unpolarized state uses 1 kJ of energy. To adhere to the laws of thermodynamics, the maximum amount of force the magnet can exert is 1 kJ, after which point it would be depolarized. One would expect the strength of the magnetic field to dissipate as it exerts force.

Is there a demonstration that one can perform to help visualize the conservation of energy by way of "charging" and "discharging" a magnet?

-
A few clarifications: when you say "suppose the polarization of a magnet from a completely unpolarized state uses 1 kJ of energy" that's indeed a meaningful expression (I would recommend the use of "magnetization" instead of polarization, to avoid ambigüity with this), but your assumption that "one would expect the strength of the magnetic field to dissipate as it exerts force" is not correct. If you pick up a magnet with another one from the floor, the work done comes from your arm, and the magnetic force just provides a link (like a rope). –  Mono Aug 2 '12 at 4:14

The answer is that the magnetic field energy is always the integral of $B^2\over 2$, up to factors which are different in different systems of units. So magnetizing a magnet requires as much energy as you get in the field after you are done, and when you bring magnets closer, so extracting energy from the field, the total integral of $B^2$ is diminished. The total amount of energy you can extract from the magnetic reconfiguration is never greater than the total magnetic energy, and the total magnetic energy is the minimum work that you need to do to magnetize the system initially.

The general proof that magnetic fields conserve energy comes from the fact that the interactions of electrons, nuclei and electromagnetic fields have a Hamiltonian formulation. The Hamiltonian formulation automatically implies conservation of energy.

If you aren't concerned about loop quantum effects, which require renormalization, or if you are working classically, the Hamiltonian is obtained by adding the electromagnetic field Hamiltonian $\int {1\over 2} (E^2+B^2) d^3x$ to the mechanical energy of the electrons and nuclei, and replacing the momentum $p$ by $p-eA$ where A is the vector potential, and adding $q\phi$ where $\phi$ is the scalar potential, and adding appropriate coupling to the magnetic moments of the electrons and nuclei.

-

There's no "electron polarization" in a magnet. I'll concentrate in this answer in the typical example of ferromagnetic materials (like iron, nickel or cobalt) which exhibit the following list of properties that explain their macroscopic behavior, but there are of course other kinds of materials which can develop magnetic attributes by subtly different mechanisms. So, for ferromagnetic species:

• At the atomic level, they're all elements (which, excepting rare-earth metals, all belong to the d-block or "transition metals") that have a number of electrons in their outer shell such that the latter stands incomplete. In an atom, each atomic orbital is occupied by at most two electrons with anti-parallel spin, because of Pauli Exclusion Principle; also, by Hund's rules, if the number of electrons in a shell isn't enough to fill it, they distribute themselves each one singly occupying a different orbital, and in these cases this set of unpaired electrons (with their associated spin) are able to produce a net magnetic moment for the atom as a whole. The atoms can be then imagined as microscopic magnets pointing in the direction of the net magnetic moment imparted by their non-paired electrons.
• Individual atoms with a net magnetic moment can be, in principle, randomly oriented inside the cristal lattice of the solid (and so cancelling each other's moment and preventing the emergence of a macroscopic field). But in ferromagnetic materials another effect (the exchange interaction between nearby electrons with equally oriented spins) induces the allignment of microsocopic aggregates of atoms in the cristal lattice, which in this way becomes thermodynamically favoured over the random orientation of magnetic moments. As the exchange interaction effect is significative only at short range, these aggregates don't extend far away into the solid lattice, and so instead they form crystal grains called magnetic domains (they are identifiable in the crystallographic structure of the metal exploiting the surface magneto-optic Kerr effect).
• Then again, individual magnetic domains are thermodynamically favoured to be randomly oriented in a solid phase, and that's why ferromagnetic materials don't naturally exhibit magnetic properties. Nevertheless, the magnetic domains can be alligned by an external magnetic field (such as the one produced by an electric current in a solenoid configuration) and this indeed implies that work is done for reducing the entropy of the material associated to the allignment process. Then again, being the randomly-oriented domains the thermodynamically stable state, magnetized ferromagnets tend to de-magnetize with the passage of time, and as a result their magnetic field response becomes an hysteresis loop.

The energy involved in setting-up the induced magnetic field of the magnet, is both irreversibly transformed into the thermal energy dissipated from the displacements of the domains, and (reversibly) stored in the magnetic field itself; the energy comes from the external power supply which powers the induction coil (electricity) and gets wirelessly transmitted through space to the magnet by the changing field in formation, which in turn generates a voltage drop in the coil. So energy is conserved (the amount added to the system as electrical power is converted to magnetic energy in the field and heat released) and the entropy of the universe strictly increases (because, even if the magnet's entropy is reduced by the magnetization process, the heat released to the environment causes an increase in entropy more than enough than needed to compensate it).

Also, when it goes down the hysteresis loop, the decreasing magnetic field intensity induces eddy currents in the material, and the energy initially stored in the field finally becomes also irreversibly lost as heat to the environment. That means that in the end, all of the electric power initially introduced in the system gets converted to heat when the solid phase relaxes to it's thermodynamical stable state.

-
Your explanation is just what OP means by electron polarization--- he means that the upaired electron spins are aligned, as they are by the complicated mechanism you sketched out, so it's not wrong. This doesn't really answer the question--- the question was "prove perpetual motion is impossible with magnets". Also the dimensional thing at the end, by "maximum force the magnet can exert" he means the "maximum work the magnet can do", he isn't using the right language, but you can see what he means, and it's not nonsense. –  Ron Maimon Aug 2 '12 at 3:17
I don't agree with you it's right to use the word "polarization" freely when talking about electromagnetic properties of materials -that is a technical, well-defined term which refers to the development of surface charges by microscopic induction of dipoles in dielectrics. He might not be talking nonsense, but the confusion that the OP seems to have between the concepts of force and work is usually settled by reading some introductory texts in physics. –  Mono Aug 2 '12 at 3:31
But I agree that the final sentence is unnecessarily aggressive. I'll remove it. –  Mono Aug 2 '12 at 3:33
Just read "magnetization" for "polarization", and "maximum work" for "maximum force". There's no point in berating someone over using jargon wrong when the intent is clear. –  Ron Maimon Aug 2 '12 at 7:19