A blog of Python-related topics and code.

An important concept in plasma physics is the Debye length, which describes the screening of a charge's electrostatic potential due to the net effect of the interactions it undergoes with the other mobile charges (electrons and ions) in the system. It can be shown that, given a set of reasonable assumptions about the behaviour of charges in the plasma, the electric potential due to a "test charge", $q_\mathrm{T}$ is given by
$$
\phi = \frac{q_\mathrm{T}}{4\pi\epsilon_0 r}\exp\left(-\frac{r}{\lambda_\mathrm{D}}\right),
$$
where the electron Debye length,
$$
\lambda_\mathrm{D} = \sqrt{\frac{\epsilon_0 T_e}{e^2n_0}},
$$
for an electron temperature $T_e$ expressed as an energy (i.e. $T_e = k_\mathrm{B}T_e'$ where $T_e'$ is in K) and number density $n_0$. Rigorous derivations, starting from Gauss' Law and solving the resulting Poisson equation with a Green's function are given elsewhere (e.g. Section 7.2.2. in J. P. Freidberg, *Plasma Physics and Fusion Energy*, CUP (2008)).

Just a simple Python app to try out the TkInter interface to the Tk GUI toolkit and to keep my children occupied. It shows a window with a square grid of cells which can be coloured by selecting from a palette. Run with

In a nuclear fusion reaction two atomic nuclei combine to form a single nucleus of lower total mass, the difference in mass, $\Delta m$ being released as energy in accordance with $E = \Delta m c^2$. It is this process which powers stars (in our own sun, hydrogen nuclei are fused into helium), and nuclear fusion has been actively pursued as a potential clean and cheap energy source in reactors on Earth for over 50 years.

A Reuleaux polygon is a curvilinear polygon built up of circular arcs. For an odd number of vertices, it has a constant width, and for this reason many polygonal coins, such as the UK's 50p piece and this Bermudian dollar coin are Reuleaux polygons. This property also means they make serviceable bicycle wheels:

Carbon dioxide ($\mathrm{CO_2}$) dissolves in water, and some of the dissolved $\mathrm{CO_2}$ forms *carbonic acid*, $\mathrm{H_2CO_3(aq)}$:
$$
\mathrm{CO_2(g)} + \mathrm{H_2O(l)} \rightleftharpoons \mathrm{H_2CO_3(aq)}.
$$
This acid can then dissociate to form *bicarbonate*, $\mathrm{HCO_3^-}$:
$$
K_1: \mathrm{H_2CO_3(aq)} \rightleftharpoons \mathrm{HCO_3^-(aq)} + \mathrm{H^+(aq)},
$$
which may further dissociate to *carbonate*, $\mathrm{CO_3^{2-}}$:
$$
K_2: \mathrm{HCO_3^-(aq)} \rightleftharpoons \mathrm{CO_3^{2-}(aq)} + \mathrm{H^+(aq)}.
$$