English

kh2d-solver: A Python Library for Idealized Two-Dimensional Incompressible Kelvin-Helmholtz Instability

Fluid Dynamics 2025-09-22 v1 Atmospheric and Oceanic Physics Computational Physics Physics Education

Abstract

We present an open-source Python library for simulating two-dimensional incompressible Kelvin-Helmholtz instabilities in stratified shear flows. The solver employs a fractional-step projection method with spectral Poisson solution via Fast Sine Transform, achieving second-order spatial accuracy. Implementation leverages NumPy, SciPy, and Numba JIT compilation for efficient computation. Four canonical test cases explore Reynolds numbers 1000--5000 and Richardson numbers 0.1--0.3: classical shear layer, double shear configuration, rotating flow, and forced turbulence. Statistical analysis using Shannon entropy and complexity indices reveals that double shear layers achieve 2.8×\times higher mixing rates than forced turbulence despite lower Reynolds numbers. The solver runs efficiently on standard desktop hardware, with 384×\times192 grid simulations completing in approximately 31 minutes. Results demonstrate that mixing efficiency depends on instability generation pathways rather than intensity measures alone, challenging Richardson number-based parameterizations and suggesting refinements for subgrid-scale representation in climate models.

Keywords

Cite

@article{arxiv.2509.16080,
  title  = {kh2d-solver: A Python Library for Idealized Two-Dimensional Incompressible Kelvin-Helmholtz Instability},
  author = {Sandy H. S. Herho and Nurjanna J. Trilaksono and Faiz R. Fajary and Gandhi Napitupulu and Iwan P. Anwar and Faruq Khadami and Dasapta E. Irawan},
  journal= {arXiv preprint arXiv:2509.16080},
  year   = {2025}
}

Comments

26 pages, 4 figures, 2 tables

R2 v1 2026-07-01T05:46:00.765Z