Entropy and the Second Law Lecture 2 Getting to know Entropy • Imagine a box containing two different gases (for example, He and Ne) on either side of a removable partition. • What happens when you remove the partition? • Did the energy state of the system change? • Is the process reversible? (All the kings horses and all the kings men…) • What changed? The Second Law • It is impossible to construct a machine that is able to convey heat by a cyclical process from one reservoir at a lower temperature to another at a higher temperature unless work is done by some outside agency (i.e., air conditioning is never free). • Heat cannot be entirely extracted from a body and turned into work (thus car engines always have cooling systems). • Every system left to itself will, change toward a condition of maximum probability. • The entropy of the universe always increases. The Second Law • My favorite: o You can’t shovel manure into the rear end of a horse and expect to get hay out of its mouth. The Second Law states that there is a natural direction in which reactions will tend to proceed. Statistical Mechanics and Entropy The Microscopic Viewpoint Back to our Box • Imagine there were just two atoms of in each side of our box. o • • • • • Only one possible arrangement If we remove the partition, there are 24 = 16 possible arrangements. Basic Postulate of Statistical Mechanics: a system is equally likely to be found in any of the states accessible to it. Odds of atoms being arranged the same as the initial way: 1 in 16. When we removed the partition, we simply increased the number of possible arrangements. Suppose we had a mole of gas. What are the odds of atoms being arranged the same way? Another Example • Imagine two copper blocks at different temperatures separated by an insulator. • What happens if we remove the insulator? • Suppose we initially had 1 unit (quanta) of energy in the left block and 5 in the right (total of 6). How will they be distributed after we remove the insulator? How many ways can we arrange the energy? • How many combinations are there that correspond to the first block having 1 quantum? • Each of these arrangements is equally possible. o Although since we can’t tell the individual quanta apart, some of these arrangements –combinations– are identical. • How many when the left block has 2? • Is there a rule we can use to figure out questions like this? W(e)= • E! e!(E-e)! Where E is the total number of energy units and e is the number the left block has. • Doing the math, we find there are 15 ways. How many all together? • • • • The system is symmetrical, so there are also 15 ways of distributing the energy when the left block has 4 and right 2. There are 20 ways of distributing our 6 units of energy so that each block has three, and only one way each when all the energy is on one side. Dong the math, there are a total of 64 ways. A simpler way: 6 quanta distributed between 2 blocks can be distributed in 26 = 64. o The chances of any particular state occurring are (½)6. What’s the point? • There were 20 ways of distributing the energy equally, 2x15 ways where one side had 4 and the other 2, 2x6 ways where one side had one and 2 ways where one side had none. • The point is that there are many ways to distribute energy for some values of e and only a few for other values. • The chances of an equal distribution are 20x(1/2)6 = 20/64 = 0.3125. The chances of the left block having all the energy are only 1/64. Calculating Probabilities • Suppose there are 20 quanta of energy to distribute. Too many to count individual combinations! We need an equation. • The equation will simply be the number of combinations corresponding to a given state of the system, Ω(ƒ) (e.g., one block having ƒ= 5 quanta) times the probability of any particular combination occurring, in this case (½)20: P(ƒ) = Ω(ƒ) × C o where C is the probability of any combination occurring: (½)20 and Ω is E! W(e)= • More generally, o o P(e)= e!(E-e)! E! peqE-e e!(E-e)! where p is the probability of an energy unit being in the left block and q is the probability of it being in the right. This equation is known as the binomial distribution (can be computed with the this is the BINOMDIST function in Excel). In this case, p and q are equal, so it reduces E! to: E P(e)= e!(E-e)! p Energy Distribution • We can use the BINOMDIST function in Excel to compute the probability. • We see an equal or nearly equal distribution is the most likely outcome. o Imagine if we had 1020 quanta to distribute – one block having a few more or less would make little difference. • The point is that energy is distribution equally between the blocks simply because that is the most likely outcome. Entropy and Thermodynamics • Unlike a simple physical system (a ball rolling down a hill), in thermodynamics whether or not a chemical system is at equilibrium depends not on its total energy, but on how that energy is internally distributed. • Clearly, it would be useful to have a function that could predict the internal distribution of energy at equilibrium. o The function that predicts how energy (or atoms) will be distributed at equilibrium is entropy. • We found that in this case (blocks of equal size and composition), energy will be distributed equally between them at equilibrium. • How do we develop this mathematically? Predicting the Equilibrium Distribution Probability! • Consider again the energy distribution. • What is maximized when the system is at equilibrium? • How do we know when that function is maximized? • What is mathematical characteristic does the maximum of function have? Its first differential is 0. Probability Function • So the function we want is the probability, P of the system (a copper block in this case) being found in a particular state, E. As we have seen, this is proportional to the number of combinations, Ω(E), corresponding to that state: P(E) = CΩ(E) o So we can use the function Ω(E) in place of P(E) • A difficulty here is that both P(E) and Ω(E) are multiplicative. So the number of assessable states for the two blocks is Ωleft xΩright. Our other thermodynamic properties are additive. • How do we convert a multiplicative property to an additive one? o Take the log: ln (Ω). Defining Entropy • Ludwig Boltzmann defined entropy, S, as S = k ln Ω o Where k is Boltzmann’s constant. o R = k × NA • Entropy is a measure of the randomness of a system. • An increase in entropy of a system corresponds to a decrease in knowledge of it. • We can decrease the entropy of a “system”, but only by increasing the entropy of its surroundings. Temperature & Statistical Mechanics • We noted that we can find the maximum of the probability function by taking its derivative. • For our blocks, equilibrium occurs where d lnW(E)left d lnW(E)right = d Eleft d Eright • So this function ∂Ω/∂E, appears to be a useful one as well; we’ll call this function β. • The two blocks are in equilibrium when βleft = βright. • We other variable is equal when the two blocks are in equilibrium? o Temperature! • It turns out that β= 1/kT The Second Law • • • Entropy also has the interesting • property that in any spontaneous reaction, the total entropy of the system plus its surroundings must never decrease. In our example, this is a simple consequence of the observation that the final probability, P(E), and therefore • also Ω, will be maximum and hence never be less than the original one. Any decrease in entropy of one of the blocks must be at least compensated for by an • increase in entropy of the other block. Experience has shown that in any spontaneous transition, the increase in entropy will always exceed the ratio of heat exchanged to temperature. Formally, the Second Law is written as: In the case of a (fictive) reversible process, this becomes an equality. Integrating factors and exact differentials • Any inexact differential that is a function of only two variables can be converted to an exact differential. • dW is an inexact differential, and dV is an exact differential. Since dWrev = -PdV, • dWrev can be converted to a state function by dividing by P since dV =-dWrev/P • Similarly for heat • dQrev/T = dS • Here we convert heat to the state function entropy by dividing by T. Back to our box • Entropy relates not just to the distribution of energy, but of atoms and molecules as well. • In our box with two gases, the most likely state after we removed the partition was one in which the He and Ne atoms would be randomly mixed, with equal numbers on both sides. • What changed when we removed the partition from our box was that the entropy of the system increased.