Table of Contents

7. First law of thermodynamics

If you do not know the laws of thermodynamics, you can neither understand the weather and climate (thickness $10^5$ m) of a planet nor the turbulent motions of intergalactic gas in a gigantic cluster of galaxies (size $10^{22}$ m).

Thermodynamic system

Any system (collection of things) whose thermodynamic properties are of interest can be defined to be a thermodynamic system akin to defining the origin of a coordinate system. A thermodynamic system has a boundary and a surroundings or environment. The figure (above) shows two such systems with the boundary and surroundings clearly identified.

A system that does not interact with its surroundings at all is a closed system. On the other hand, open systems interact with their surroundings. Our universe is a closed system because it does not even have a surrounding. Human body is an open system because we always take heat from the surroundings and release heat to the environment.

A closed system is in thermal equilibrium if the temperature is the same everywhere inside the system.

A dynamic system is described by its equation of motion (EOM). For example, the EOM of a particle in dimension can be $x(t)=5t^3-3t^2+7$. Similarly, a thermodynamic system is described by its equation of state (EOS).

EOS is a function of the thermodynamic properties of a system and it can be written symbolically as $f(p,V,T)=0$ where $p$ is pressure, $V$ is volume and $T$ is temperature. The most famous EOS is that of an ideal gas which is written as

$$ f(p,V,T) = pV - nRT = 0 $$

where $n$ is the number of moles and $R$ the universal gas constant.

An EOS can also be expressed using pressure as a function density and temperature, i. e. $p(\rho,T)$.

$PV=NkT\Rightarrow p=(N/V)kT$. But $N/V=\rho/m$ where $\rho$ is density and $m$ average mass of a gas particle. Therefore,

$$ p(\rho,T) = \frac{\rho}{m} kT. $$

Here, $V$ and $n$ are called extensive variables because they describe the amount (or extension) of matter. The other variables ($p$, $T$) are called intensive variables.

Work done by a system

In order to understand the first law, we need to know how a system does work on its environment and exchanges heat with its surroundings and how its internal energy changes as a result.

Consider a gas in a cylinder with a movable piston. Gas particles exert force $F$ on the piston and the piston moves to the right as a result. The pressure $p=F/A$ where $A$ is the surface area of the piston. If the piston moves by a distance $dx$, the particles do work

$$ dW = F dx = p A dx = p dV $$

because $Adx=dV$, the change in volume of the gas. Integration of this equation for different thermodynamic processes will lead to the total work done during the process.

If the gas expands slowly from volume $V_1$ to $V_2$, the work done

$$ W = \int_{V_1}^{V_2} p dV $$

if the process is quasi-static. The work done is also the shaded area under the p-V curve in the above figure.

If a process takes the path $AB$ in the above figure, pressure is constant and, hence, $W=p(V_2-V_1)$. This is true for all isobaric processes.

If a process takes the path $AC$, temperature is constant, the process is isothermal and, hence,

$$ W = nRT \int_{V_1}^{V_2} \frac{dV}{V} = nRT \ln \frac{V_2}{V_1}. $$

Consider a system that goes from state $A$ to $C$ via two different paths $AC$ and $ABC$. Total work along $AB$ is $p_1(V_2-V_1)$ and along $AC$ is zero because $dV=0$. So the work done along $ABC$ Is clearly different than the work done along $AC$ (above equation). Therefore, thermodynamic work is path dependent.

Internal energy

Internal energy $E_{in}$ of a system is the average of the kinetic ($E_k$) and potential ($E_p$) energies of all its particles, symbolically

$$ E_{in} = \sum_i (\overline{E_{k,i}} + \overline{E_{p,i}}) $$

where $i$ goes from $0$ to $N$, the total number of particles. The kinetic energy of a particle results from its rotational, vibrational and translational motions. The potential energies of the particles result from their position with respect to one another.

In an ideal monatomic gas, there is no rotation or vibration and the potential energy $E_{p,i}$ of any $i$-th particle is constant because there are no interatomic interactions. This constant potential energy can be set to zero. Therefore, the internal energy of an ideal monatomic gas is made of only the translational kinetic energy, symbolically

$$ E_{in} = \sum_i \overline{E_{k,i,trans}} = \sum_i \frac{1}{2} m \overline{v_i}^2. $$

Now according to the kinetic theory of gas, mean kinetic energy of a particle in an ideal monatomic gas

$$\overline{E_{k,i,trans}} = \frac{3}{2} kT $$

where $k$ is the Boltzmann constant. An $n$-mol gas will have $N=n N_A$ number of particles where $N_A$ is the Avogadro constant. Therefore,

$$ E_{in} = nN_A \frac{3}{2} kT = \frac{3}{2} nRT. $$

The internal energy does not depend on pressure or volume but only on the temperature, $E_{in}\propto T$.

First law of thermodynamics

The change in internal energy of a thermodynamic system for a transition between any two equilibrium states

$$ \Delta E_{in} = Q - W $$

where $Q$ is the heat exchanged and $W$ the work done by the system. The following sign rules must be maintained.

Heat added to system $Q > 0$
Heat removed from system $Q < 0$
Work done by system $W > 0$
Work done on system $W < 0$

