# Understanding entropy calculations

1. Nov 25, 2014

### fayled

1. The problem statement, all variables and given/known data
A mass m of water cools down from 50degc to 10degc (the temperature of the surrounding environment). Calculate the entropy increase of the system (the water). The water has specific heat capacity c.

2. Relevant equations
dS=dQrev/T
S is entropy, Q is heat added to the system, T is temperature.

3. The attempt at a solution
So I can get the answer by doing
S=∫dQrev/T
dQrev=mcdT
S=mc∫dT/T from T=323K to T=283K
S=mcln(323/283)J/K.

However I don't exactly understand why this works - as above, entropy is defined in terms of the heat added to the system in a reversible process. However, this cooling of water is not a reversible process, so why am I allowed to simply set dQrev=mcdT if mcdT is not the heat added to the system in a reversible change?

Thankyou :)

2. Nov 25, 2014

### Staff: Mentor

In determining the entropy change from the initial equilibrium state of a system to the final equilibrium state of the system, you need to dream up a reversible path between these two equilibrium states. Don't forget that entropy is a physical property of the materials comprising the system, and not a function of any specific process. However, to get the change in entropy from equilibrium state A to equilibrium state B, you need to do the calculation for a reversible path between the two states. In the specific system and states that you are considering, a reversible path might involve contacting the water with a sequence of constant temperature reservoirs at slightly different temperatures (along the path from the initial temperature to the final temperature). This would be consistent with the integral you wrote down. Incidentally, for the change you described, the entropy decreases, rather than increases.

Chet

3. Nov 25, 2014

### fayled

Thanks for the reply. So I am basically utilizing the fact that entropy is a funcion of state, so I can do the calculation via any path between the start and end states - this makes sense.

Another problem then. Suppose I calculate the entropy change of the whole universe now for the above example - we would find that it increased.

Now some general theory:
dS=dQrev/T, so treating the universe as a thermally isolated system, if a reversible process happens in it, dS=0. We can also show that for an irreversible process, dS>0.

Back to the above modification, then. The theory I introduced seems to imply that:
If we calculate the entropy change via a reversible path (which was what I would do to get the total entropy change of the universe), we should find the entropy doesn't change (which clearly isn't the case from the above example).
If we calculate the entropy change via an irreversible path, we get the entropy increasing.

There are multiple inconsistencies in what I have written above, so I'm clearly missing something fundamental. Can you spot it?

4. Nov 25, 2014

### Staff: Mentor

Yes. The entropy change for the combination of system and surroundings for the reversible path that I discussed is zero, not greater than zero. Here's how:

Let's discuss the constant temperature reservoirs that I'm using. They consist of a liquid at its melting point, with solid material floating on the liquid. If I add heat to one of these reservoirs, some of the solid melts to form liquid, but, without the temperature changing. If I remove heat from one of them, some of the liquid solidifies to form solid, but, without the temperature changing.

Now let's consider the reversible path to cool the water. I contact the water with a sequence of these constant temperature reservoirs, each at a slightly different temperature. For each step of the cooling, one of the reservoirs absorbs a small amount of heat from the water. Then the water is brought into contact with the next reservoir in the sequence, at a slightly lower temperature. For each reservoir, the final state is the same as the initial state, except for a small amount of solid that has melted to form a little more liquid. So the entropy of each reservoir rises just a little. The sum of the entropy increases of all the reservoirs is the same as the entropy decrease of the water, and there is no change in entropy for the combination of water and reservoir sequence.

Now let's consider an irreversible path between the initial and final states of the system. In this case, we use only a single reservoir at the final temperature (10 C in our example). The entropy change for the water is still exactly the same as it was for the irreversible path (state function). However, for the surroundings (the reservoir), all the heat transfer takes place at the lowest temperature of 10C, so the entropy change of the surroundings is higher than for case where we used a sequence of reservoirs. The net effect is that the entropy change for the combination of system and surroundings is now greater than zero.

I hope that this makes sense.

Chet

5. Nov 26, 2014

### fayled

This makes sense, but for my above example I can't quite get it to fit in with my calculation of the entropy increase of the reservoir (the surroundings).

When I do this calculation I do ΔS=∫dQrev/T=ΔQrev/T where T is the temperature of the reservoir. Now clearly this is giving me the correct entropy change of the surroundings for the irreversible case which I want, because I get an overall positive entropy from the system/surroundings combined (if I did it for the irreversible case, I would get zero entropy change).

But I can't see why - for the case of the cooling water, I was able to dream up a reversible process allowing me to find the same entropy change. But I don't seem to be doing such a thing here (which is just aswell, because then surely I would be doomed to treating the whole process reversibly and so would get a zero entropy change), and clearly I am using the details from the irreversible process here (T is constant reservoir temperature) so what exactly have I done in this calculation.

