Consequences of the Second Law of Thermodynamics

Why a Carnot process using a Van der Waals gas – or other fluid with uncommon equation of state – also runs at Carnot’s efficiency.

Textbooks often refer to an ideal gas when introducing Carnot’s cycle – it’s easy to calculate heat energies and work in this case. Perhaps this might imply that not only must the engine be ‘ideal’ – reversible – but also the working fluid has to be ‘ideal’ in some sense? No, it does not, as explicitly shown in this paper: The Carnot cycle with the Van der Waals equation of state.

In this post I am considering a class of substances which is more general than the Van der Waals gas, and I come to the same conclusion. Unsurprisingly. You only need to imagine Carnot’s cycle in a temperature-entropy (T-S) diagram: The process is represented by a rectangle for both ideal and Van der Waals gas. Heat energies and work needed to calculate efficiency can be read off, and the – universal – maximum efficiency can be calculated without integrating over potentially wiggly pressure-volume curves.

But the fact that we can use the T-S diagram or the fact that the concept of entropy makes sense is a consequence of the Second Law of Thermodynamics. It also states, that a Perpetuum Mobile of the Second Kind is not possible: You cannot build a machine that converts 100% of the heat energy in a temperature bath to mechanical energy. This statement sounds philosophical but it puts constraints on the way real materials can behave, and I think these constraints on the relations between physical properties are stronger than one might intuitively expect. If you pick an equation of state – the pressure as a function of volume and temperature, like the wavy Van der Waals curve, the behavior of specific heat is locked in. In a sense the functions describing the material’s properties have to conspire just in the right way to yield the simple rectangle in the T-S plane.

The efficiency of a perfectly reversible thermodynamic engine (converting heat to mechanical energy) has a maximum well below 100%. If the machine uses two temperature baths with constant temperatures T_1 and T_2, the heat energies exchanged between machine and baths Q_1 and Q_2 for an ideal reversible process are related by:

\frac{Q_1}{T_1} + \frac{Q_2}{T_2} = 0

(I wrote on the related proof by contradiction before – avoiding to use the notion of entropy at all costs). This ideal process and this ideal efficiency could also be used to actually define the thermodynamic temperature (as it emerges from statistical considerations; I have followed Landau and Lifshitz’s arguments in this post on statistical mechanics and entropy)

Any thermodynamic process using any type of substance can be imagined as being a combination of lots of Carnot engines operating between lots of temperature baths at different temperatures (see e.g. Feynman’s lecture). The area in the p-V diagram that is traced out in a cyclic process is being split into infinitely many Carnot processes. For each process small heat energies \delta Q are transferred. Summing up the contributions of all processes only the loop at the edge remains and thus …

\oint \frac{\delta Q}{T}

which means that for a reversible process \frac{\delta Q}{T} actually has to be a total differential of a function dS … that is called entropy. This argument used in thermodynamics textbooks is kind of a ‘reverse’ argument to the statistical one – which introduces  ‘entropy first’ and ‘temperature second’.

What I  need in the following derivations are the relations between differentials that represent a version of First and Second Law:

The First Law of Thermodynamics states that heat is a form of energy, so

dE = \delta Q - pdV

The minus is due to the fact that energy is increased on increasing volume (There might be other thermodynamics degrees of freedom like the magnetization of a magnetic substance – so other pairs of variables like p and V).

Inserting the definition of entropy S as the total differential we obtain this relation …

dS = \frac{dE + pdV}{T}

… from which follow lots of relations between thermodynamic properties!

I will derive one the them to show how strong the constraints are that the Second Law actually imposes on the physical properties of materials: When the so-called equation of state is given – the pressure as a function of volume and temperature p(V,T) – then you also know something about its specific heat. For an ideal gas pV is simply a constant times temperature.

S is a function of the state, so picking independent variables V and T entropy’s total differential is:

dS = (\frac{\partial S}{\partial T})_V dT + (\frac{\partial S}{\partial V})_T dV

On the other hand, from the definition of entropy / the combination of 1st and 2nd Law given above it follows that

dS = \frac{1}{T} \left \{ (\frac{\partial E }{\partial T})_V dT + \left [ (\frac{\partial E }{\partial V})_T + p \right ]dV \right \}

Comparing the coefficients of dT and dV the partial derivatives of entropy with respect to volume and temperature can be expressed as functions of energy and pressure. The order of partial derivation does not matter:

\left[\frac{\partial}{\partial V}\left(\frac{\partial S}{\partial T}\right)_V \right]_T = \left[\frac{\partial}{\partial T}\left(\frac{\partial S}{\partial V}\right)_T \right]_V

Thus differentiating each derivative of S once more with respect to the other variable yields:

