This guide helps you get the SPH Simulation project running without Nix.
git clone https://github.com/FreaxMATE/SPHSimulation.git
cd SPHSimulation
./setup.shgit clone https://github.com/FreaxMATE/SPHSimulation.git
cd SPHSimulation
setup.bat- Python 3.9+ (3.12 recommended)
- Git
- FFmpeg (for video generation)
Ubuntu/Debian:
sudo apt update
sudo apt install python3 python3-pip python3-venv ffmpeg gitmacOS (with Homebrew):
brew install python ffmpeg gitWindows:
- Install Python from python.org (check "Add to PATH")
- Install Git from git-scm.com
- Install FFmpeg: Download from ffmpeg.org or use
choco install ffmpeg
python -m venv venv
source venv/bin/activate # Linux/macOS
# OR venv\Scripts\activate.bat # Windows
pip install -r requirements.txtconda env create -f environment.yml
conda activate sph-simulationpip install numpy pandas matplotlib scipy moviepy ffmpeg-pythonActivate your environment first:
source venv/bin/activate # If using venv
# OR
conda activate sph-simulation # If using condaRun simulations:
# Sod shock tube simulation
cd 1/
python sodshock.py
# Planetary simulation
cd 2/
python planets.py- Ensure Python 3.9+ is installed and in your PATH
- Try
python3instead ofpython
- Install FFmpeg for your system
- On Windows, ensure FFmpeg is in your PATH
- Ensure you activated your virtual environment
- Re-run the setup script
chmod +x setup.sh- NumPy: Numerical computing
- Matplotlib: Plotting and visualization
- SciPy: Scientific computing
- Pandas: Data manipulation
- MoviePy: Video processing
- FFmpeg: Video encoding (system dependency)
After running simulations, you should see:
- Real-time plots during simulation
- Generated MP4 animation files
- Console output showing simulation progress
For detailed information, see the main README.md.