6. Nov 26, 2014

### Staff: Mentor

I'm not able to follow. Please provide more detail on what you are doing for (a) the reversible process and (b) the irreversible process. Maybe choose as the specific example the water problem that you are working on. Please describe in detail each of the processes you are using to evaluate the delta S's. We are going to get to the bottom of this.

Chet

7. Nov 26, 2014

### fayled

Right, let me try and condense my thoughts about the cooling water (no pun intended) into one post.

So if we want to find the entropy change of the universe due to the cooling of the water, we can split the problem into two and then just sum them:
a) The entropy change of the system (the water)
b) The entropy change of the reservoir (the surroundings)

I now understand the reasoning behind the workings for a). To summarize, because entropy is a function of state, and the start and end points will be the same whether or not we consider the irreversible process or some reversible process (such as the one you described), we can calculate the entropy change along the reversible path, so we can use the definition of entropy to find
ΔS=∫dQrev/T=C∫dT/T=Cln(Ti/Tf)
where Tf is the final temperature of the water and Ti is the initial temperature of the water (let's drop the numbers).

Now b) is my problem. To calculate the entropy change of the surroundings, I do the calculation
ΔS=∫dQrev/TR=ΔQrev/TR=CΔT/TR=C(Tf-Ti)/TR.
i.e say the reversible heat transfer into the surroundings is just that lost by the water, and say that the reservoir has constant temperature TR.

Thinking about it, the calculation for part b) may not be correct, which would help to clear some of my confusion. Is this the case?

Actually, no, my book agrees with what I have done.

So, my problem with this calculation is:
I seem to have treated the transfer of C(Tf-Ti) with the reservoir at constant temperature as a reversible process in order to do the calculation using the definition of entropy. Why is this ok (I'm assuming this is because I have dreamed up a reversible process with the same final and initial states, but I can't see how).
However if this is the case, I am confused - the cooling of the water is an irreversible process (entropy of universe rises) - therefore how would it make sense that we could treat the cooling of the water, and the heating of the reservoir, as two reversible events (entropy of universe stays the same) with the same initial and final states as in the irreversible event. Especially because if they have the same initial and final states they should have the same entropy changes. I'm getting very tangled up with all this.

Last edited: Nov 26, 2014
8. Nov 26, 2014

### Staff: Mentor

Let's do some modeling calculations to help solidify your understanding. We are going to be doing 3 different problems of increasing complexity, but I'm confident you can handle them all. Each of the three problems involves an irreversible process, but some of the processes are "more irreversible" than others. We are going to be working with the exact same system as your original problem statement.

Problem 1:
The water at 50 C is brought into contact with a single constant temperature reservoir at 10 C (the lowest temperature in your problem statement), and the water and reservoir are allowed to come to thermodynamic equilibrium. What is the change in entropy of the water and what is the change in entropy of the reservoir? What is the change in entropy of the combination of water and reservoir?

Problem 2:
This involves a two-step process. Step 1: The water at 50 C is brought into contact with a constant temperature reservoir at 30 C (half way between your highest and lowest temperatures), and the water and reservoir are allowed to come to thermodynamic equilibrium. Step 2: The water at 30 C is then moved out of contact with the reservoir at 30 C, and is moved into contact with a second constant temperature reservoir at 10C. What is the change in entropy of the water and what is the change in entropy of the reservoir for each of these steps. What is the total change in entropy for the combination of water and reservoirs?

Problem 3:
Same as Problem 2 except with 4 steps, with sequential reservoirs at 40C, 30 C, 20 C, and 10 C.

Compare the combined entropy changes for the 3 problems. What would happen if we solve the problem with still more reservoirs?

Chet

9. Nov 28, 2014

### fayled

At each stage of every problem, the entropy change of the water is
ΔS=mcln(Tf/Ti)
and the entropy change ofthe reservoir is
ΔS=mc(Tf-Ti)/TR
where TR is the reservoir temperature, Ti the initial water temperature and Tf the final water temperature.

1. Water: mcln(10+273/50+273)=mcln(283/323)=-0.132mc
Reservoir: mc(40)/10=4mc
Overall: 3.867mc

2. Step 1:
Water: mcln(30+273/50+273)=mcln(303/323)=-0.064mc
Reservoir: mc(20)/30=2mc/3

Step 2:
Water: mcln(10+273/30+273)=mcln(283/303)=-0.068mc
Reservoir: mc(20)/10=2mc

Overall: 2.535mc

3. Obviously with more steps we get a smaller answer.

In the limit of an infinite number of steps, the entropy change overall goes to zero (the process is reversible).

I still don't feel comfortable with the way I have calculated the reservoir entropy change though. For 1. the reservoir entropy change is not reversible yet I have used my formula which was derived from using the definition of entropy dS=∫dQrev/T.

