Package: pySPlisHSPlasH
SPlisHSPlasH is an open-source library for the physically-based simulation of fluids. The simulation in this library is based on the Smoothed Particle Hydrodynamics (SPH) method which is a popular meshless Lagrangian approach to simulate complex fluid effects. The SPH formalism allows an efficient computation of a certain quantity of a fluid particle by considering only a finite set of neighboring particles. One of the most important research topics in the field of SPH methods is the simulation of incompressible fluids. SPlisHSPlasH implements current state-of-the-art pressure solvers (WCSPH, PCISPH, PBF, IISPH, DFSPH, PF) to simulate incompressibility. Moreover, the library provides different methods to simulate viscosity, surface tension and vorticity.The library uses the following external libraries:Eigen,json,partio,zlib,cxxopts,tinyexpr,toojpeg,pybind,glfw,hapPLY,nfd, andimgui. All external dependencies are included.Furthermore we use our own libraries:PositionBasedDynamicsto simulate dynamic rigid bodiesDiscregridto detect collisions between rigid bodiesCompactNSearchto perform the neighborhood searchcuNSearchto perform the neighborhood search on the GPUGenericParametersto handle generic parametersSPlisHSPlasH can export the particle data in the partio and vtk format. If you want to import partio files in Maya or Blender, try out our plugins:Blender Sequence LoaderMayaPartioToolsAuthor:Jan BenderLicenseThe SPlisHSPlasH library code is licensed under the MIT license. SeeLICENSEfor details.External dependencies are covered by separate licensing terms.
See theexternfolder for the code and respective licensing terms of each dependency.DocumentationDocumentationSPH tutorialForumOn ourGitHub discussionspage you can ask questions, discuss about simulation topics, and share ideas.Build InstructionsThis project is based onCMake. Simply generate project, Makefiles, etc. usingCMakeand compile the project with a compiler of your choice that supports C++11. The code was tested with the following configurations:Windows 10 64-bit, CMake 3.18.3, Visual Studio 2019Debian 11.5 64-bit, CMake 3.18.4, GCC 10.2.1.Note: Please use a 64-bit target on a 64-bit operating system. 32-bit builds on a 64-bit OS are not supported.Python Installation InstructionFor Windows and Linux targets there exists prebuilt python wheel files which can be installed usingpip install pysplishsplashThese are available for Python versions 3.6-3.10. See also here:pySPlisHSPlasH.
If you do not meet these conditions please refer to the build instructions and to the python bindingGetting started guide.The command line simulator is available by running one of the followingsplash
splash --helpFeaturesSPlisHSPlasH implements:an open-source SPH fluid simulation (2D & 3D)neighborhood search on CPU or GPUsupports vectorization using AVXPython binding (thanks to Stefan Jeske)supports embedded Python scriptsseveral implicit pressure solvers (WCSPH, PCISPH, PBF, IISPH, DFSPH, PF)explicit and implicit viscosity methodscurrent surface tension approachesdifferent vorticity methodscomputation of drag forcessupport for multi-phase simulationssimulation of deformable solidsrigid-fluid coupling with static and dynamic bodiestwo-way coupling with deformable solidsXSPH velocity filterfluid emittersscripted animation fieldsa json-based scene file importerautomatic surface samplinga tool for volume sampling of closed geometriesa tool to generate spray, foam and bubble particles in a postprocessing stepa tool to skin a visual mesh to the moving particles of an elastic solid in a postprocessing steppartio file export of all particle dataVTK file export of all particle data (enables the data import in ParaView)rigid body exporta Maya plugin to model and generate scene filesa ParaView plugin to import particle dataA list of all implemented simulation methods can be found here:https://splishsplash.physics-simulation.org/featuresScreenshots & Videoshttps://splishsplash.physics-simulation.org/galleryCitationTo cite SPlisHSPlasH you can use this BibTeX entry:@software{SPlisHSPlasH_Library,author={Bender, Jan and others},license={MIT},title={{SPlisHSPlasH Library}},url={https://github.com/InteractiveComputerGraphics/SPlisHSPlasH},}ReferencesNadir Akinci, Gizem Akinci, and Matthias Teschner. Versatile surface tension and adhesion for SPH fluids. ACM Trans. Graph., 32(6):182:1–182:8, 2013.Nadir Akinci, Markus Ihmsen, Gizem Akinci, Barbara Solenthaler, and Matthias Teschner, "Versatile rigid-fluid coupling for incompressible SPH", ACM Transactions on Graphics 31(4), 2012Markus Becker and Matthias Teschner. Weakly compressible SPH for free surface flows. In Proceedings of ACM SIGGRAPH/Eurographics Symposium on Computer Animation, 2007. Eurographics Association.M. Becker, M. Ihmsen, and M. Teschner. Corotated SPH for deformable solids. Proceedings of Eurographics Conference on Natural Phenomena, 2009Jan Bender and Dan Koschier. Divergence-free smoothed particle hydrodynamics. In Proceedings of ACM SIGGRAPH / Eurographics Symposium on Computer Animation, 2015. ACM.Jan Bender and Dan Koschier. Divergence-free SPH for incompressible and viscous fluids. IEEE Transactions on Visualization and Computer Graphics, 2017.Jan Bender, Dan Koschier, Tassilo Kugelstadt and Marcel Weiler. A Micropolar Material Model for Turbulent SPH Fluids. In Proceedings of ACM SIGGRAPH / EUROGRAPHICS Symposium on Computer Animation, 2017Jan Bender, Dan Koschier, Tassilo Kugelstadt and Marcel Weiler. Turbulent Micropolar SPH Fluids with Foam. IEEE Transactions on Visualization and Computer Graphics 25(6), 2019Jan Bender, Tassilo Kugelstadt, Marcel Weiler, Dan Koschier, "Volume Maps: An Implicit Boundary Representation for SPH", ACM SIGGRAPH Conference on Motion, Interaction and Games, 2019Jan Bender, Tassilo Kugelstadt, Marcel Weiler, Dan Koschier, "Implicit  Frictional Boundary Handling for SPH", IEEE Transactions on  Visualization and Computer Graphics, 2020Jan Bender, Matthias Müller, Miguel A. Otaduy, Matthias Teschner, and Miles Macklin. A survey on position-based simulation methods in computer graphics. Computer Graphics Forum, 33(6):228–251, 2014.Jan Bender, Matthias Müller, and Miles Macklin. Position-based simulation methods in computer graphics. In EUROGRAPHICS 2015 Tutorials. Eurographics Association, 2015.Christoph Gissler, Stefan Band, Andreas Peer, Markus Ihmsen and Matthias Teschner. Approximate Air-Fluid Interactions for SPH. In Proceedings of Virtual Reality Interactions and Physical Simulations, 2017C. Gissler, A. Henne, S. Band, A. Peer and M. Teschner. An Implicit Compressible SPH Solver for Snow Simulation, ACM Transactions on Graphics 39(4), 2020.Xiaowei He, Huamin Wang, Fengjun Zhang, Hongan Wang, Guoping Wang, and Kun Zhou. Robust simulation of sparsely sampled thin features in SPH-based free surface flows. ACM Trans. Graph., 34(1):7:1–7:9, December 2014.Markus Ihmsen, Nadir Akinci, Gizem Akinci, Matthias Teschner. Unified spray, foam and air bubbles for particle-based fluids. The Visual Computer 28(6), 2012Markus Ihmsen, Jens Cornelis, Barbara Solenthaler, Christopher Horvath, and Matthias Teschner. Implicit incompressible SPH. IEEE Transactions on Visualization and Computer Graphics, 20(3):426–435, March 2014.Markus Ihmsen, Jens Orthmann, Barbara Solenthaler, Andreas Kolb, and Matthias Teschner. SPH Fluids in Computer Graphics. In Eurographics 2014 - State of the Art Reports. The Eurographics Association, 2014.M. Jiang, Y. Zhou, R. Wang, R. Southern, J. J. Zhang. Blue noise sampling using an SPH-based method. ACM Transactions on Graphics, 2015Dan Koschier and Jan Bender, "Density Maps for Improved SPH Boundary Handling", In Proceedings of ACM SIGGRAPH / EUROGRAPHICS Symposium on Computer Animation (SCA), 2017Tassilo Kugelstadt, Jan Bender, José Antonio Fernández-Fernández, Stefan Rhys  Jeske, Fabian Löschner, and Andreas Longva. Fast Corotated Elastic SPH  Solids with Implicit Zero-Energy Mode Control. Proceedings of the ACM  on Computer Graphics and Interactive Techniques, 2021Miles Macklin and Matthias Müller. Position based fluids. ACM Trans. Graph., 32(4):104:1–104:12, July 2013.Miles Macklin, Matthias Müller, Nuttapong Chentanez and Tae-Yong Kim. Unified Particle Physics for Real-Time Applications. ACM Trans. Graph., 33(4), 2014J. J. Monaghan. Smoothed Particle Hydrodynamics. Annual Review of Astronomy and Astrophysics, 1992, 30, 543-574.A. Peer, C. Gissler, S. Band, and M. Teschner. An Implicit SPH Formulation for Incompressible Linearly Elastic Solids. Computer Graphics Forum, 2017Andreas Peer, Markus Ihmsen, Jens Cornelis, and Matthias Teschner. An Implicit Viscosity Formulation for SPH Fluids. ACM Trans. Graph., 34(4), 2015.Andreas Peer and Matthias Teschner. Prescribed Velocity Gradients for Highly Viscous SPH Fluids with Vorticity Diffusion. IEEE Transactions on Visualization and Computer Graphics, 2016.B. Solenthaler and R. Pajarola. Density Contrast SPH Interfaces. In Proceedings of ACM SIGGRAPH/Eurographics Symposium on Computer Animation, 2008.B. Solenthaler and R. Pajarola. Predictive-corrective incompressible SPH. ACM Trans. Graph., 28(3):40:1–40:6, July 2009.Tetsuya Takahashi, Yoshinori Dobashi, Issei Fujishiro, Tomoyuki Nishita, and Ming C. Lin. Implicit Formulation for SPH-based Viscous Fluids. Computer Graphics Forum, 34, 2015.Marcel Weiler, Dan Koschier and Jan Bender. Projective Fluids. Proceedings of the 9th International Conference on Motion in Games, ACM, 2016, 79-84Marcel Weiler, Dan Koschier, Magnus Brand and Jan Bender. A Physically Consistent Implicit Viscosity Solver for SPH Fluids. Computer Graphics Forum (Eurographics), 37(2), 2018F. Zorilla, M. Ritter, J. Sappl, W. Rauch, M. Harders. Accelerating  Surface Tension Calculation in SPH via Particle Classification and Monte Carlo Integration. Computers 9, 23, 2020.Other research projects using SPlisHSPlasHDiogo Schaffer, Andre Antonitsch, Amyr Neto, Soraia Musse. Towards Animating Virtual Humans in Flooded Environments. Motion, Interaction and Games, 2020https://dl.acm.org/doi/10.1145/3424636.3426900Byungsoo Kim, Vinicius C. Azevedo, Markus Gross, Barbara Solenthaler. Lagrangian neural style transfer for fluids. ACM Transactions on Graphics 39, 4, 2020https://dl.acm.org/doi/abs/10.1145/3386569.3392473Fernando Zorilla, Marcel Ritter, Johannes Sappl, Wolfgang Rauch, Matthias Harders. Accelerating Surface Tension Calculation in SPH via Particle Classification and Monte Carlo Integration. Computer Graphics and Visual Computing (CGVC), 2019https://diglib.eg.org/handle/10.2312/cgvc20191260H. R. Abbasia and R. Lubbad. A numerical model for the simulation of oil–ice interaction. Physics of Fluids 33, 2021https://aip.scitation.org/doi/10.1063/5.0065587Uljad Berdica, Yuewei Fu, Yuchen Liu, Emmanouil Angelidis, Chen Feng. Mobile 3D Printing Robot Simulation with Viscoelastic Fluids. IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), 2021https://ieeexplore.ieee.org/document/9636114Arnaud Schoentgen, Pierre Poulin, Emmanuelle Darles, Philippe Meseure. Particle-based liquid control using animation templates. ACM SIGGRAPH/Eurographics Symposium on Computer Animation 2020https://dl.acm.org/doi/10.1111/cgf.14103B. Ummenhofer, L. Prantl, N. Thuerey, V. Koltun. Lagrangian Fluid Simulation with Continuous Convolutions. ICLR 2020https://ge.in.tum.de/publications/2020-ummenhofer-iclr/Stefan Reinhardt, Tim Krake, Bernhard Eberhardt, Daniel Weiskopf. Consistent Shepard Interpolation for SPH-Based Fluid Animation. ACM Transactions on Graphics 38, 6, 2019https://dl.acm.org/doi/10.1145/3355089.3356503Zhongyao Yang, Maolin Wu, Shiguang Liu. Helmholtz decomposition-based SPH. Virtual Reality & Intelligent Hardware 3, 2, 2021https://www.sciencedirect.com/science/article/pii/S2096579621000176Min Li, Hongshu Li, Weiliang Meng, Jian Zhu, Gary Zhang. An efficient non-iterative smoothed particle hydrodynamics fluid simulation method with variable smoothing length. Visual Computing for Industry, Biomedicine, and Art 6, 1, 2023https://vciba.springeropen.com/articles/10.1186/s42492-022-00128-xYalmar Ponce Atencio, Manuel J. Ibarra, Juan José Oré Cerrón, Roberto Quispe Quispe, Richard Flores Condori, Julio Huanca Marín, Mary Huaman Carrión. Particle-Based Physics for Interactive Applications. Lecture Notes in Networks and Systems book series (LNNS,volume 216), 2021https://link.springer.com/chapter/10.1007/978-981-16-1781-2_38Zijie Li, Tianqin Li, Amir Barati Farimani. TPU-GAN: Learning temporal coherence from dynamic point cloud sequences. ICLR 2022https://openreview.net/forum?id=FEBFJ98FKxMuzaffer Akbay, Nicholas Nobles, Victor Zordan, Tamar Shinar. An extended partitioned method for conservative solid-fluid coupling. ACM Transactions on Graphics 37, 4, 2018https://dl.acm.org/doi/10.1145/3197517.3201345Samuel Carensac, Nicolas Pronost & Saïda Bouakaz. Optimizations for predictive–corrective particle-based fluid simulation on GPU. The Visual Computer volume 39, 2023Iliya Starodubtsev, Pavel Vasev, Yuliya Starodubtseva, Igor Tsepelev. Numerical Simulation and Visualization of Lava Flows. Scientific Visualization, 2022, volume 14, number 5https://doi.org/10.26583/sv.14.5.05Arjun Mani, Ishaan Preetam Chandratreya, Elliot Creager, Carl Vondrick, Richard Zemel. SurfsUp: Learning Fluid Simulation for Novel Surfaces. arXiv 2023https://doi.org/10.48550/arXiv.2304.06197Jian Chen. Incompressible Projective Smooth Particle Hydrodynamic. Proc. CNCI 2019https://doi.org/10.2991/cnci-19.2019.80Min Hyung Kee, Kiwon Um, HyunMo Kang, and JungHyun Han. An Optimization-based SPH Solver for Simulation of Hyperelastic Solids. Computer Graphics Forum, 42, 2, 2023https://doi.org/10.1111/cgf.14756