@NilsBerglund
  @NilsBerglund
Nils Berglund | Four vortices on a rotating sphere @NilsBerglund | Uploaded April 2024 | Updated October 2024, 8 minutes ago.
Like the video youtu.be/TFNfNTsuWgc , this one shows a simulation of the compressible Euler equations on a sphere, with an improved control of the behavior at the poles. Instead of a regularization of the Laplacian at the poles, points of the simulation grid are blocked around them, to avoid numerical blow-up without reducing the propagation speed of waves. Some smoothing has been used in the vorticity parts, to decrease artifacts due to the lines where the density of grid points changes. The initial state is also different from the one in the previous simulation, as it consists of four instead of two vortices.
The video has four parts, showing the same simulation with two color codes and two different representations:
Speed, 2D: 0:00
Vorticity, 2D: 1:04
Speed, 3D: 2:13
Vorticity, 3D: 3:18
The 2D parts use an equirectangular projection of the sphere. The velocity field is materialized by 1000 tracer particles that are advected by the flow.
In parts 1 and 3, the color hue depends on the speed of the fluid, as does the radial coordinate in part 3. In parts 2 and 4, the color hue depends on the vorticity of the fluid, which measures its quantity of rotation, as does the radial coordinate in part 4. In green areas, the vorticity is zero, meaning that the speed of the fluid does not change when moving laterally with respect to its velocity. In red and blue areas, the vorticity is large. The point of view of the observer is rotating around the polar axis of the sphere at constant latitude. The white bar above the sphere points away from the polar axis in a fixed direction, to indicate the position of points with constant longitude on the sphere.
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. The equation is solved by finite differences, where the Laplacian and gradient are computed in spherical coordinates.

Render time: Parts 1 and 2 - 57 minutes 8 seconds
Parts 2 and 4 - 1 hour 1 minute
Compression: crf 23
Color scheme: Parts 1 and 3 - Plasma by Nathaniel J. Smith and Stefan van der Walt
github.com/BIDS/colormap
Parts 2 and 4 - Turbo, by Anton Mikhailov
gist.github.com/mikhailov-work/6a308c20e494d9e0ccc29036b28faa7a

Music: "Lost and Found" by Jeremy Blake@RedMeansRecording

The simulation solves the compressible Euler equation by discretization.
C code: github.com/nilsberglund-orleans/YouTube-simulations

#Euler_equation #fluid_mechanics #vortex
Four vortices on a rotating sphereVenusian weather - vorticity and wind directionA magnetron-shaped resonatorConveyor belts with periodic boundary conditionsClassics revisited: The dark side of the poolMore stable weather with 16 pressure systems - vorticity and wind directionA mass spectrometerWelcome to Gattaca: This starts looking more like DNAAdding tracers in 3D to vortex simulations on a rotating sphereHow tides could look if the Moon were much closer to EarthWaves crossing a less dense percolation-style arrangement of obstaclesNumerical aperture of a lens in a wall (re-upload)

Four vortices on a rotating sphere @NilsBerglund

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER