Von Kármán vortices behind an airfoil
Channel: Nils Berglund
Date: 2023-02-13

In this variant of the video https://youtu.be/uKnMvPL36a0 the elliptical obstacle has been deformed into a shape that looks more like a type of airfoil. This results in a more asymmetrical formation of von Kármán vortices behind the obstacle. 
The equations used here are the compressible Euler equations. Instead of using a hard obstacle, which tends to cause numerical instabilities, there is a strongly localized force field in the obstacle. The force field is perpendicular to the surface of the obstacle, and interpolates between a constant magnitude inside the obstacle, and a zero magnitude outside a small boundary layer. In addition, the velocity and density are artificially set to zero inside the soft obstacle, with a similar boundary layer transition.  
The video has four parts, showing the same simulation with two different color schemes and at two different speeds:
Vorticity: 0:00
Speed: 2:02
Vorticity (time lapse): 4:04
Speed: 4:44
In the first part, the color hue shows the vorticity of the fluid, which measures its quantity of rotation (given by the curl, or rotational, of the velocity field). In the second part, it shows the speed (norm of velocity) of the fluid. The velocity field of the fluid is materialized by 1000 tracer particles, whose initial position is distributed randomly over the simulation region. There are periodic boundary conditions, which is why vortices can be seen wrap around the displayed rectangular region.
The compressible Euler equations are partial differential equations for the density and the velocity field of the fluid. The system as such is not closed, because the right-hand side of the velocity equation involves the pressure, which has to be linked to known quantities by a thermodynamic relation. I assumed here that the fluid is an ideal gas, so that the pressure is proportional to the density. 
In a sense, the compressible Euler equations are easier to simulate than the incompressible ones, because one does not have to impose a zero divergence condition on the velocity field. However, they appear to be a bit more unstable numerically, and I had to add a smoothing mechanism to avoid blow-up. This mechanism is equivalent to adding a small viscosity, making the equations effectively a version of the Navier-Stokes equations. 

Render time: 1 hour 51 minutes 
Color scheme: Parts 1 and 3 -  Turbo, by Anton Mikhailovhttps://gist.github.com/mikhailov-work/6a308c20e494d9e0ccc29036b28faa7a
Parts 2 and 4 - Viridis by Nathaniel J. Smith, Stefan van der Walt and Eric Firing
https://github.com/BIDS/colormap
 
Music: "Pixelated Autumn Leaves" by Jeremy Blake@RedMeansRecording

See also https://images.math.cnrs.fr/Des-ondes-dans-mon-billard-partie-I.html for more explanations (in French) on  a few previous simulations of wave equations. 

The simulation solves the 2D compressible Euler equation by discretization (finite differences).

C code: https://github.com/nilsberglund-orleans/YouTube-simulations
https://www.idpoisson.fr/berglund/software.html
Many thanks to Marco Mancini and Julian Kauth for helping me to accelerate my code!