The free-surface effect
A simulation of the free-surface effect, which can lead to a ship carrying a liquid cargo to capsize where the same ship carrying the same mass of solid cargo will float upright.
37 posts on animation. All posts · RSS feed
A simulation of the free-surface effect, which can lead to a ship carrying a liquid cargo to capsize where the same ship carrying the same mass of solid cargo will float upright.
Kawasaki dynamics is a Monte Carlo method for simulating a lattice gas (a model fluid whose particles occupy the cells of a lattice and attract the particles in neighbouring cells), in which each particle moves only by hopping into an empty neighbouring cell, so that …
The Kapitza pendulum is a rigid pendulum whose pivot is driven to oscillate vertically; if the pivot oscillates fast enough, the inverted position (with the bob directly above the pivot) is stable. This post derives the pendulum's equation of motion using Lagrangian mechanics, solves it …
The wave equation is a second-order linear partial differential equation that describes non-dispersive waves (those whose speed does not depend on their wavelength), such as sound, light and the small vibrations of a stretched membrane. This post introduces a finite-difference solution of its two-dimensional form, …
The Spiral of Theodorus (also known as the Snail of Pythogoras), illustrated below, is a well-known visualization of the square roots of the integers as the length of the hypotenuses of a sequence of right triangles, placed edge-to-edge. The Spiral of Theodorus [Pbroks13 at English …
A Maurer rose is a shape formed by connecting the points on a rose defined in the polar coordinate system by for some positive integer, . The points to join are, in polar coordinates using degrees: For example, the Maurer rose defined by is: The …
Inspired by this recent Numberphile video, here is a demonstration of chaos in a simple dynamical system: two balls, with near-identical starting conditions, bounce around elastically off a circular wall. After a short time, the balls' trajectories diverge completely. SciPy's solve_ivp can be used to …
Just a quick script to approximate a given target image from a large number of overlapping straight lines. The algorithm is rather inefficient: each line is added to several copies of the the approximation so far, and the best one chosen (ie the one that …
Icebergs in adverts stand tall on a narrow point whereas a real one would tip over onto its side. This short Python script models a two-dimensional iceberg under its weight and buoyancy, animates the forces as it rolls into its stable orientation, and explains why …
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.