Kelvin–Helmholtz Instability

I spent couple weeks implementing a simple 2D hydrodynamic code in CUDA C, which is a technology developed by nVidia. The code runs on the GPU instead of CPU. It uses Fourier spectral method with the 2/3 dealiasing rule and 4-th order Runge-Kutta integrator to solve the vorticity equation

    \[ \frac{\partial\omega}{\partial t} = J(\phi, \omega) + \nu \nabla^2\omega - \mu\omega, \]

where \omega is the vorticity, \phi is the stream function, \nu is the kinematic viscosity, \mu is the Ekman coefficient, and J is the Jacobian determinant. When running with resolution 4096\times4096 and single precision float, the code reaches 130 GFLOPS on an nVidia GeForce GTX 580 card, which is over an order of magnitude faster than CPU codes.

The above movie shows a subdomain of a two-dimensional, incompressible hydrodynamic simulation. The color represents vorticity. The initial condition has two thin layers of vorticity (one not shown) with small random perturbations. The vorticity sheets become unstable due to the Kelvin–Helmholtz instability.

Here is another movie showing a simulation with Kolmogorov forcing.

I would like to thank PDC for providing the Zorn cluster, which makes the development possible. The Zorn cluster is named after a painter Anders Zorn because it has GPUs. The code is now available for download on GitHub.


Leave a Reply

Your email address will not be published. Required fields are marked *

Set your Twitter account name in your settings to use the TwitterBar Section.