PySPH: A Python framework for SPH
Prabhu Ramachandran Chandrashekhar P . Kaushik
Department of Aerospace Engineering and Department of Computer Science and Engineering IIT Bombay
PySPH: A Python framework for SPH Prabhu Ramachandran - - PowerPoint PPT Presentation
PySPH: A Python framework for SPH Prabhu Ramachandran Chandrashekhar P . Kaushik Department of Aerospace Engineering and Department of Computer Science and Engineering IIT Bombay SciPy 2010 Austin, TX, June 30 July 1, 2010 Outline
Department of Aerospace Engineering and Department of Computer Science and Engineering IIT Bombay
◮ Particle based, Lagrangian ◮ Gingold and Monaghan (1977),
◮ PDEs ◮ Complex problems ◮ Moving geometries ◮ Free surface problems ◮ . . .
◮ Particle based, Lagrangian ◮ Gingold and Monaghan (1977),
◮ PDEs ◮ Complex problems ◮ Moving geometries ◮ Free surface problems ◮ . . .
◮ The SPH approximation
◮ W(r − r ′, h): kernel, compact support ◮ h: size of the kernel
◮ Derivatives: transferred to the kernel ◮ Lagrangian ◮ PDE → ODE
◮ SPH + Parallel + Python ◮ pysph.googlecode.com ◮ Open Source (BSD)
◮ Python, setuptools ◮ numpy, Cython-0.12,
◮ Mayavi-3.x (optional) ◮ Standard Python package
◮ Particle kernel ◮ SPH kernel ◮ Solver framework ◮ Serial and Parallel solvers
Solver Framework
NNPS SPH Cell Manager Particle Arrays
Solvers
(Python & Cython) (Cython) (Cython) (Cython) (Cython)
C−Arrays
(Cython)
◮ C-arrays: numpy-like but faster and
◮ ParticleArray: arrays of properties ◮ NNPS (Nearest Neighbor Particle
◮ Cell, CellManager ◮ Caching
◮ SPH particle interaction: interaction
◮ SPH summation: interaction of all
◮ Entities (made of particles) ◮ Solver components (do various things) ◮ Component manager (checks
◮ Integrator ◮ Basic Solver
◮ Parallel cell manager ◮ Parallel solver components
CellManager Processor 1 Processor 2 Particles Solver components Particles Solver components Parallel case ParallelCellManager ParallelCellManager Serial case Particles Solver components
◮ Particles move all over ◮ Fixed partitioning will not work ◮ Scale up ◮ Automatic load balancing?
O (−1,−1,0) (1,1,0) (1,−1,0) (2,0,0)
◮ Domain decomposition: Cells ◮ Cells: dynamically created/destroyed ◮ Processors manage Regions ◮ Cells moved to balance load
◮ Boundary cells ◮ Cells with least number of local
◮ Fully automatic, load balanced,
◮ Relatively easy to script ◮ Good performance ◮ Relatively easy to extend ◮ Free surface flows
◮ Solver framework redesign ◮ More documentation ◮ Reduce dependency on TVTK for
◮ Improved testing on various platforms ◮ Gas dynamics (coming soon) ◮ Solid mechanics (next year)