Superseded (2026-10-18): This derivative edition is retired in favor of the wholly original implementation shockline-euler. The repository stays public and read-only (archived); its history, credits, tests, and calendar records are preserved unchanged.
Compressible finite-volume Euler solver for the Kelvin–Helmholtz instability, with conservation and flux verification tests.
Calendar reconstruction: The historical records in
docs/reconstructed-calendar-2026.csvwere generated on 2026-10-18. Their historical author dates are synthetic; they do not mean this project, its improvements, or work on them existed on those dates. The actual software improvements were completed on 2026-10-18. Original upstream authorship and history are preserved. Calendar coverage is not a measure of engineering quality or historical working time.
Development edition based on Philip Mocz's original project. Original authorship, Git history, and the GPL-3.0 license are retained.
Primitive velocity recovery divides cell momentum directly by cell mass, removing two full-array divisions per recovery without changing the finite-volume method. Three numerical tests cover primitive/conserved round trips, periodic conservation, and the physical Euler flux for a uniform state.
python -m pip install -r requirements.txt
python -m unittest discover -vVerified on 2026-10-18 with Python 3.13.5 and NumPy 2.1.3. A short 32x32 simulation matched the original conserved fields within floating-point tolerance. A local 512x512 kernel benchmark measured median recovery times of 35.69 ms before and 16.26 ms after (seven repeats of ten calls). These are kernel measurements, not whole-simulation speedups; timings depend on the machine and load.
Finite Volume simulation of the Kelvin-Helmholtz Instability
Philip Mocz (2020) Princeton University, @PMocz
Simulate the Kelvin-Helmholtz Instability with Finite Volume
python finitevolume.py