10. Nov 29, 2014

### fayled

EDITED:

At each stage of every problem, the entropy change of the water is
ΔS=mcln(Tf/Ti)
and the entropy change ofthe reservoir is
ΔS=mc(Tf-Ti)/TR
where TR is the reservoir temperature, Ti the initial water temperature and Tf the final water temperature.

1. Water: mcln(10+273/50+273)=mcln(283/323)=-0.132mc
Reservoir: mc(40)/283=0.141mc
Overall: 0.009mc

2. Step 1:
Water: mcln(30+273/50+273)=mcln(303/323)=-0.064mc
Reservoir: mc(20)/303=0.066mc

Step 2:
Water: mcln(10+273/30+273)=mcln(283/303)=-0.068mc
Reservoir: mc(20)/283=0.071mc

Overall: 0.005mc

3. Obviously with more steps we get a smaller answer.

In the limit of an infinite number of steps, the entropy change overall goes to zero (the process is reversible).

I still don't feel comfortable with the way I have calculated the reservoir entropy change though. For 1. the reservoir entropy change is not reversible yet I have used my formula which was derived from using the definition of entropy dS=∫dQrev/T.

11. Nov 29, 2014

### Staff: Mentor

You calculated the entropy change correctly for the reservoirs in all the cases. You indicate that, for problem 1, "the reservoir entropy change is not reversible." I think you mean is that "the heat transfer process for the reservoir was not reversible." Actually, you don't know this.

You have enough knowledge right now to correctly calculate the change in entropy for the combined system of water plus reservoir(s), but you currently don't have enough knowledge to ascertain in which part of the combined system the main amount of irreversibility occurred. That all depends on the transient temperature behavior of the system. And in particular, it depends on the temperature vs time variation and the rate of heat flow variation at the interface between the water and the reservoir(s). When we say that a reservoir is a constant temperature reservoir, we mean that, in the initial and final equilibrium states of the combined system, the reservoir temperature is the same (and uniform). But, during the time that heat is being transferred between the water and the reservoir, the temperature within the reservoir will not be uniform, and will be hotter near the interface with the hotter water. And, during the time that the heat is being transferred, the temperature of the water will not be uniform, but will be colder near the interface than the colder reservoir. This is how heat transfer by heat conduction, an irreversible exchange, occurs (remember from freshman physics).

Have you learned yet about the Clausius inequality. Clausius determined that, for an irreversible process applied to a closed system that
$$\Delta S > \int{\frac{dQ}{T_I}}$$
where TI is the temperature at the interface (boundrary) of the system and dQ is the heat transferred at the boundary. This inequality applies to the water in our system as well as to the reservoir(s). Each of these are a subsystem of the combined system. If you want to get a handle on the amount of irreversibility that occurred in a particular subsystem, you just take $\Delta S$ and subtract $\int{\frac{dQ}{T_I}}$. The larger this number, the more the amount of irreversibility that took place in that subsystem.

If we evaluate the above inequality for both the water and the reservoirs, we get:

$$\Delta S_w > \left(\int{\frac{dQ}{T_I}}\right)_w$$

$$\Delta S_r > \left(\int{\frac{dQ}{T_I}}\right)_r$$

But we know that the heat flow to the reservoir is equal to minus the heat flow to the water, and the temperature at the interface between the water and the reservoir is the same for both. So, if we add the two inequalities together, we get:
$$\Delta S_w + \Delta S_r > 0$$
This is what we found, irrespective of the transient heat transfer behavior of the combined system.

I would also like note that, from your previous calculations, as you add more reservoirs to the sequence, the combined entropy change decreases inversely with the number of reservoirs (as you can show by further calculations).

Also, here is a short write up on the first and second laws that may be helpful for your understanding:

FIRST LAW OF THERMODYNAMICS

Suppose that we have a closed system that at initial time ti is in an initial equilibrium state, with internal energy Ui, and at a later time tf, it is in a new equilibrium state with internal energy Uf. The transition from the initial equilibrium state to the final equilibrium state is brought about by imposing a time-dependent heat flow across the interface between the system and the surroundings, and a time-dependent rate of doing work at the interface between the system and the surroundings. Let $\dot{q}(t)$ represent the rate of heat addition across the interface between the system and the surroundings at time t, and let $\dot{w}(t)$ represent the rate at which the system does work on the surroundings at the interface at time t. According to the first law (basically conservation of energy),
$$\Delta U=U_f-U_i=\int_{t_i}^{t_f}{(\dot{q}(t)-\dot{w}(t))dt}=Q-W$$
where Q is the total amount of heat added and W is the total amount of work done by the system on the surroundings at the interface.

The time variation of $\dot{q}(t)$ and $\dot{w}(t)$ between the initial and final states uniquely characterizes the so-called process path. There are an infinite number of possible process paths that can take the system from the initial to the final equilibrium state. The only constraint is that Q-W must be the same for all of them.

If a process path is irreversible, then the temperature and pressure within the system are inhomogeneous (i.e., non-uniform, varying with spatial position), and one cannot define a unique pressure or temperature for the system (except at the initial and the final equilibrium state). However, the pressure and temperature at the interface can be measured and controlled using the surroundings to impose the temperature and pressure boundary conditions that we desire. Thus, TI(t) and PI(t) can be used to impose the process path that we desire. Alternately, and even more fundamentally, we can directly control, by well established methods, the rate of heat flow and the rate of doing work at the interface $\dot{q}(t)$ and $\dot{w}(t)$).

Both for reversible and irreversible process paths, the rate at which the system does work on the surroundings is given by:
$$\dot{w}(t)=P_I(t)\dot{V}(t)$$
where $\dot{V}(t)$ is the rate of change of system volume at time t. However, if the process path is reversible, the pressure P within the system is uniform, and

$P_I(t)=P(t)$ (reversible process path)

Therefore, $\dot{w}(t)=P(t)\dot{V}(t)$ (reversible process path)

Another feature of reversible process paths is that they are carried out very slowly, so that $\dot{q}(t)$ and $\dot{w}(t)$ are both very close to zero over then entire process path. However, the amount of time between the initial equilibrium state and the final equilibrium state (tf-ti) becomes exceedingly large. In this way, Q-W remains constant and finite.

SECOND LAW OF THERMODYNAMICS

In the previous section, we focused on the infinite number of process paths that are capable of taking a closed thermodynamic system from an initial equilibrium state to a final equilibrium state. Each of these process paths is uniquely determined by specifying the heat transfer rate $\dot{q}(t)$ and the rate of doing work $\dot{w}(t)$ as functions of time at the interface between the system and the surroundings. We noted that the cumulative amount of heat transfer and the cumulative amount of work done over an entire process path are given by the two integrals:
$$Q=\int_{t_i}^{t_f}{\dot{q}(t)dt}$$
$$W=\int_{t_i}^{t_f}{\dot{w}(t)dt}$$
In the present section, we will be introducing a third integral of this type (involving the heat transfer rate $\dot{q}(t)$) to provide a basis for establishing a precise mathematical statement of the Second Law of Thermodynamics.

The discovery of the Second Law came about in the 19th century, and involved contributions by many brilliant scientists. There have been many statements of the Second Law over the years, couched in complicated language and multi-word sentences, typically involving heat reservoirs, Carnot engines, and the like. These statements have been a source of unending confusion for students of thermodynamics for over a hundred years. What has been sorely needed is a precise mathematical definition of the Second Law that avoids all the complicated rhetoric. The sad part about all this is that such a precise definition has existed all along. The definition was formulated by Clausius back in the 1800's.

Clausius wondered what would happen if he evaluated the following integral over each of the possible process paths between the initial and final equilibrium states of a closed system:
$$I=\int_{t_i}^{t_f}{\frac{\dot{q}(t)}{T_I(t)}dt}$$
where TI(t) is the temperature at the interface with the surroundings at time t. He carried out extensive calculations on many systems undergoing a variety of both reversible and irreversible paths and discovered something astonishing. He found that, for any closed system, the values calculated for the integral over all the possible reversible and irreversible paths (between the initial and final equilibrium states) was not arbitrary; instead, there was a unique upper bound (maximum) to the value of the integral. Clausius also found that this result was consistent with all the "word definitions" of the Second Law.

Clearly, if there was an upper bound for this integral, this upper bound had to depend only on the two equilibrium states, and not on the path between them. It must therefore be regarded as a point function of state. Clausius named this point function Entropy.

But how could the value of this point function be determined without evaluating the integral over every possible process path between the initial and final equilibrium states to find the maximum? Clausius made another discovery. He determined that, out of the infinite number of possible process paths, there existed a well-defined subset, each member of which gave the same maximum value for the integral. This subset consisted of what we call today the reversible process paths. So, to determine the change in entropy between two equilibrium states, one must first conceive of a reversible path between the states and then evaluate the integral. Any other process path will give a value for the integral lower than the entropy change.

So, mathematically, we can now state the Second Law as follows:

$$I=\int_{t_i}^{t_f}{\frac{\dot{q}(t)}{T_I(t)}dt}\leq\Delta S=\int_{t_i}^{t_f} {\frac{\dot{q}_{rev}(t)}{T(t)}dt}$$
where $\dot{q}_{rev}(t)$ is the heat transfer rate for any of the reversible paths between the initial and final equilibrium states, and T(t) is the system temperature at time t (which, for a reversible path, is equal to the temperature at the interface with the surroundings). This constitutes a precise mathematical statement of the Second Law of Thermodynamics.

Chet