https://github.com/alexandresajus/python-fluid-simulation
A 2D Python Implementation of Smoothed Particle Hydrodynamics
https://github.com/alexandresajus/python-fluid-simulation
fluid physics python simulation
Last synced: 9 months ago
JSON representation
A 2D Python Implementation of Smoothed Particle Hydrodynamics
- Host: GitHub
- URL: https://github.com/alexandresajus/python-fluid-simulation
- Owner: AlexandreSajus
- License: gpl-3.0
- Created: 2020-03-21T11:26:41.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-30T23:10:47.000Z (almost 3 years ago)
- Last Synced: 2025-03-27T02:41:06.607Z (10 months ago)
- Topics: fluid, physics, python, simulation
- Language: Python
- Homepage:
- Size: 18.9 MB
- Stars: 66
- Watchers: 2
- Forks: 11
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# **Python Fluid Simulation**

A Python 2D fluid simulation using SPH
Implementing smoothed particle hydrodynamics (SPH) in Python using this tutorial.
See also the C# implementation in Unity here.
## **Installation**
Make sure you have Python installed on your computer. Then, in a terminal, run the following commands:
**1. Install the package with pip in your terminal:**
```bash
pip install git+https://github.com/AlexandreSajus/Python-Fluid-Simulation.git
```
**2. Run the simulation:**
```bash
python -m pythonsph
```
This will prompt a matplotlib animation window with a real-time simulation: