The Second Law 

The first, second, and third law, (not to mention the zeroth law) of thermodynamics are rather complex in detail and not so easy to grasp in full generality. Small wonder. These laws don't just describe thermodynamics (whatever that might be) but essentially everything there is, including life, the universe, and whatever else you can come up with.  
I'm now going to drop the "full generality". In other words, I won't attempt to describe something really complex like my wife with a bunch of equations but something much simpler, for example a piece of iron or silicon that is virtually isolated from the rest of the universe. Then only the first and second law are of essence, and the task is not too difficult.  
This module is about the second law. Having a second law implies that there is a first law. Yes there is  and you know it:  


The first law simply states that the total energy contained in the isolated systems (= bunches of atoms) that we are now considering is constant. If we take as system a perfect iron crystal containing N_{Fe} iron atoms, the total energy of this crystal is the sum of the individual energies of the N_{Fe} atoms that constitute the crystal. Note that if the crystal is large enough so you can just see it without a microscope, N_{Fe} is a huge number  something like the US public debt in cents (presently around 1.6 ·10^{15} Cents)  
Any atom in an iron crystal at any given point in
time has energy because it vibrates. Look
at the spring model of a crystal to get
an idea of what is going on, and at this
module to see how we can calculate some stuff. Vibrations are pretty much the only way to have some energy in a crystal that is independent of the choice of a coordinate system and thus relevant. The iron of you car body has some additional kinetic energy when the car moves in a coordinate system that is painted on the road, but not in a coordinate system that is inside the car. We don't count that external stuff. It is easy enough to write down exactly how much energy is contained in the vibrations. I won't do it, however, because for our purpose here it suffices to note that larger vibration amplitudes mean more energy. If some atoms start to vibrate more wildly in our isolated crystal, other atoms must vibrate less vigorously says the first law. Energy is conserved. 

Since the energy contained in the random vibrations of the atoms is also called temperature, the first law states:  


Well  big deal. The first law, however, goes on.
It also implies that if you want to increase or decrease the temperature, you
need to put energy into, or take some out of your system, respectively. When you do that your system is no longer isolated, of course. 

The first law, however, does not
specify exactly how the energy is distributed among the atoms of your system.
What could happen in principle is:


To get on, one needs to realize that many of
those scenarios, while not forbidden by the first law, are just extremely unlikely. A piece of iron just lying there (in splendid isolation from the environment ) with a temperature of 300 K (= room temperature) could, in principle, suddenly get very hot on top and very cold below so that the average temperature (= total energy) hasn't changed  but nobody has ever observed this or similar effects like that. Logic then dictates that there must be an universal principle that sees to it that weird things don't happen. This universal principle should be able to tell what's likely to occur and what's unlikely to occur. This universal principle is called the second law. 

The second law comes in many disguises and wordings. We will look at it in just one formulation, invoking the concept of "free energy" (oldfashioned "Helmholtz energy") or "free enthalpy" (oldfashioned "Gibbs' energy").  
The differences are kind of technical. We use
"free energy" when we look at systems where the volume doesn't change with temperature (typically a
gas in a solid container that defines a
fixed volume). "Free enthalpy" is used for system where the pressure doesn't change with temperature. That's you, me, a piece of iron, anything under normal conditions. That's why for our purposes enthalpy and not energy would be the proper word. No, don't stop reading. While enthalpy is one of those deepphysics words that tend to send people scrambling for cover, it is not only just another word for energy, it is pretty much the same thing in our case. If you heat up a piece of iron the pressure stays constant. The volume does change by thermal expansion  but only slightly. That means that the free energy and the free enthalpy are about the same for any solid, so we don't have to worry about it. To keep things easy, I will henceforth use the term free energy, even so purists would insist that it should be "free enthalpy". 
So what is free energy? It is simply
the total energy H of the system (here the energy in the
vibrations of the atoms) minus disorder energy TS. I use the letter "H" as abbreviation for the total energy because that's what one usually does, simply because the letter "E" is an abbreviation for many other things already in serious physics (e.g. for (general) "energy" or "electrical field strength"). 

