The first law of thermodynamics (AKA conservation of energy)


When we covered conservation of energy we found that the total mechanical energy of a closed system was constant. When this law is extended to include energy in the form of heat and thermodynamic work it is called the first law of thermodynamics.

What is heat? Heat is defined to be the energy flow from one object to another as a result of a temperature difference. In other words if we put two objects in contact with each other and they have different temperatures, energy will flow from the hot one to the cold one until the average kinetic energy of the molecules in each is the same. According to the relationship between average kinetic energy and temperature, this means they end up with the same temperature (this is sometimes referred to as the zeroth law of thermodynamics; two objects with different temperatures will, when put in contact, reach the same temperature). Heat flow is measured in Joules and in Calories (4.184 J = 1 cal; Note; a food calorie like on the back of a box of cookies is actually a kilocalorie or 1000 calories,)

 Heat energy, Q, can be transferred by four main mechanisms: convection, conduction, radiation and evaporation. The first three are discussed in your book (read those sections); we talked about evaporation above.

An alternate concept for an integral is that it is equivalent to the area under a the curve formed by the function being integrated. So for our new definition of thermodynamic work the work done is also the area under the curve formed by PdV on a plot of P versus V.

Two important examples which we will use below are work done by an isothermal process and work done in an adiabatic process.

The first law of thermodynamics says that the change of internal energy of a system has to equal the heat flow into the system minus the work done by the system. In other words, you have to account for all the energy coming into and out of the system so that you have the same amount you started with (conservation of energy by another name); dU = Q -W. In other words we can account for all the energy in a system if we monitor the internal energy, the heatflow into (or out of) the system and the work done by (or on) the system.

 Comments
1) Note that a system doesn't contain or have a certain Q; heat Q is energy flowing into or out of the system. There is no answer to the question 'How much heat does that mass have?'. Likewise a system doesn't contain a certain amount of work; you may or may not get work out of a system where there is heat flow and internal energy change.
2) A system does have a certain internal energy (we discussed the definition of internal energy in the section on temperature, pressure and gasses). You can say 'this system has an internal energy of 100J'. Another way to say this is that internal energy is a state variable (as is temperature, pressure, volume). Work and heat are not state variables.
3) The first law doesn't say anything about how much heat goes into changing the internal energy and how much goes into work for a particular system. This is the provence of the second law of thermodynamics.
 

The second law of thermodynamics, microscopic view.


 Suppose we have three coins and want to know how many different results we could get from tossing them. Here are all the possibilities:
coin Toss 1 Toss 2 Toss 3 Toss 4 Toss 5 Toss 6 Toss 7 Toss 8
1 H H H H T T T T
2 H H T T H H T T
3 H T T H T H H T
From the results we can see that there is only one way to have all heads but three ways to have two heads and one tail. Our conclusion is that getting a result of two heads and one tail is three times more likely than all heads or all tails.

What does this have to do with thermodynamics? Suppose we have three molecules which can go randomly into two sides of a container. Let's call the left side T and the right side H! Using the same reasoning we can see that it will be three times more likely to find two molecules in the H side and one in the T side than it is to find all three in the H side. In other words it is much more probable that molecules will spread out in roughly equal numbers between the two sides of the container because there are more ways to have that happen.

 Mathematicians have worked out probability theory to tell us what results to expect in these kinds of situations. They can prove that the probable number of heads, P(H), in a coin toss with N coins is given by P(H) = N/2 ħ squareroot (N) with a 93% confidence limit. Lets calculate this probability for a few values of N.
N P(H) = N/2 ħsqrt N % error
100 50 10 10%
1000 500 31.6 3.2%
10000 5000 100 1.0%
100000 50000 316.2 0.3%
1000000 500000 1000 0.1%
10000000 5000000 3162.2 0.03%
100000000 50000000 10000 0.01%
1000000000 500000000 31622.8 0.003%
In the last column is the percent error ((sqrt N)/N x 100%) introduced by the ħsqrt N term. What does this mean? This means that with 100 coins in a particular toss you will get 50 heads (N/2) with a possible error (ħsqrt N) of 10 which represents a possible error of10%.

Look what happens as the number of coins increases!! If you guess you will get 500,000 heads when tossing 1,000,000 coins you only expect to have an error of 0.1%! In other words for large numbers of coins you expect to be very close to exactly half heads and half tails as compared to small numbers of coins where you occasionally do get all heads or all tails.

What does this have to do with thermodynamics? Let's think about putting molecules in a box again. Generally the number of molecules in a container is quite large; chemists generally imagine working with a mole of atoms which is 6.02x1023 atoms. Applying the discussion of the coin toss we see that the error in assuming the molecules are equally divided between the two sides of the container (N/2 in each) is very small. Or stated a different way, it is very unlikely (very small error) that we find that the molecules are NOT divided equally between the two sides. The likelihood of having precisely half in each side increases dramatically with the number of molecules.

