Simulation of an asteroid impact in the South Pacific Ocean, viewpoint moving east
Channel: Nils Berglund
Date: 2023-09-04

This video shows the same simulation as the video https://youtu.be/OZU8B4dRdq0 , but now the point of view is moving towards the east instead of the west. It is a simulation of the wave equation on a sphere, with reflecting boundary conditions given by the Earth's land masses. The initial state is a circular wave concentrated around a point in the south of the Pacific Ocean.
The simulation can be seen as a crude model of the effect of a meteor impact. Note however that several factors, such as the Coriolis force, dissipation, shallow areas near the coast, and ice sheets are not taken into account. The vertical scale has been exaggerated to make the waves more visible.
To make this simulation, I used the so-called Blue Marble Earth map, available at https://en.wikipedia.org/wiki/File:Blue_Marble_2002.png , in 2,560 × 1,280 resolution. I identified the dominant color of the Oceans, and declared all pixels having a nearby color as being in the domain of the wave, while the other pixels' color is used to draw the continents. A few areas of shallow sea with a different color appear therefore as parts of the land masses. 
Simulating the wave equation on a sphere is rather similar to the planar case, except that the Laplacian is written in spherical coordinates. A difficulty is that the Laplacian is singular at the poles of the sphere, which induces some numerical instability. The fix used here is a combination of a regularization of the Laplacian at the poles and an averaging procedure around the poles. While it avoids blow-up, it does not completely prevent the north pole from deforming the wave.
The video has four parts, showing the same simulation with two different color schemes two different playback speeds:
Wave height: 0:00
Average energy: 2:04
Wave height (time lapse): 4:08
Average energy (time lapse): 4:49
In the first and third parts, the color hue and the radial coordinate show the wave height. In the second and fourth part, they show the energy, averaged from the beginning of the simulation. In parts 2 and 4, the playback speed has been multiplied by a factor 3.

For a 2D projection, in equirectangular coordinates, see https://youtu.be/G4kA-if7LQY

Render time: 1 hour 37 minutes
Color scheme: Parts 1 and 3 -  Viridis by Nathaniel J. Smith, Stefan van der Walt and Eric firing
https://github.com/BIDS/colormap
Parts 2 and 4 - Parula, originally from Matlab
https://www.mathworks.com/help/matlab/ref/colormap.html

Music: "The Shining in Dubai" by the Unicorn Heads@UnicornHeads

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 wave equation by discretization. The algorithm is adapted from the paper https://hplgit.github.io/fdm-book/doc/pub/wave/pdf/wave-4print.pdf 
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!

#meteor #wave_equation #asteroid