[ \frac{\partial}{\partial V} \frac{1}{T} (\frac{\partial E }{\partial T})_V ]_T = [ \frac{\partial}{\partial T} \frac{1}{T} \left [ (\frac{\partial E }{\partial V})_T + p \right ] ]_V

What I actually want, is a result for the specific heat: (\frac{\partial E }{\partial T})_V – the energy you need to put in per degree Kelvin to heat up a substance at constant volume, usually called C_v. I keep going, hoping that something like this derivative will show up. The mixed derivative \frac{1}{T} \frac{\partial^2 E}{\partial V \partial T} shows up on both sides of the equation, and these terms cancel each other. Collecting the remaining terms:

0 = -\frac{1}{T^2} (\frac{\partial E }{\partial V})_T -\frac{1}{T^2} p + \frac{1}{T}(\frac{\partial p}{\partial T})_V

Multiplying by T^2 and re-arranging …

(\frac{\partial E }{\partial V})_T = -p +T(\frac{\partial p }{\partial T})_V = T^2(\frac{\partial}{\partial T}\frac{p}{T})_V

Again, noting that the order of derivations does not matter, we can use this result to check if the specific heat for constant volume – C_v = (\frac{\partial E }{\partial T})_V – depends on volume:

(\frac{\partial C_V}{\partial V})_T = \frac{\partial}{\partial V}[(\frac{\partial E }{\partial T})_V]_T = \frac{\partial}{\partial T}[(\frac{\partial E }{\partial V})_T]_V

But we know the last partial derivative already and insert the expression derived before – a function that is fully determined by the equation of state p(V,T):

(\frac{\partial C_V}{\partial V})_T= \frac{\partial}{\partial T}[(-p +T(\frac{\partial p }{\partial T})_V)]_V = -(\frac{\partial p}{\partial T})_V +  (\frac{\partial p}{\partial T})_V + T(\frac{\partial^2 p}{\partial T^2})_V = T(\frac{\partial^2 p}{\partial T^2})_V

So if the pressure depends e.g. only linearly on temperature the second derivative re T is zero and C_v does not depend on volume but only on temperature. The equation of state says something about specific heat.

The idealized Carnot process contains four distinct steps. In order to calculate efficiency for a certain machine and working fluid, you need to calculate the heat energies exchanged between machine and bath on each of these steps. Two steps are adiabatic – the machine is thermally insulated, thus no heat is exchanged. The other steps are isothermal, run at constant temperature – only these steps need to be considered to calculate the heat energies denoted Q_1 and Q_2:


Carnot process for an ideal gas: A-B: Isothermal expansion, B-C: Adiabatic expansion, C-D: isothermal compression, D-A: adiabatic compression. (Wikimedia, public domain, see link for details).

I am using the First Law again and insert the result for (\frac{\partial E}{\partial V})_T which was obtained from the combination of both Laws – the goal is to express heat energy as a function of pressure and specific heat:

\delta Q= dE + p(T,V)dV = (\frac{\partial E}{\partial T})_V dT + (\frac{\partial E}{\partial V})_T dV + p(T,V)dV
= C_V(T,V) dT + [-p +T(\frac{\partial p(T,V)}{\partial T})_V] dV + p(T,V)dV = C_V(T,V)dT + T(\frac{\partial p(T,V)}{\partial T})_V dV

Heat Q is not a function of the state defined by V and T – that’s why the incomplete differential δQ is denoted by the Greek δ. The change in heat energy depends on how exactly you get from one state to another. But we know what the process should be in this case: It is isothermal, therefore dT is zero and heat energy is obtained by integrating over volume only.

We need p as a function of V and T. The equation of state for ideal gas says that pV is proportional to temperature. I am now considering a more general equation of state of the form …

p = f(V)T + g(V)

The Van der Waals equation of state takes into account that particles in the gas interact with each other and that they have a finite volume (Switching units, from capital volume V [m3] to small v [m3/kg] to use gas constant R [kJ/kgK] rather than absolute numbers of particles and to use the more common representation – so comparing to $latex pv = RT) :

p = \frac{RT}{v - b} - \frac{a}{v^2}

This equation also matches the general pattern.

Van der Waals isothmers (Waals3)

Van der Waals isotherms (curves of constant temperature) in the p-V plane: Depending on temperature, the functions show a more or less pronounced ‘wave’ with a maximum and a minimum, in contrast to the ideal-gas-like hyperbolas (p = RT/v) for high temperatures. (By Andrea insinga, Wikimedia, for details see link.)

In both cases pressure depends only linearly on temperature, and so (\frac{\partial C_V}{\partial V})_T is 0. Thus specific heat does not depend on volume, and I want to stress that this is a consequence of the fundamental Laws and the p(T,V) equation of state, not an arbitrary, additional assumption about this substance.

The isothermal heat energies are thus given by the following, integrating T(\frac{\partial p(T,V)}{\partial T})_V  = T f(V) over V:

Q_1 = T_1 \int_{V_A}^{V_B} f(V) dV
Q_2 = T_2 \int_{V_C}^{V_D} f(V) dV

(So if Q_1 is positive, Q_2 has to be negative.)

In the adiabatic processes δQ is zero, thus

C_V(T,V)dT = -T(\frac{\partial p(T,V)}{\partial T})_V dV = -T f(V) dV
\int \frac{C_V(T,V)}{T}dT = \int -f(V) dV

This is useful as we already know that specific heat only depends on temperature for the class of substances considered, so for each adiabatic process…

\int_{T_1}^{T_2} \frac{C_V(T)}{T}dT = \int_{V_B}^{V_C} -f(V) dV
\int_{T_2}^{T_1} \frac{C_V(T)}{T}dT = \int_{V_D}^{V_A} -f(V) dV

Adding these equations, the two integrals over temperature cancel and

\int_{V_B}^{V_C} f(V) = -\int_{V_D}^{V_A} f(V) dV

Carnot’s efficiency is work – the difference of the absolute values of the two heat energies – over the heat energy invested at higher temperature T_1 :

\eta = \frac {Q_1 - \left | Q_2 \right |}{Q_1} = 1 - \frac {\left | Q_2 \right |}{Q_1}
\eta = 1 - \frac {T_2}{T_1} \frac {\left | \int_{V_C}^{V_D} f(V) dV \right |}{\int_{V_A}^{V_B} f(V) dV}

The integral from A to B can replaced by an integral over the alternative path A-D-C-B (as the integral over the closed path is zero for a reversible process) and

\int_{A}^{B} = \int_{A}^{D} + \int_{D}^{C}+ \int_{C}^{B}

But the relation between the B-C and A-D integral derived from considering the adiabatic processes is equivalent to

-\int_{C}^{B} = \int_{B}^{C} = - \int_{D}^{A} = \int_{A}^{D}

Thus two terms in the alternative integral cancel and

\int_{A}^{B} = \int_{D}^{C}

… and finally the integrals in the efficiency cancel. What remains is Carnot’s efficiency:

\eta = \frac {T_1 - T_2}{T_1}

But what if the equation of state is more complex and specific heat would depends also on volume?

Yet another way to state the Second Law is to say that the efficiencies of all reversible processes has to be equal and equal to Carnot’s efficiency. Otherwise you get into a thicket of contradictions (as I highlighted here). The authors of the VdW paper say they are able to prove this for infinitesimal cycles which sounds of course plausible: As mentioned at the beginning, splitting up any reversible process into many processes that use only a tiny part of the co-ordinate space is the ‘standard textbook procedure’ (see e.g. Feynman’s lecture, especially figure 44-10).

But you could immediately see it without calculating anything by having a look at the process in a T-S diagram instead of the p-V representation. A process made up of two isothermal and two adiabatic processes is by definition (of entropy, see above) a rectangle no matter what the equation of state of the working substance is. Heat energy and work can easily been read off as the rectangles between or below the straight lines:


Carnot process displayed in the entropy-temperature plane. No matter if the working fluid is an ideal gas following the pv = RT equation of state or if it is a Van der Waals gas that may show a ‘wave’ with a maximum and a minimum in a p-V diagram – in the T-S diagram all of this will look like rectangles and thus exhibit the maximum (Carnot’s) efficiency.

In the p-V diagram one might see curves of weird shape, but when calculating the relation between entropy and temperature the weirdness of the dependencies of specific heat and pressure of V and T compensate for each other. They are related because of the differential relation implied by the 2nd Law.

Random Thoughts on Temperature and Intuition in Thermodynamics

Recent we felt a disturbance of the force: It has been demonstrated that the absolute temperature of a real system can be pushed to negative values.

The interesting underlying question is: What is temperature really? Temperature seems to be an intuitive everyday concept, yet the explanations of ‘negative temperatures’ prove that it is not.

Actually, atoms have not really been ‘chilled to negative temperatures’. I pick two explanations of this experiment that I found particularly helpful – and entertaining:

As Matt points out The issue is simply that formally temperature is a relationship between energy and entropy, and you can do some weird things to entropy and energy and get the formal definition of temperature to come out negative.

Aatish manages to convey the fact that temperature is inversely proportional to the slope of the entropy vs. energy curve using compelling analogs from economics. The trick is to find meaningful economic terms that are related in a way similar to the obscure physical properties you want to explain. MinutePhysics did something similar in explaining fundamental forces (cannot resist this digression):

I had once worked in laser physics, so Matt’s explanation involving two-level system speaks to me. His explanation avoids to touch on entropy and thus avoids to use the mysterious term entropy to explain mysterious temperature.

You can calculate the probabilities of population of these two states from temperature – or vice versa. If you manage to tweak the population by some science-fiction-like method (creating non equilibrium states) you can end up with a distribution that formally results in negative temperatures if you run the math backwards.

[In order to allow for tagging this post with Physics in a Nutshell I need to state that the nutshell part ends here.]

But how come that ‘temperature’ ever became such an abstract concept?

From a very pragmatic perspective focussed on macroscopic, everyday phenomena temperature is what we measure by thermometers, that is: calculated from the change of the volume of gases or liquids.

You do not need any explanation of what temperature or even entropy really is if you want to design efficient machines, such as turbines.

As a physics PhD working towards an MSc in energy engineering, I have found lectures in Engineering Thermodynamics eye-opening:

As a physicist I had been trained to focus on fundamental explanations: What is entropy really? How do we explain physical properties microscopically? That is: calculating statistical averages of the properties of zillions of gas molecules or imagining an abstract ‘hyperspace’ whose number of dimensions is proportional to the number of particles. The system as such moves through this abstract space as times passes by.

In engineering thermodynamics the question to What is entropy? was answered by: Consider it some property than can be calculated (and used to evaluate machines and processes).

Rankine cycle with reheat

Temperature Entropy diagram for steam. The red line represents a process called Rankine cycle: A turbine is delivering mechanical energy when temperature and pressure of the steam is decreased.

New terms in science have been introduced for fundamental conceptual reasons and/or because they came in handy in calculations. In my point of view, enthalpy belongs to the second class because it makes descriptions of gases and fluids flowing through apparatuses more straight-forward.

Entropy is different despite it can be reduced to its practical aspects. Entropy has been introduced in order to tame heat and irreversibility.

Richard Feynman stated (in Vol. I of his Physics Lectures, published 1963) that research in engineering contributed two times to the foundations of physics: The first time when Sadi Carnot formulated the Second Law of Thermodynamics  (which can be stated in terms of an ever increasing entropy) and the second time when Shannon founded information theory – using the term entropy in a new way. So musing about entropy and temperature – this is where hands-on engineering meets the secrets of the universe.

I tend to state that temperature had never been that understandable and familiar:

Investigations of the behavior of ideal gases (fortunately air, even moist air, is an ideal gas) have revealed that there needs to be an absolute zero temperature – when the volume of an ideal gas would approach zero.

When Clausius coined the term Entropy in 1865 1850 (*), he was searching for a function that allows to depict any process in a diagram such as the figure above, in a sense.
(*) Edit 1 – Jan. 31: Thanks to a true historian of science.

Heat is a vague term – it only exists ‘in transit’: Heat is exchanged, but you cannot assign a certain amount of heat to a state. Clausius searched for a function that could be used to denote one specific state in such a map of states, and he came up with a beautiful and simple relationship. The differential change in heat is equal to the change in entropy times the absolute temperature!  So temperature entered the mathematical formulations of the laws of thermodynamics when doing something really non-intuitive with differentials.

Entropy really seems to be the more fundamental property. You could actually start from the Second Law and define temperature in terms of the efficiency of perfect machines that are just limited by the fact that entropy can only increase (or that heat always needs to flow from the hotter to the colder object):

Beta stirling animation

Stirling motor – converting heat drawn from a hot gas to mechanical energy. Its optimum efficiency would be similar to that of Carnot’s theoretical machine.

The more we learn about the microscopic underpinnings of the laws that have been introduced phenomenologically before, the less intuitive explanations became. It does not help trying to circumvent entropy by considering what each of the particles in the system does. We think of temperature as something as some average over velocities (squared). But a single particle travelling its path through empty space would not have temperature. Neither would any directed motion of a beam of particles contribute to temperature. So temperature is better defined as the mean deviation of a distribution of speeds.

Even if we consider simple gas molecules, we could define different types of temperature: There is a kinetic temperature calculated from velocities. In the long run – when equilibrium has been reached – the other degrees of freedom (sich as rotations) would exhibit the same temperature. But when a gas is heated up, heat is transferred via collisions: So first the kinetic temperature rises, and then the energy is transferred to rotations. You could calculate a temperature from rotations, and this temperature would be different from the kinetic temperature.

So temperature is a property that is derived from what an incredible number of single particles do. It is a statistical property and it makes only sense when a system had enough time to reach an equilibrium. As soon as we push the microscopic constituents of the system that makes them deviate from their equilibrium behaviour, we get strange results for temperature – such as negative values.

Further reading:
This post was also inspired by some interesting discussions on LinkedIn a while ago – on the second law and the nature of temperature.
(*) Edit 2 – Feb. 2: Though Clausius is known as the creator of the term entropy, the concept as such has been developed earlier by Rankine.