Can we quantify this (I want an equation!)? Yes! Let us call the number of different ways a particular outcome can occur (three ways to get two heads and one tail in our three coin toss for example) the number of microstates and use the symbol omega, W. So for the case of three coins omega = 1 for all heads or all tails (there is only one way to have this occur so only one microstate available) and omega = 3 for two heads and one tail (there are three ways for this to occur so there are three microstates). Likewise omega = 3 for two tails and one head. Now we define something called entropy;  S = kB  ln (omega) where kB is Boltzman's constant (kB  = 1.38x10-23 J/K) and ln is the natural logarithm. Why choose the logarithm and Boltzman's constant? We'll get into that below but basically it is so that this definition is compatible with other definitions plus the fact that logarithms make working with very large numbers easier. Notice the units for entropy will be Joules per Kelvin

Now we see something interesting. Notice that the entropy for all heads is lower than the entropy for the case of two heads and one tail. In our three coin toss the entropy for all heads is kB  ln 1 = 0 while the entropy for two heads and one tail is kB  ln 3 = 1.5 x 10-23J/K which is larger than 0. So another way to state the fact that getting half heads in a coin toss of N coins is more likely than some other distribution (two heads and one tail for example) is to say that the outcome with the highest entropy is more likely. States with higher entropy are more likely than states with low entropy. This is a statement purely based on the laws of probability.

We can also see that, as the numbers of coins (or molecules in a container) gets larger the state with the highest entropy becomes almost certain (the error gets VERY small). For a mole of molecules we can say with near certainty that the system will be in the state of highest entropy. This is a result purely due to probability applied to large numbers of molecules.

Version one of the second law of thermodynamics: Isolated systems tend go towards a state of maximum entropy.

Some comments. It is possible to make a loose connection between entropy and disorder (the connection is not exact but works most of the time). In our example of molecules in a box we see that we have more information about the molecules if they are all in the left side of the box than if they are spread all through the box. Somehow there is more order if the molecules are all in the left side because we have limited the possible locations to one side. But from our definition, having all the molecules on one side would be a lower entropy state than having them spread over the entire container. From our reasoning above we recognize that the system would tend to be found (with very small error) in a more disordered state (high entropy) with the molecules spread half in each side. So another way to state the second law is to say that closed systems tend to go towards a state of maximum disorder (maximum entropy).

This can't be right can it? Don't we see counter examples every day? What about living organisms which seem to be able to create order at the cellular level, at least until they die? Or ants building an organized nest. There is an important criterion mentioned in the definition: Isolated systems! Living organisms cannot live as isolated systems. They create order locally at the expense of disorder elsewhere. We take in energy in the form of food which has highly ordered chemical bonds and expel waste which is in a very disordered state. So the total environment of organisms plus food sources experiences a net entropy gain overall. The second law applies to everything, including all living organisms. Another conclusion of this line of thinking is that the universe, a closed system, has to be experiencing a net entropy increase overall. The end state of the universe (fortunately for us, billions of years in the future) will be total disorder (this is sometimes referred to as the 'heat death' of the universe).

Example: From our earlier discussion of the Maxwell Boltzman distribution of velocities we can predict another result of the second law. Notice that the distribution for a low temperature does not include as many choices of velocities as the distribution for a high temperature. So the same gas at a low temperature is more ordered than at a higher temperature. This means a cool gas will tend to gain heat (if it has the chance to) so as to increase its entropy. This is also true of non-ideal gasses where the heat flow goes into internal energy; heat flow into a gas at constant temperature increases the entropy; heat flow out decreases the entropy.

Example: Still one more example is friction. When we slide a box across a table we do work on the box. This results in the box gaining energy. Initially the energy is very organized; all the atoms in the box go in the same direction. But as energy flows into the surface the molecules of the surface gain kinetic energy that is randomly oriented (the temperature increases). Now the energy is in a disordered state. We can't get this energy back for doing work (moving the box for example) because it is in a more random state and entropy (disorder) does not decrease spontaneously.
 
 

The second law of thermodynamics, macroscopic view.


Suppose we are an engineer and we want to build the most efficient engine possible (and our name is Sadi Carnot!). We want to burn some fuel or use some other heat source and convert this energy to mechanical work. From the first law of thermodynamics we already know that the maximum mechanical energy output cannot be more than the energy input from the heat source (you don't get something for nothing!). So the best possible result we might expect would be to burn fuel to get 100J of heat for example and get 100J of mechanical energy out. (NOTE: this turns out not to be possible! Read on.) Let's see what else is involved.

What is a cyclic process (does this have anything to do with Harley Davidson)? First off, to have an engine we must be talking about a cyclic process. Whatever happens in the engine we have to make it to come back to the same state periodically so we can keep getting work out of it. So for example if we had an expanding gas pushing against a piston we could get mechanical work out of the piston. But the only way to keep doing this (without having an infinitely long piston!) is to eventually return the piston back to its starting point. In other words the internal state of the engine has to periodically go back to the original state. Another way to say this is the change in internal energy is zero for a cyclic process. For the cycle dU = 0 where U is the internal energy; we put everything back the way it was when we started. This means that the first law of thermodynamics for a cyclic process is W = dQ; the work done in a cycle is equal to the net heat flow into the cycle. (Watch out for the word net here, remember what a problem it was in Newton's first law, F = ma where F is the net force.)

When we talked about conservation of energy we learned that some processes are reversible and some are not. If we raise a mass, m, up to a height h we store up gravitational potential energy mgh. We can get all of this stored energy back by dropping the mass by the same height, h (in which case we end up with an amount of kinetic energy equal to the amount of gravitational energy we had stored). The gravitational force is conservative; we can change potential energy to other forms and back again without losing any energy. Other forces such as friction are non- conservative. Processes such as sliding a block across the table against a friction force are not reversible; we cannot get the energy back.

A more precise definition of reversible. A process is reversible if it occurs quasistatically and does no work against friction. What do we mean quasistaically? Quasistatic means we do the process so slowly and in such a way that we could, if we wanted, at any step reverse the process and go back to the previous state. In our example of lifting a mass to store potential energy we could imagine doing it very slowly so we can get the energy that we just stored back at any step. Notice that these two conditions also mean that any heat flow has to be such that we can always take a small step backwards and go back to the previous state. (This rules out work done by friction because we cannot get the energy back if it is lost to friction.)

Why do we want a reversible process for our 'perfect' engine? Well certainly if any energy is lost due to friction it won't be as efficient as if we have an engine which does not loose energy to friction. Reversible process don't lose energy to friction so to get the best possible engine we want the processes which make up the cycle to all be reversible.

What thermodynamic processes are reversible? Isothermal and adiabatic expansion are two examples of reversible thermodynamic processes. Isothermal means the process occurs at a constant temperature. Adiabatic means the process occurs with no heat flow at all.

So lets build an engine. Lets start at point a in our diagram below (pressure Pa volume Va) and go isothermally (constant temperature T1) along path (1) to point b (pressure Pb, volume Vb still at temperature T1). What is the physical process that would do this? Well we could put a piston of gas in contact with a heat reservoir of constant temperature T1 and let the gas absorb heat Q1 and expand. Then we could isolate the piston (super insulate it so no heat enters or leaves for example) and let it keep expanding (slowly so it is reversible) to a new temperature T2 at point c (with new pressure Pc and volume Vc). To complete the cycle lets go from c to point d and let the piston cool isothermally (in contact with a heat reservoir at temperature T2 which absorbs heat Q2) and then further contract adiabatically (isolated) from d back to our starting point a. This has to be the most efficient cycle possible for an engine operating between temperatures T1 and T2 since we used only reversible processes.

Ok so how much work is done during this cycle? We can get this two ways. From the definition of work we could find the area under the curve for each step. Notice that for the cooling paths (c to d and d back to a) we must subtract the area under the curve (we do negative work). This is the price we pay for getting back to the starting point so that the process is cyclic but at least since the processes are still reversible we know we loose no heat to friction. So for the cyclic process the total work done is the area inside the cycle. In fact this is always the case; the area inside a cyclic process diagramed on a PV diagram equals the work done in the cycle. So one way to find the work done is to find the area inside the cycle.

For this cycle however, the easy way to find the work done is use the first law. We know that for the process a to b to c to d to a we have W = dQ since from the first law the change in internal energy is zero for a cyclic process. But the only heat flow occurs during the isothermal parts a to b and c to d (adiabatic means no heat flow!). So the work done in this cycle will be W = Q1 - Q2 (Q2 is negative because heat flows out of the cycle during the isothermal process c to d).

So why can't we get a bigger area (and therefor more work) by following a different path on the PV diagram? We could do that but the paths would not be isothermal or adiabatic and so would not be reversible which are the most efficient choices. Remember we are looking for the most efficient engine, not the one that does the most work.

Version two of the second law of thermodynamics: Notice that in order to make the process cyclic (get back to our starting point) we have to expel some heat (subtract the work done by the lower curve). Evidently it isn't possible to build a cyclic engine which does not give off heat. This is why your car engine gets hot and has to have a radiator, nuclear power plants have cooling towers and computers have fans. All processes which exchange one form of energy for another (heat into work in the case of engines) have to generate waste heat. This is not just energy lost to friction; as we have shown above, even for the most efficient engine possible with no friction there will be waste heat expelled to he environment. Real engines also have heat losses due to friction but even if we could get rid of the friction all engines would expel heat because of the second law.

Version three of the second law of thermodynamics: The Carnot cycle is the most efficient heat engine possible. The above cycle (using two isothermal and two adiabatic paths) is called the Carnot cycle after Sadi Carnot who first proved it was the most efficient cycle. One implication is that there is an upper maximum theoretical efficiency of any engine. We can only make engines as efficient as the Carnot engine but no better.


Thus for our 'perfect' engine the efficiency = (1-T2/T1) x 100% where T1 is the temperature of the hot reservoir and T2 is the temperature of the low reservoir.

What does this efficiency equation mean? An important thing to realize here is that the efficiency of our perfect engine can never be 100% because 1 - T2/T1 is always less than one. How about raising the temperature of the upper reservoir to get better efficiency? Fine, that does raise the efficiency but if you design an engine which runs at too high a temperature you have a problem finding materials that won't melt or burn up. How about lowering the low temperature reservoir? Cars use the atmosphere as the low reservoir but you could use a trunk load of ice as the low reservoir instead. This would work but it also has practical limitations.

But what about my solution to the world energy problem!? My idea is to extract heat from the ocean! Hey there is lots of internal energy out there why can't we use that? Notice there is nothing in the first law which says we can't do that. The first law says we can't get more energy than is there but it doesn't say we can't get what is there. So can we do this? From the above arguments we see that there has to be a cool reservoir in order to have somewhere to expel heat, according to the second law. What would this reservoir be? Unfortunately the earth and atmosphere have about the same temperature as the ocean on average. So there is no cool reservoir for our waste heat. So we can't do it. Oh I suppose we could drag an iceberg around as a cool reservoir but this doesn't seem real practical.

Version four of the second law: In a closed system heat does not spontaneously flow from a cool reservoir to a hot reservoir. Notice that if this occurred we could separate two parts of the ocean, have one part spontaneously give up heat to the other so we have a hot and cool reservoir and then run an engine to do work between the two reservoirs. But this would violate our second version of the second law because we'd get work out with no hot and cool reservoirs to start off with.

How do these versions of the second law of thermodynamics connect with the version based on entropy, disorder and probability? Recall the ratio Q/T plays an important role in finding the efficiency of the Carnot cycle; the hot reservoir decreases by this much and the cool reservoir increases by this much. For this reason it was given a special name; entropy! S = Q/T (well actually it is usually written for very small heat flows dQ so dS = dQ/T). This definition of entropy was actually made long before the one based on probability.

Let's revisit the 'get energy from the ocean' idea again from the perspective of our first definition of the second law. First off, reversible cyclic processes have to result in no change of entropy for the engine. We end up in the same place we started from so the disorder has neither increased nor decreased for the engine. So far so good. Now lets imagine using this cyclic engine and only a hot reservoir (the ocean for example) with no cool reservoir. Well the hot reservoir would lose entropy (become more ordered) in this process since heat flows out of it (S = dQ/T is a negative quantity). But according to the first (disorder) version of the second law the overall, total entropy has to increase. The only way to get entropy to increase overall for this process (or even to remain constant) is to raise the entropy somewhere other than the hot reservoir or the engine. In other words you have to raise the entropy (increase disorder) of a cool reservoir somewhere else. But this is saying the same thing as version three of the second law: if the process is cyclic we've got to have waste heat exhausted to a cool reservoir somewhere in the process. So all versions of the second law give the same results.

How about some non-obvious applications of the second law?

We know computers organize data. Physically this occurs as ordering of the current flow in the computer circuitry or ordering of magnetic particles on a storage device such as a hard drive (we do NOT want the physical representation of ones and zeros in the computer to be random!). So from the first version of the second law we can see that computers are a type of heat engine- they use electrical energy to create order. We can conclude that computers will always give off heat.

Refrigerators are heat engines run in reverse: we put work into the refrigerator, take heat from the inside and expel it to the outside. By reversing the above arguments for heat engines you can show that there is no way to build a refrigerator which only cools something. Because of the second law there will always be waste heat given off, the coils on the back of your refrigerator will get hot. This is also why air conditioning units have to have part of their apparatus outside; there has to be a hot reservoir where you can expel heat. A Carnot refrigerator (the Carnot cycle run backwards) is the most efficient refrigerator possible.