This is a statement of energy conservation: the system can exchange its energy with the surroundings by the transmission heat and performance of work. A completely isolated system can never change its internal energy as both $Q$ and $W$ are zero.

In the above pV diagram, a system is changing its state from $A$ to $B$ following six different paths. $Q$ and $W$ would be different for different paths, but $Q-W$ would be the same for all paths. $Q$ and $Q$ and depend on path, but $Q-W=\Delta E_{in}$ does not.

If the changes are infinitesimal, use the differential form of the first law of thermodynamics expressed as

$$ dE_{in} = dQ - dW. $$

Internal energy and potential energy are called state functions because their value depends only on the current state of the system and not on any past or future changes. For the same reason work and heat are not state variables.

Thermodynamic processes

When the states of a thermodynamic system change, it is said to be undergoing a thermodynamic process. These processes can be quasi-static or non-quasi-static.

A system is going from state $A$ to $B$ in this pV diagram. A quasi-static process refers to an idealized or imagined process where the change in state is made infinitesimally slowly so that at each instant, the system can be assumed to be at a thermodynamic equilibrium with itself and with the environment. This does not happen in nature. All processes in nature are non-quasi-static.

In the figure, the solid line shows an isobaric quasi-static process. If all intermediate steps in a process are known, then a line can be drawn showing the process in a pV diagram. Therefore, isobaric, isochoric, isothermal and adiabatic processes are quasi-static. However, if the intermediate steps are not known, lines cannot be drawn. In this case, the line can be the dashed line in the figure or any other line unbeknownst to us.

This figure shows an isothermal quasi-static process. As the tiny weights on the piston are removed one by one, the volume of the gas expands so slowly that the change in temperature between any two states is negligible. This is because when temperature slightly decreases heat flows from the heat bath to the cylinder preventing any significant change in temperature. Heat bath can give up heat without any substantial change of its temperature.

In an adiabatic process the system is completely insulated and hence there is no heat transfer between the system and the environment. Adiabatic processes can be quasi-static or non-quasi-static.

Isobaric process $p$ = constant $dp=0$ $dE_{in} = dQ - p dV$
Isochoric process $V$ = constant $dV=0$ $dE_{in} = dQ$
Isothermal process $T$ = constant $dT=0$ $dQ - dW = 0$
Adiabatic process $dQ=0$ $dE_{in} = - dW$

A system is said to have undergone a cyclic process if its state is the same in the end as it was in the beginning. $\Delta E_{in}=0$ and $\sum Q = \sum W$. Human body goes through a cyclic process in 24 hours. The body temperature keeps changing throughout the day but goes back to its initial value after 24 hours making $\Delta T \propto \Delta E_{in} = 0$.

Create your own pV diagram for cyclic processes in this GeoGebra webapp.

Heat capacities of an ideal gas

In the diagram below, Vessel A goes through an isochoric process (piston is not movable, $dV=0$) and Vessel B an isobaric process.

In case of the isochoric process, $dE_{in} = dQ = n C_V dT$ where $C_V$ is the molar heat capacity at constant volume in units of J K$^{-1}$ mol$^{-1}$.

In case of the isobaric process, heat is added to the system and $dQ = n C_p dT$ where $C_p$ is the molar heat capacity at constant pressure.

$C_p$ and $C_V$ can be related by noting that at constant pressure $ d(pV) = d(nRT)$ and, hence, $pdV = dW = nR dT$. Therefore,

$$ dE_{in} = dQ - dW \Rightarrow nC_vdT = nC_pdT - nRdT \Rightarrow C_p - C_V = R. $$

This relationship is valid for an ideal gas, i. e. for any gas at sufficiently low density and/or high temperature. Along with the difference of the two heat capacities, their ratio $\gamma$ is also an important parameter in thermodynamics.

Type Example $C_p$ $C_V$ $\gamma=C_p/C_V$
Monatomic $H$ $5R/2$ $3R/2$ $5/3=1.67$
Diatomic $O_2$ $7R/2$ $5R/2$ $7/5=1.4$
Polyatomic $CO_2$ $4R$ $3R$ $4/3=1.33$

Adiabatic processes for an ideal gas

The most important example of an adiabatic process is the expansion of our universe. Other examples include Joule expansion of a gas. It is important to derive the condition for a quasi-static adiabatic process as shown below.

For an adiabatic process, $dQ=0$ and, hence, $dE_{in}=-dW \Rightarrow nC_VdT=-pdV \Rightarrow dT = -pdV / (nC_V)$.

As both pressure and volume are variables, the derivative of the EOS becomes

$$ d(pV)=d(nRT)\Rightarrow pdV+Vdp=nRdT \Rightarrow dT = \frac{pdV+Vdp}{nR}. $$

Equating the two expressions of $dT$ and remembering that $C_p-C_V=R$ and $C_p/C_V=\gamma$ we can show that

$$ \frac{dp}{p} + \gamma \frac{dV}{V} = 0. $$

Integrating this equation directly leads to $\ln p + \ln V =$ constant or, equivalently, $pV^\gamma=$ constant which is the condition for a quasi-static adiabatic process.


Image credits: Samuel J. Ling, Jeff Sanny, and Bill Moebs; University Physics, OpenStax.