PySPH is an open-source, Python-based, framework for particle methods in general and Smoothed Particle Hydrodynamics (SPH) in particular. PySPH allows a user to define a complete SPH simulation using pure Python. High-performance code is generated from this high-level Python code and executed on either multiple cores, or on GPUs, seamlessly. It also supports distributed execution using MPI. PySPH supports a wide variety of SPH schemes and formulations. These include, incompressible and compressible fluid flow, elastic dynamics, rigid body dynamics, shallow water equations, and other problems. PySPH supports a variety of boundary conditions including mirror, periodic, solid wall, and inlet/outlet boundary conditions. The package is written to facilitate reuse and reproducibility. This article discusses the overall design of PySPH and demonstrates many of its features. Several example results are shown to demonstrate the range of features that PySPH provides.
The weakly compressible smoothed particle hydrodynamics (WCSPH) method has been employed to simulate various physical phenomena involving fluids and solids. Various methods have been proposed to implement the solid wall, inlet/outlet, and other boundary conditions. However, error estimation and the formal rates of convergence for these methods have not been discussed or examined carefully. In this paper, we use the method of manufactured solution (MMS) to verify the convergence properties of a variety of commonly employed of various solid, inlet, and outlet boundary implementations. In order to perform this study, we propose various manufactured solutions for different domains. On the basis of the convergence offered by these methods, we systematically propose a convergent WCSPH scheme along with suitable methods for implementing the boundary conditions. We also demonstrate the accuracy of the proposed scheme by using it to solve the flow past a circular cylinder. Along with other recent developments in the use of adaptive resolution, this paves the way for accurate and efficient simulation of incompressible or weakly-compressible fluid flows using the SPH method.
scite is a Brooklyn-based organization that helps researchers better discover and understand research articles through Smart Citations–citations that display the context of the citation and describe whether the article provides supporting or contrasting evidence. scite is used by students and researchers from around the world and is funded in part by the National Science Foundation and the National Institute on Drug Abuse of the National Institutes of Health.