For today’s recreational coding exercise, we will expand on the Finite Volume method for simulating the compressible fluid equations. We will add boundary conditions and source terms. For Part 1, please see the Python tutorial on the Kelvin-Helmholtz Instability, which we build on. Here in Part 2, we will simulate a different instability: the Rayleigh-Taylor Instability, which is what occurs when a heavy fluid sits on top of a light fluid and is pulled down by gravity. In this problem, we will learn how to add source terms for gravitational acceleration and reflective boundary conditions.
You may find the accompanying Python code on github.
Before we begin, below is a gif of what running our simulation looks like: