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.
The Kawasaki dynamics formalism from statistical physics provides a simple model of a phase change (for example, the condensation of a gas at low enough temperature). Considering a gas of particles on a two-dimensional lattice of cells, a given configuration's energy can be calculated as …
The Kapitza pendulum is an inverted pendulum that can balance stably when driven by an oscillating vertical displacement. Its behaviour can be described using Lagrangian mechanics and modelled in Python, using the NumPy, SciPy and Matplotlib libraries.
The wave equation is a second-order linear partial differential equation describing the behaviour of mechanical waves; its two (spatial) dimensional form can be used to describe waves on a surface of water: $$ \frac{\partial^2 u}{\partial t^2} - c^2\left( \frac{\partial^2 u}{\partial x^2} + \frac{\partial^2 u}{\partial y^2} …
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, but 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.