PySPH is an open source framework for Smoothed Particle Hydrodynamics (SPH) simulations. It is implemented in Python and the performance critical parts are implemented in Cython.
PySPH is implemented in a way that allows a user to specify the entire SPH simulation in pure Python. High-performance code is generated from this high-level Python code, compiled on the fly and executed. PySPH can use OpenMP to utilize multi-core CPUs effectively. PySPH also features optional automatic parallelization (multi-CPU) using mpi4py and Zoltan. If you wish to use the parallel capabilities you will need to have these installed.
Here are videos of simulations made with PySPH.
PySPH is hosted on bitbucket. Please see the bitbucket site for development details.
- User scripts and equations are written in pure Python.
- Flexibility to define arbitrary SPH equations operating on particles.
- Ability to define your own multi-step integrators in pure Python.
- High-performance: our performance is comparable to hand-written solvers implemented in FORTRAN.
- Seamless multi-core support with OpenMP.
- Seamless parallel integration using Zoltan.
- BSD license.
Currently, PySPH has numerous examples to solve the viscous, incompressible Navier-Stokes equations using the weakly compressible (WCSPH) approach. The following formulations are currently implemented:
3D dam-break past an obstacle SPHERIC benchmark Test 2
PySPH is primarily developed at the Department of Aerospace Engineering, IIT Bombay. We are grateful to IIT Bombay for the support. Our primary goal is to build a powerful SPH-based tool for both application and research. We hope that this makes it easy to perform reproducible computational research.
Lead developers:
Earlier developers:
The following have contributed bug-fixes, features, documentation etc.
We are in the process of writing up an article on the new PySPH framework as it stands today. In the meanwhile, if you use PySPH and wish to cite it you may use this:
- Prabhu Ramachandran and Kunal Puri, PySPH: A framework for parallel particle simulations, In proceedings of the 3rd International Conference on Particle-Based Methods (Particles 2013), Stuttgart, Germany, 18th September 2013.
If you have any questions or are running into any difficulties with PySPH, please email or post your questions on the pysph-users mailing list here: https://groups.google.com/d/forum/pysph-users
Please also take a look at the PySPH issue tracker.