Thermodynamics for Mathematicians (III)

Note: calculus, specifically integration, is essential in this article, though students can possibly just substitute it with summation to achieve the same result.

In the previous installation, we defined a temperature scale by looking at the efficiency of a heat engine. However, recall we could also define a temperature scale in the case of an ideal  gas via f(PVN) = PV/N. How do these two compare?

7. Optional Interlude: Temperature for an Ideal Gas

We prepare a homogeneous ideal gas with parameters (P_1, V_1), constant N, whose ideal gas temperature is T_1 = P_1 V_1 / N. Next we subject it to the following cycle:

  1. Connect the gas to a heat source at temperature T_1. Expand it to (P_2, V_2).
  2. Seal the gas adiabatically and expand it further to (P_3, V_3). Measure the temperature and write it as T_2 = P_3 V_3 / N.
  3. Connect the gas to a heat source at temperature T_2. Contract it to (P_4, V_4).
  4. Seal the gas adiabatically and contract it till we obtain the original parameters (P_1, V_1).

We call the above sequence a Carnot cycle. Recall that two ideal gases at the same temperature satisfies PV = P'V' since N is constant, and during adiabatic transformation, we have (P'/P) = (V'/V)^{-(c+1)/c}. If we look at the state of the gas throughout the entire transformation, we get the following PV graph:

Next, observe that each of the four steps is reversible since each process is either adiabatic or performed at the same temperature as the heat source (a process which occurs at constant temperature is said to be isothermal). Since the initial and final states of the gas are identical, dU = 0, so the net result is an extraction of heat Q_1 from the hotter source during the first step, and a deposit of heat Q_2 into the colder source during the third step, i.e. it is a reversible heat engine! Let’s calculate Q_2 / Q_1 by writing out the equations relating the state parameters.

  1. P_1 V_1 = P_2 V_2 \implies P_2/P_1 = V_1/V_2 since this is isothermal;
  2. (P_3/P_2) = (V_3/V_2)^{-(c+1)/c} since this is adiabatic;
  3. P_3 V_3 = P_4 V_4 \implies P_4/P_3 = V_3/V_4 since this is isothermal;
  4. (P_1/P_4) = (V_1/V_4)^{-(c+1)/c} since this is adiabatic.

Multiplying the four relations then gives us V_1 V_3 = V_2 V_4, or V_2 / V_1 = V_3 / V_4.

To compute Q_1, since step 1 occurs isothermally, there’s no change in the internal energy c·PV of the gas (reminder: this is an ideal gas; for a non-ideal gas the internal energy can depend on its volume/pressure even if the temperature is kept constant). So we only need to find the amount of work done:

Q_1 = \int_{V_1}^{V_2} P\cdot dV = T_1 N \int_{V_1}^{V_2} \frac 1 V dV = T_1 N \log(V_2/V_1).

Likewise Q_2 = T_2 N \log(V_3/V_4). Hence the ratios do match: Q_1 / Q_2 = T_1 / T_2, so the ideal gas temperature scale is consistent with the thermodynamic temperature up to a scaling factor.

8. Defining Entropy

From here onwards, we shall assume that our temperature is the thermodynamic temperature.

Suppose we have a system which is connected to heat sources T_1, T_2, \dots, T_r sequentially, and takes in heat Q_i from the heat source T_i. Here, Q_i can be negative, in which case the system actually releases heat into the heat source. We shall prove the following.

If the initial and final states of the system are identical, then \sum_{i=1}^r Q_i/T_i \le 0. Equality holds if and only if the entire process is reversible.

[ Conceptual exercise: since the initial and final states of the system are identical, does that mean the internal energy is unchanged? If so, is the net heat \sum_{i=1}^r Q_i extracted equal to zero? ]

Proof. Create a new heat source at some arbitrary temperature T. For i=1, 2, …, r we connect a reversible heat engine between T and Ti such that

  • the heat engine takes in heat \frac T {T_i}\times Q_i from T;
  • it then releases heat Q_i into T_i;
  • and converts the balance into work.