"Disorder energy" is not an acknowledged term in physics but my term for the product of the absolute temperature T (measured in Kelvin (K)) and the entropy S. Now the magic word has come up. So what is entropy?  


We all know disorder when we see it
and have some feeling about degrees of disorder. Entropy, however, is not just
felt disorder but measured disorder. It assigns a number to the degree of disorder it describes. We won't worry here how one measures the degree of disorder (that's done in another science module) but just accept that it can be done. 

We now can write down the defining equation for the free energy, abbreviated G:  


That's one of the most powerful general equations physics has to offer, but it is not yet the second law. The second law actually states:  


This is clear enough. Absolute minimum means hat the value (a number) of
the function G that depends on the variables describing the
system, is the smallest you can ever get for any values of the variables. This
leaves us with two problems:


1. The
variables. If we look in full generality at any possible system made of atoms  a nanocrystal, a real crystal, you, the earth, the universe  figuring out the variables for the functions G is a tough and touchy job. If we restrict ourselves once more to a simple system like an iron crystal with some carbon in it, we may describe its total energy H by variables like: 



Note that the entropy S is not a variable. It is a function in its own right, depending on the same set of variables as the total energy H.  
Good grief! Didn't I claim that
things now are manageable? Well, yes, but only because we know a few more
things about our system that we can use to our advantage. There are three
helpful things to consider:


The latter points needs to be clarified a bit more. Let's write the equations first and then discuss them. We have the following relations between the numbers of iron and carbon atoms and iron carbide molecules, or single vacancies (1V) and double vacancies (2V):  


It's obvious. If a
Fe_{3}C or cementite molecule forms, we have to consider it to
be something new. Fe_{3}C precipitates are phases in their own
right, after all. So if a Fe_{3}C molecule forms, 3 iron atoms
and 1 carbon atom must needs disappear. They are still there, of course, but
are now counted in their new phase. Same thing with divacancies and so on. If a divacancy forms, two single vacancies have disappeared. 

The concentration of
Fe_{3}C and the concentration of, e.g., the number
N_{Fe} of iron atoms (in iron) are thus not independent
variables. We now can drop some "variables". If you know the change (expressed by the "d" = (differential) change) of the carbon number, you know the changes in the two other parameters, too. 

Taken all these points into account, the system becomes manageable, indeed. Note, I haven't said it becomes easy!  
2. Finding the minimum of a function with many variables. Well, that's rather simple (advanced) math. Set the total differential of the function to zero. Here is the equation for our case:  


The "¶" symbols mean "partial
derivation". There is nothing to it. The partial differential quotient
Insert G = H – TS, differentiate it with respect to the variables and, and you get the conditions for nirvana. 

Except you can't do it. We know the variables for H (and the also for S). But we need the precise functional relationship for both so we can do the differentiation.  
As far as the total energy
H is concerned, we have some idea of what we need to do: look at
those vibrations for whatever is there. This implies looking at all possible
springs for all kinds of bonding we encounter inside the crystal. It's not
particular easy because we need to know quite a bit about how the atoms of the
system interact to find the proper relations. it can be done however. But what about the dependance of the entropy on our parameters? So far we don't even have an idea on what to do. It can and will be done, however, and as a result you get relations like the concentration of vacancies as a function of temperature and in particular phase diagrams. 

I will give you an idea of how it is done in this science module, where the concentration of vacancies is derived by following the recipe from above, and in the nucleation science "super" module.  
Spring Model and Properties of Crystals
Lee Sauder and Skip Williams Smelt Iron
8.1.2 A Closer Look at the Second Law
Producing "Nirvana" Silicon or Nearly Perfect Silicon Single Crystals
Global and Local Equilibrium for Point Defects
Constitutional Supercooling and Interface Stability
TTT Diagrams 4. Experimental Construction of TTT and Phase Diagrams
Smelting Science  3. Smelter Technology
Free Enthalpy of Reduction Processes
© H. Föll (Iron, Steel and Swords script)