Skip to content

Latest commit

 

History

History
123 lines (94 loc) · 2.52 KB

File metadata and controls

123 lines (94 loc) · 2.52 KB

Quick Start Guide - SPH Simulation

This guide helps you get the SPH Simulation project running without Nix.

🚀 1-Minute Setup

Linux/macOS:

git clone https://github.com/FreaxMATE/SPHSimulation.git
cd SPHSimulation
./setup.sh

Windows:

git clone https://github.com/FreaxMATE/SPHSimulation.git
cd SPHSimulation
setup.bat

📋 Prerequisites

  • Python 3.9+ (3.12 recommended)
  • Git
  • FFmpeg (for video generation)

Installing Prerequisites:

Ubuntu/Debian:

sudo apt update
sudo apt install python3 python3-pip python3-venv ffmpeg git

macOS (with Homebrew):

brew install python ffmpeg git

Windows:

🔄 Alternative Setup Methods

Method 1: pip + venv (Recommended)

python -m venv venv
source venv/bin/activate  # Linux/macOS
# OR venv\Scripts\activate.bat  # Windows
pip install -r requirements.txt

Method 2: Conda

conda env create -f environment.yml
conda activate sph-simulation

Method 3: pip (Global - Not recommended)

pip install numpy pandas matplotlib scipy moviepy ffmpeg-python

🎮 Running Simulations

Activate your environment first:

source venv/bin/activate  # If using venv
# OR
conda activate sph-simulation  # If using conda

Run simulations:

# Sod shock tube simulation
cd 1/
python sodshock.py

# Planetary simulation  
cd 2/
python planets.py

🆘 Troubleshooting

"Python not found"

  • Ensure Python 3.9+ is installed and in your PATH
  • Try python3 instead of python

"FFmpeg not found"

  • Install FFmpeg for your system
  • On Windows, ensure FFmpeg is in your PATH

"Module not found"

  • Ensure you activated your virtual environment
  • Re-run the setup script

Permission denied (Linux/macOS)

chmod +x setup.sh

📦 What Gets Installed

  • NumPy: Numerical computing
  • Matplotlib: Plotting and visualization
  • SciPy: Scientific computing
  • Pandas: Data manipulation
  • MoviePy: Video processing
  • FFmpeg: Video encoding (system dependency)

🎯 Expected Output

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.