The soundtrack of today's simulation is courtesy of State Azure at / @stateazure , whose channel I have been following for a while. If you like this kind of atmospheric music, you should check out his channel, which contains wonderful live performances!
Like the recent video • Adding tracers in 3D t... , this one shows a simulation of the compressible Euler equation on the sphere, with an initial state consisting of four vortices. Their vorticity and pressure gradient is larger here, making the vortices more unstable. A plot of the fluid's density (which is related to its pressure) has been added.
The video has six parts, showing the same simulation with three different color gradients and two different representations:
Density, 3D: 0:00
Speed, 3D: 1:14
Vorticity, 3D: 2:22
Density, 2D: 3:35
Speed, 2D: 4:50
Vorticity, 2D: 5:57
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 4, the color hue depends on the density of the fluid, which is related to its pressure, as does the radial coordinate in part 1. In parts 2 and 5, they depend on the speed of the fluid. In parts 3 and 6, they depend on the vorticity of the fluid, which measures its quantity of rotation. 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. Some smoothing has been used at the poles, where the Laplacian becomes singular in these coordinates.
Render time: Part 1 - 1 hour 6 minutes
Parts 2 and 3 - 1 hour 8 minutes
Part 4 - 1 hour 30 minutes
Parts 5 and 6 - 1 hour 8 minutes
Compression: crf 23
Color scheme: Parts 1 and 4 - Viridis, by Nathaniel J. Smith, Stefan van der Walt and Eric Firing
Parts 2 and 5 - Plasma by Nathaniel J. Smith and Stefan van der Walt
github.com/BIDS/colormap
Parts 3 and 6 - Turbo, by Anton Mikhailov
gist.github.com/mikhailov-wor...
Music: "Heliopulse" by State Azure@stateazure
The simulation solves the compressible Euler equation by discretization.
C code: github.com/nilsberglund-orlea...
#Euler_equation #fluid_mechanics #vortex
8 июн 2024