When this is performed together with the earlier process, we see that the net transfer of heat into each of T_1, T_2, \dots, T_r is zero. On the other hand, the transfer of heat from source T is given by:

\sum_{i=1}^r \frac T {T_i} Q_i = T \times \sum_{i=1}^r \frac {Q_i}{T_i},

and all of it is converted into work. Kelvin Law then stipulates that this value must be non-positive. So the result follows. To prove the second statement, if the sum is zero, then the two processes are mutual reverses of each other; conversely, if the process is reversible then so is the concatenation of the two processes, which is the conversion of work into heat. By Kelvin Law again, the only way this can be reversible is when the amount of work converted is zero. ♦

Let’s consider the continuous variant of the above result.

During a small time step, suppose a system absorbs heat dQ from a heat source at temperature T. If the process is reversible and the initial and final states of the system are identical, then

\int \frac 1 T dQ = 0.

This means for any two states A and B of a system, if we take a reversible process which brings the system from A to B, then the integral \int \frac 1 T dQ along the path is independent of the process we pick, as long as it is reversible. Thus we can define a state parameter S such that S(B) - S(A) = \int \frac 1 T dQ, or in differential format, dS = \frac 1 T {dQ}. This is the entropy of the system, which is well-defined up to an additive constant.

Example 7. We meet our old friend, the ideal gas with state (PVN). What is its entropy? For that, we need to find a reversible process which takes the gas from (P_1, V_1, N) to (P_2, V_2, N), assuming N is fixed for now. What better choice than to pick parts of the Carnot cycle?

  • For an isothermal process, S_2 - S_1 = \int \frac 1 T dQ = \frac Q T, where Q is the total amount of heat pumped in. Since the temperature of the system remains constant, so is the internal energy (remember: ideal gas!) and thus all heat is used to do work, i.e. S_2 - S_1 = \int_{V_1}^{V_2} P/T\cdot dV = N \log(V_2/V_1) since P = TN/V. This happens when (P_2/P_1) = (V_2/V_1)^{-1}.
  • For an adiabatic process, S_2 - S_1 = 0 since dQ = 0 throughout (the very definition of adiabatic). This happens when (P_2/P_1) = (V_2/V_1)^{-(c+1)/c}.

 Putting these together, we can take:

 S(P, V, N) = N(c\log P+(c+1)\log(V)) + t(N)

where t(N) is an additive constant dependent on N. We will figure out a more complete expression for this later.

9. More About Entropy

One important consequence is that the entropy of an adiabatically sealed system must never decrease. More generally, suppose there’s a process C which brings a system from state A to state B (i.e. the system is now interacting with its environment). Now we construct a reversible process D which brings the system from state B back to state A. If we perform D followed by C, then we get:

0 \ge \int_{C\cup D} \frac 1 T dQ = \int_C \frac 1 T dQ + \int_D \frac 1 T dQ.

Since D is reversible, the second summand is just S(A) – S(B). So we have

\int_C \frac 1 T dQ \le S(B) - S(A).

In the case of an adiabatically sealed system, the left-hand-side is 0, so S(B) \ge S(A). This gives the more commonly known variant of the second law of thermodynamics: the entropy of an adiabatically sealed system tends to increase. However, we now see that this is actually a consequence – in fact, without Clausius or Kelvin Law, we wouldn’t be able to define a total ordering on the set of temperatures, let alone talk about heat engines or define entropy.

Example 8. This is the quintessential example of an increase in entropy of an isolated system. Suppose heat Q flows from an area of higher temperature T_1 to an an area of lower temperature T_2. The hotter area thus loses entropy Q/T_1 while the colder area gains entropy Q/T_2. Thus, if we only look at the union of these two heat sources, the change in entropy is Q(T_2^{-1} - T_1^{-1}) > 0.

Finally, the Third Law of Thermodynamics states that in general, the entropy of a system is non-negative and as T \to 0, the entropy of the system also tends to 0. In particular, the third law enables us to find the “additive constant” for the formula of entropy.

This entry was posted in Notes and tagged , , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s