A particle based fluid simulator written in python.
Note: The above videos are a lower quality than the origionals due them being compressed into .gif files
This project was heavily inspired by this video by Sebastian Lague. This fluid simulator works in a very similar way, and uses similar techniques to, the one showcased in the video.
This simulator uses smoothed particle hydrodynamics (SPH) technique, which is described very well in this paper.
In an attempt to increase performance and allow the simulation of a larger number of particles (as Python is notoriously slow), I have made use of the Numba Python library and the GPU acceleration it provides.
- A supported GPU (listed here).
- Python 3.11 (slightly eariler or later versions of Python, such as 3.9 or 3.10 may also work).
- The Numpy, Numba and Pygame libraries.
- A library made by me called Pygame UI Toolkit.
- Improve performance by implementing a bitonic sort that can run on the GPU.
- Optimise thread and block sizes.
- Viscoelasiticty.
- More accurate surface tension.
- Interactions with objects.