Blog

A blog of Python-related topics and code.

Disasters in Great Britain and Ireland over time

Wikipedia has an interesting (if somewhat morbid) list of disasters in Great Britain and Ireland. This blog post will show how to scrape it and plot a chart of the deaths due to these disasters over time.

How many MPs have degrees in STEM subjects?

Not many:

What is the average age of an MP in each party?

enter image description here

Exploring the Schottky anomaly in hydrogen

The temperature-dependence of the rotational contribution to the heat capacity of gaseous molecular hydrogen shows a Schottky anomaly: whereas for many systems the heat capacity can be expected to increase with increasing temperature, for $\mathrm{H_2}$ there is an temperature range within which it reaches a maximum before decreasing. Only at higher temperatures does it revert to "conventional" behaviour.

Calculating the heat capacity from the partition sum

It is a standard result of statistical thermodynamics that the molar heat capacity at constant volume, $C_{V,\mathrm{m}}$, is related to the molecular partition sum, $q$, through the relation $$ C_{V,\mathrm{m}} = R\beta^2\left[\frac{\ddot{q}}{q} - \left( \frac{\dot{q}}{q}\right)^2\right], $$ where $\dot{q}$ and $\ddot{q}$ represent the first and second derivative of $q$ with respect to the "thermodynamic beta", $\beta = \frac{1}{k_\mathrm{B}T}$: