$$\require{cancel}$$

# 8: Thermodynamics

## Mathematical introduction

If there exists a relation $$f(x,y,z)=0$$ between 3 variables, one can write: $$x=x(y,z)$$, $$y=y(x,z)$$ and $$z=z(x,y)$$. The total differential $$dz$$ of $$z$$ is than given by:

$dz=\left(\frac{\partial z}{\partial x}\right)_{y}dx+\left(\frac{\partial z}{\partial y}\right)_{x}dy$

By writing this also for $$dx$$ and $$dy$$ it can be shown that

$\left(\frac{\partial x}{\partial y}\right)_{z}\cdot\left(\frac{\partial y}{\partial z}\right)_{x}\cdot\left(\frac{\partial z}{\partial x}\right)_{y}=-1$

Because $$dz$$ is a total differential $$\oint dz=0$$.

A homogeneous function of degree $$m$$ obeys: $$\varepsilon^m F(x,y,z)=F(\varepsilon x,\varepsilon y,\varepsilon z)$$. For such a function Euler’s theorem applies:

$mF(x,y,z)=x\frac{\partial F}{\partial x}+y\frac{\partial F}{\partial y}+z\frac{\partial F}{\partial z}$

## Definitions

• The isochoric pressure coefficient: $$\displaystyle \beta_V=\frac{1}{p}\left(\frac{\partial p}{\partial T}\right)_{V}$$
• The isothermal compressibility: $$\displaystyle \kappa_T=-\frac{1}{V}\left(\frac{\partial V}{\partial p}\right)_{T}$$
• The isobaric volume coefficient: $$\displaystyle \gamma_p=\frac{1}{V}\left(\frac{\partial V}{\partial T}\right)_{p}$$
• The adiabatic compressibility: $$\displaystyle \kappa_S=-\frac{1}{V}\left(\frac{\partial V}{\partial p}\right)_{S}$$

For an ideal gas it follows that: $$\gamma_p=1/T$$, $$\kappa_T=1/p$$ and $$\beta_V=-1/V$$.

## Thermal heat capacity

• The specific heat at constant $$X$$ is: $$\displaystyle C_X=T\left(\frac{\partial S}{\partial T}\right)_{X}$$
• The specific heat at constant pressure: $$\displaystyle C_p=\left(\frac{\partial H}{\partial T}\right)_{p}$$
• The specific heat at constant volume: $$\displaystyle C_V=\left(\frac{\partial U}{\partial T}\right)_{V}$$

For an ideal gas : $$C_{mp}-C_{mV}=R$$. Further, if the temperature is high enough to thermalize all internal rotational and vibrational degrees of freedom: $$C_V= \frac{1}{2} sR$$. Hence $$C_p= \frac{1}{2} (s+2)R$$. From their ratio it now follows that $$\gamma=(2+s)/s$$. For a lower $$T$$ one needs only to consider the thermalized degrees of freedom. For a Van der Waals gas: $$C_{mV}= \frac{1}{2} sR+ap/RT^2$$.

In general:

$C_p-C_V=T\left(\frac{\partial p}{\partial T}\right)_{V}\cdot\left(\frac{\partial V}{\partial T}\right)_{p}=-T\left(\frac{\partial V}{\partial T}\right)_{p}^2\left(\frac{\partial p}{\partial V}\right)_{T}\geq0$

Because $$(\partial p/\partial V)_T$$ is always $$<0$$, the following is always valid: $$C_p\geq C_V$$. If the coefficient of expansion is 0, $$C_p=C_V$$, and this is true also at $$T=0$$K.

## The laws of thermodynamics

The zeroth law states that heat flows from higher to lower temperatures. The first law is the conservation of energy. For a closed system: $$Q=\Delta U+W$$, where $$Q$$ is the total added heat, $$W$$ the work done and $$\Delta U$$ the difference in the internal energy. Notice that the work is taken as the work done by the system on the surroundings. In differential form this becomes: $$d\hspace{-1ex}\rule[1.25ex]{2mm}{0.4pt} Q=dU+d\hspace{-1ex}\rule[1.25ex]{2mm}{0.4pt}W$$, where $$d\hspace{-1ex}\rule[1.25ex]{2mm}{0.4pt}$$ means that the it is not a differential of a state function. For a quasi-static process: $$d\hspace{-1ex}\rule[1.25ex]{2mm}{0.4pt}W=pdV$$. So for a reversible process: $$d\hspace{-1ex}\rule[1.25ex]{2mm}{0.4pt}Q=dU+pdV$$.

For an open (flowing) system the first law is: $$Q=\Delta H+W_{\rm i}+\Delta E_{\rm kin}+\Delta E_{\rm pot}$$. One can extract an amount of work $$W_{\rm t}$$ from the system or add $$W_{\rm t}=-W_{\rm i}$$ to the system. In chemistry, one uses the opposite convention, that positive work is work done on the system.

The second law states: for a closed system there exists an additive quantity $$S$$, called the entropy, the differential of which has the following property:

$dS\geq\frac{d\hspace{-1ex}\rule[1.25ex]{2mm}{0.4pt}Q}{T}$

If the only processes occurring are reversible: $$dS=d\hspace{-1ex}\rule[1.25ex]{2mm}{0.4pt}Q_{\rm rev}/T$$. So, the entropy difference after a reversible process is:

$S_2-S_1=\int\limits_1^2 \frac{d\hspace{-1ex}\rule[1.25ex]{2mm}{0.4pt}Q_{\rm rev}}{T}$

For a reversible cycle: $$\displaystyle\oint\frac{d\hspace{-1ex}\rule[1.25ex]{2mm}{0.4pt}Q_{\rm rev}}{T}=0$$.

For an irreversible cycle: $$\displaystyle\oint\frac{d\hspace{-1ex}\rule[1.25ex]{2mm}{0.4pt}Q_{\rm irr}}{T}<0$$.

