arXiv · 2505.20399
ULULA: An ultra-lightweight 2D hydrodynamics code for teaching and experimentation
Abstract
Hydrodynamics is a difficult subject to teach in the classroom because most relevant problems must be solved numerically rather than analytically. While there are numerous public hydrodynamics codes, the complexity of production-level software obscures the underlying physics and can be overwhelming to first-time users. Here we present ULULA, an ultra-lightweight python code to solve hydrodynamics and gravity in 2D. The main goal is for the code to be easy to understand, extend, and experiment with. The simulation framework consists of fewer than 800 active lines of pure python code, but it includes a robust MUSCL-Hancock scheme with exchangeable components such as Riemann solvers, reconstruction schemes, boundary conditions, and equations of state. Numerous well-known hydrodynamics problems are provided and can be run in a few minutes on a laptop. The code is open-source, generously commented, and extensively documented.
Explore related subjects
Keep this discovery
Explore connections, maps & timelines
Benedikt Diemer. 2025-05-26. ULULA: An ultra-lightweight 2D hydrodynamics code for teaching and experimentation. https://arxiv.org/abs/2505.20399
Cite the original work for its findings. Save a collection to share your selection of sources.