A tsunami is a sequence of long water waves that are triggered by a displacement in a large body of water. This typically occurs because of earthquakes, underwater volcanoes, or landslides. Once generated, a tsunami propagates radially outward across the ocean surface. It grows in height and steepness as it enters shallow waters. A tsunami simulator is a good running example for this book because tsunamis are the following:
- Fun –Speaking strictly as a scientist here! A tsunami is a process that’s fun to watch and play with in a numerical sandbox.
- Dangerous –Tsunamis are a great threat to low-lying and heavily populated coastal areas. There’s a need to better understand and predict them.
- Simple math –They can be simulated using a minimal set of equations–shallow water equations (SWEs). This will help us not get bogged down by the math and focus on implementation instead.
- Parallelizable –They involve a physical process that’s suitable for teaching parallel programming, especially considering that it’s a nonembarrassingly parallel problem. To make it work, we’ll carefully design data copy patterns between images.
To simulate tsunamis, we’ll write a solver for the shallow water system of equations.
Why tsunami simulator?