The third law of thermodynamics is (Nernst's law):

$\lim_{T\rightarrow0}\left(\frac{\partial S}{\partial X}\right)_{T}=0$

From this it can be concluded that the thermal heat capacity $$\rightarrow0$$ if $$T\rightarrow0$$, so absolute zero temperature cannot be reached by cooling through a finite number of steps.

## State functions and Maxwell relations

The state functions and their differentials are:

 Internal energy: $$U$$ $$dU=TdS-pdV$$ Enthalpy: $$H=U+pV$$ $$dH=TdS+Vdp$$ Free energy: $$F=U-TS$$ $$dF=-SdT-pdV$$ Gibbs free energy: $$G=H-TS$$ $$dG=-SdT+Vdp$$

From this one can derive Maxwell’s relations:

$\left(\frac{\partial T}{\partial V}\right)_{S}=-\left(\frac{\partial p}{\partial S}\right)_{V}~,~~\left(\frac{\partial T}{\partial p}\right)_{S}=\left(\frac{\partial V}{\partial S}\right)_{p}~,~~ \left(\frac{\partial p}{\partial T}\right)_{V}=\left(\frac{\partial S}{\partial V}\right)_{T}~,~~\left(\frac{\partial V}{\partial T}\right)_{p}=-\left(\frac{\partial S}{\partial p}\right)_{T}$

From the total differential and the definitions of $$C_V$$ and $$C_p$$ it can be derived that:

$TdS=C_VdT+T\left(\frac{\partial p}{\partial T}\right)_{V}dV~~\mbox{and}~~TdS=C_pdT-T\left(\frac{\partial V}{\partial T}\right)_{p}dp$

For an ideal gas:

$S_m=C_V\ln\left(\frac{T}{T_0}\right)+R\ln\left(\frac{V}{V_0}\right)+S_{m0}~~\mbox{and}~~ S_m=C_p\ln\left(\frac{T}{T_0}\right)-R\ln\left(\frac{p}{p_0}\right)+S_{m0}'$

Helmholtzequations are:

$\left(\frac{\partial U}{\partial V}\right)_{T}=T\left(\frac{\partial p}{\partial T}\right)_{V}-p~~,~~\left(\frac{\partial H}{\partial p}\right)_{T}=V-T\left(\frac{\partial V}{\partial T}\right)_{p}$

For a macroscopic surface: $$d\hspace{-1ex}\rule[1.25ex]{2mm}{0.4pt}W_{\rm rev}=-\gamma dA$$, with $$\gamma$$ the surface tension. From this follows:

$\gamma=\left(\frac{\partial U}{\partial A}\right)_{S}=\left(\frac{\partial F}{\partial A}\right)_{T}$

## Processes

The efficiency $$\eta$$ of a process is given by: $$\displaystyle\eta=\frac{\mbox{Work done}}{\mbox{Heat added}}$$

The cold factor $$\xi$$ of a cooling down process is given by: $$\displaystyle\xi=\frac{\mbox{Cold delivered}}{\mbox{Work added}}$$

For adiabatic processes: $$W=U_1-U_2$$. For reversible adiabatic processes using Poisson’s equation with $$\gamma=C_p/C_V$$ one gets that $$pV^\gamma=$$constant. Also: $$TV^{\gamma-1}=$$constant. Also $$T^\gamma p^{1-\gamma}=$$constant. Adiabats are steeper on a $$p$$-$$V$$ diagram than isotherms because $$\gamma>1$$.

### Isobaric processes

Here: $$H_2-H_1=\int_1^2 C_pdT$$. For a reversible isobaric process: $$H_2-H_1=Q_{\rm rev}$$.

### Throttle processes

This is also called the Joule-Kelvin effect and is the result of an adiabatic expansion of a gas through a porous material or a small opening. Here $$H$$ is a conserved quantity, and $$dS>0$$. In general this is accompanied with a change in temperature. The quantity which is important here is the throttle coefficient:

$\alpha_H=\left(\frac{\partial T}{\partial p}\right)_{H}=\frac{1}{C_p}\left[T\left(\frac{\partial V}{\partial T}\right)_{p}-V\right]$

The inversion temperature is the temperature where an adiabatically expanding gas maintains the same temperature. If $$T>T_{\rm i}$$ the gas heats up, if $$T<T_{\rm i}$$ the gas cools down. $$T_{\rm i}=2T_{\rm B}$$, with for $$T_{\rm B}$$: $$[\partial(pV)/\partial p]_T=0$$. The throttle process is, for example, used in refrigerators.

### The Carnot Cycle

The system undergoes a reversible cycle consisting of two isotherms and two adiabats

1. Isothermal expansion at $$T_{1}$$. The system absorbs an amount of heat $$Q_{1}$$ from the reservoir.
2. Adiabatic expansion with a temperature drop to $$T_{2}$$
3. Isothermal compression at $$T_{2}$$ removing an amount of heat $$Q_{2}$$ from the system.
4. Adiabatic compression with the temperature increasing to $$T_{1}$$

The efficiency for a Carnot cycle is:

$\eta=1-\frac{|Q_2|}{|Q_1|}=1-\frac{T_2}{T_1}:=\eta_{\rm C}$

The Carnot efficiency $$\eta_{\rm C}$$ is the maximal efficiency at which a heat engine can operate. If the process is applied in reverse order and the system performs a work $$-W$$ the cold factor is given by:

$\xi=\frac{|Q_2|}{W}=\frac{|Q_2|}{|Q_1|-|Q_2|}=\frac{T_2}{T_1-T_2}$

### The Stirling cycle

The Stirling cycle consists of 2 isotherms and 2 isochoric processes. The efficiency in the ideal case is the same as for a Carnot cycle.

## Maximum work

Consider a system that changes from state 1 into state 2, with the temperature and pressure of the surroundings given by $$T_0$$ and $$p_0$$. The maximum work which can be obtained from this change is, when all processes are reversible:

1. Closed system: $$W_{\rm max}=(U_1-U_2)-T_0(S_1-S_2)+p_0(V_1-V_2)$$.
2. Open system: $$W_{\rm max}=(H_1-H_2)-T_0(S_1-S_2)-\Delta E_{\rm kin}-\Delta E_{\rm pot}$$.

The minimum work needed to attain a certain state is: $$W_{\rm min}=-W_{\rm max}$$.

## Phase transitions

Phase transitions are isothermal and isobaric, so $$dG=0$$. When the phases are indicated by $$\alpha$$, $$\beta$$ and $$\gamma$$: $$G_m^\alpha=G_m^\beta$$ and

$\Delta S_m=S_m^\alpha - S_m^\beta=\frac{r_{\beta\alpha}}{T_0}$

where $$r_{\beta\alpha}$$ is the heat of transition from $$\beta$$ to phase $$\alpha$$ and $$T_0$$ is the transition temperature. The following holds: $$r_{\beta\alpha}=r_{\alpha\beta}$$ and $$r_{\beta\alpha}=r_{\gamma\alpha}-r_{\gamma\beta}$$. Further

$S_m=\left(\frac{\partial G_m}{\partial T}\right)_{p}$

so $$G$$ has a kink in the transition point and the derivative is discontinuous. In a two phase system Clapeyron’s equation is valid:

$\frac{dp}{dT}=\frac{S_m^\alpha-S_m^\beta}{V_m^\alpha-V_m^\beta}= \frac{r_{\beta\alpha}}{(V_m^\alpha-V_m^\beta)T}$

For an ideal gas one finds for the vapor line at some distance from the critical point:

$p=p_0{\rm e}^{-r_{\beta\alpha/RT}}$

There also exist also phase transitions with $$r_{\beta\alpha}=0$$. For those there will only be a discontinuity in the second derivatives of $$G_m$$. These second-order transitions appear as organization phenomena.

A phase-change of the 3rd order, with e.g. $$[\partial^3 G_m/\partial T^3]_p$$ non continuous arises e.g. when ferromagnetic iron changes to the paramagnetic state.

## Thermodynamic potential

When the number of particles within a system changes this number becomes a third state function. Because addition of matter usually takes place at constant $$p$$ and $$T$$, $$G$$ is the relevant quantity. If a system has many components this becomes:

$dG=-SdT+Vdp+\sum_i\mu_idn_i$ where $$\displaystyle\mu=\left(\frac{\partial G}{\partial n_i}\right)_{p,T,n_j}$$

is called the thermodynamic potential. This is a partial quantity. For $$V$$:

$V=\sum_{i=1}^c n_i\left(\frac{\partial V}{\partial n_i}\right)_{n_j,p,T}:=\sum_{i=1}^c n_i V_i$

where $$V_i$$ is the partial volume of component $$i$$. The following holds:

\begin{aligned} V_m&=&\sum_i x_i V_i\\ 0&=&\sum_i x_i dV_i\end{aligned}

where $$x_i=n_i/n$$ is the molar fraction of component $$i$$. The molar volume of a mixture of two components can be a concave line in a $$V$$-$$x_2$$ diagram: the mixing leads to a contraction of the volume

The thermodynamic potentials are not independent in a multiple-phase system. It can be derived that $$\sum\limits_i n_i d\mu_i=-SdT+Vdp$$, this gives at constant $$p$$ and $$T$$: $$\sum\limits_i x_i d\mu_i=0$$ (Gibbs-Duhmen).

Each component has as many $$\mu$$’s as there are phases. The number of free parameters in a system with $$c$$ components and $$p$$ different phases is given by $$f=c+2-p$$ which is called the Gibbs phase rule

## Ideal mixtures

For a mixture of $$n$$ components (the index $$^0$$ is the value for the pure component):

$U_{\rm mixture}=\sum_i n_i U^0_i~~,~~H_{\rm mixture}=\sum_i n_i H^0_i~~,~~ S_{\rm mixture}=n\sum_i x_i S^0_i+\Delta S_{\rm mix}$

where for ideal gases: $$\Delta S_{\rm mix}=-nR\sum\limits_i x_i\ln(x_i)$$.

For the thermodynamic potentials: $$\mu_i=\mu_i^0+RT\ln(x_i)<\mu_i^0$$. A mixture of two liquids is rarely ideal: this is usually only the case for chemically related components or isotopes. In spite of this Raoult’s law holds for the vapour pressure for many binary mixtures: $$p_i=x_ip^0_i=y_ip$$. Here $$x_i$$ is the fraction of the $$i$$th component in liquid phase and $$y_i$$ the fraction of the $$i$$th component in gas phase.

A solution for one component in a second gives rise to an increase in the boiling point $$\Delta T_{\rm k}$$ and a decrease of the freezing point $$\Delta T_{\rm s}$$. For $$x_2\ll1$$:

$\Delta T_{\rm k}=\frac{RT_{\rm k}^2}{r_{\beta\alpha}}x_2~~,~~ \Delta T_{\rm s}=-\frac{RT_{\rm s}^2}{r_{\gamma\beta}}x_2$

with $$r_{\beta\alpha}$$ the heat of evaporation and $$r_{\gamma\beta}<0$$ the melting heat. For the osmotic pressure $$\Pi$$ of a solution: $$\Pi V_{m1}^0=x_2RT$$.

These are called collegative properties

## Conditions for equilibrium

When a system evolves towards equilibrium the only changes that are possible are those for which: $$(dS)_{U,V}\geq0$$ or $$(dU)_{S,V}\leq0$$ or $$(dH)_{S,p}\leq0$$ or $$(dF)_{T,V}\leq0$$ or $$(dG)_{T,p}\leq0$$. In equilibrium for each component: $$\mu_i^\alpha=\mu_i^\beta=\mu_i^\gamma$$.

## Statistical basis for thermodynamics

The number of possibilities $$P$$ to distribute $$N$$ particles on $$n$$ possible energy levels, each with a $$g$$-fold degeneracy is called the thermodynamic probability and is given by:

$P=N!\prod_i\frac{g_i^{n_i}}{n_i!}$

The most probable distribution, that with the maximum value for $$P$$, is the equilibrium state. When Stirling’s equation, $$\ln(n!)\approx n\ln(n)-n$$ is used, one finds the Maxwell-Boltzmann distribution for a discrete system . The occupation numbers in equilibrium are then given by:

$n_i=\frac{N}{Z}g_i\exp\left(-\frac{W_i}{kT}\right)$

The state sum $$Z$$ is a normalization constant, given by: $$Z=\sum\limits_ig_i\exp(-W_i/kT)$$. For an ideal gas:

$Z=\frac{V(2\pi mkT)^{3/2}}{h^3}$

The entropy can then be defined as:  $$S=k\;ln\left ( P \right )$$. For a system in thermodynamic equilibrium this becomes:

$S=\frac{U}{T}+kN\ln\left(\frac{Z}{N}\right)+kN\approx\frac{U}{T}+k\ln\left(\frac{Z^N}{N!}\right)$

For an ideal gas, with $$U=\frac{3}{2}kT$$ then: $$\displaystyle S=kN+kN\ln\left(\frac{V(2\pi mkT)^{3/2}}{Nh^3}\right)$$

## Application to other systems

Thermodynamics can be applied to other systems than gases and liquids. To do this the term $$d\hspace{-1ex}\rule[1.25ex]{2mm}{0.4pt}W=pdV$$ has to be replaced with the correct work term, for example $$d\hspace{-1ex}\rule[1.25ex]{2mm}{0.4pt}W_{\rm rev}=-Fdl$$ for the stretching of a wire, $$d\hspace{-1ex}\rule[1.25ex]{2mm}{0.4pt}W_{\rm rev}=-\gamma dA$$ for the expansion of a soap bubble or $$d\hspace{-1ex}\rule[1.25ex]{2mm}{0.4pt}W_{\rm rev}=-BdM$$ for a magnetic system.

A rotating, non-charged black hole has a temperature $$T=\hbar c/8\pi km$$. It has an entropy $$S=Akc^3/4\hbar\kappa$$ with $$A$$ the area of its event horizon. For a Schwarzschild black hole $$A$$ is given by $$A=16\pi m^2$$. Hawkings area theorem states that $$dA/dt\geq0$$.

Hence, the lifetime of a black hole $$\sim m^3$$.

Template:HypTest