A blog of Python-related topics and code.
This previous post introduced a simple molecular dynamics simulation for the equilibration of the speeds of the particles of an ideal gas. The present post extends the code a little to model the effusion of an ideal gas through a small hole into a vacuum.
This is an update to the post from February 2016 with an improved algorithm (given below) for generating pleasing random images by sequentially shifting the colour of pixels across a canvas.
Five years ago, I wrote a blog post, "Is the frequency of intense tornadoes increasing?". Here is an updated plot, including tornadoes up to 2020 and accounting for the National Centers for Environmental Information (NCEI)'s use of the Enhanced Fujita scale – this includes the category "EFU" for tornadoes which inflict no identifiable damage.
Just a quick update on this blog post on visualizing the electric field of a multipole arrangement of electric charges to visualize the electric field of a capacitor (two oppositely-charged plates, separated by a distance $d$). The code, which uses Matplotlib's
streamplot function to visualize the electric field from the plates, modelled as rows of discrete point charges, is below.